devXero's blog

a blog about agile, development, and automation

  • tweets

    Error: Twitter did not respond. Please wait a few minutes and refresh this page.

  • photo

  • Advertisements

The test step sweet spot

Posted by Mike Longin on August 27, 2009

As part of Chris McMahons ( presentation “History of a Large Test Automation Project using Selenium” he mentioned the concept of a test step sweet spot.  To him the general rule should be about 200 test steps.  For those that use Fitnesse that would be 200 assertions.  I have been thinking along these steps for a while and his comments finally gave rise to my inner dialog.  Once a test starts getting to long it does 2 things.

  1. It starts testing much more then an intial test case and creates many more failure points
  2. It becomes unmanageable to support.  If a failure happens later in the test run, it will be next to impossible to debug and deal and solve the issue

Every person writing tests should be looking for that sweet spot.  Looking at my test suite, I can see that for 200 Fitnesse\SWAT tests that I have the average assertion count is about 210.  However my most solid tests are all closer to around 150.  It is interesting to me that my numbers are so close to Chris’s.   From now on I am going to start paying more attention to a test and force myself to reexamine the test once I am above 150 and try to keep myself below 200.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: