Showing posts with label selenium. Show all posts
Showing posts with label selenium. Show all posts

Thursday, August 12, 2010

Day 3 at Agile2010

Here is a summary of another satisfying day:

I was introduced to some powerful team wireframing techniques that could be incorporated into the discovery phase of a project as another tool to aid in creating and defining the backlog.  I wonder what my UX friends would think of doing UX as a whole team.  It definitely fits the agile model where every team member provides input and takes responsibility for the whole process, not just their specialty.

The 11am session reminded me of the Trident Splash commercials - I wasn't prepared for the amount of information I received from Jeff Patton and I'll have to review my notes and his slides several times.  What I do know is that there was a lot of valuable information on how to do agile discovery.  The techniques were designed to help you get to a definition of ready - ready to start sprinting.  Some quotes I wrote down: "Our job is to minimize output, and maximize outcome"; "Most agile practives emphasize delivery, and not much discovery", and as an example of that second quote: "velocity is a measurement of output, not outcome".  A good reminder to focus on why the project was started in the first place.  Update 8/31: The slides are now available here

The first session after lunch I joined the presenter up front as a timer object.  Brian Marick was explaining OO programming practices to non-programmers by using volunteers who acted as objects.  He explained SRP, encapsulation, MVC, etc.  You can see a partial video of a previous talk he did on the topic at http://vimeo.com/13506935

Not shockingly, in the last session I learned I was using Selenium in the most basic (and mostly abhorred) way.  I was able to spend some time with Patrick Wilson-Welsh after the session in a mini open jam to go through some coding examples of how to do it the 'right' way.  Good thing I haven't given my Selenium SDEC presentation yet.  Thanks Patrick for spending the extra time - you are one of many at the conference that have shared your time and energy with me and others.

The day ended when I didn't win an iPad, but I did thoroughly enjoy playing beach volleyball in the dark until almost midnight with occasional swim breaks.  Thanks to everyone who participated - it was a great way to give my brain a rest.

We're at epcot tomorrow night until midnight so I don't think I'll be posting my Day 4 notes until Friday sometime.

Monday, July 5, 2010

Using Selenium for Meta tag testing

I recently tweeted that I had figured out how to use Selenium to test for meta tag content. Here is in an example using http://www.protegra.com/. On the Protegra home page, I wanted to make sure the following 2 tags existed:

<meta name="title" content="Protegra.com" /> 
<meta name="description" content="Business. Technology. Solutions." />

Obviously, meta tags don't show on the page at all, but do exist in the HTML. To test this manually, I would need to open the page in a browser, click view source, search for 'meta' and then manually compare the results to the expected meta tags. To test this using Selenium, all you need to do is create a test case that opens up Protegra.com and then uses VerifyElementPresent to search for each meta tag. The VerifyElementPresent command allows you to enter the name of the meta tag and the expected content in the format of :

//meta[@name='name of the meta tag' and @content='the expected content']

The Selenium test case html for the two meta tags I'm looking for looks like this:
<tr>
  <td>verifyElementPresent</td>
  <td>//meta[@name='title' and @content='Protegra.com']</td>
  <td></td>
</tr>
<tr>
  <td>verifyElementPresent</td>
  <td>//meta[@name='description' and @content='Business. Technology. Solutions.']</td>
  <td></td>
</tr>

Now I can run this test repeatedly to test for the expected meta tag content on the home page whenever I want without using manual effort.  I can also create similar tests for each page throughout the site and run them all consecutively.  Additionally, I could use Excel to generate the Selenium test case html for all my pages and meta tags without having to write the html manually or I could export this test case into C# (or any of the other programming languages supported by Selenium) and transform this test to lookup pages and meta tag values in a database table.  Fast and easy.