devXero's blog

a blog about agile, development, and automation

Posts Tagged ‘Fitnesse’

Ways to improve the reliability and efficiency of SWAT/UI tests (Part 1 – Sleeps are evil)

Posted by Mike Longin on October 4, 2009

This is the start of a series of posts I am going to be writing on how to improve both the reliability and efficiency of SWAT tests.  Any ideas I present here can be applied to any UI testing tool (SWAT, Selenium, WatiN, QTP, etc…).  The most important concept to take away from these posts will be that tests can be made both reliable and efficient with just a few simple techniques.

For the first post we will be looking at the Sleep command (http://ulti-swat.wikispaces.com/SwatCommandsSleep).  Almost all UI testing frameworks contain some version of this command.  This command is also sometimes known as a “Wait” Command.

Lets start out with why this command is bad:

  • The command will slow down a test suite
  • No matter what, the time you set for the sleep is always too slow or to long.  Either it will be too long, and your test will just sit there waiting for nothing, or it will be too short and the test will move on before it should.

Assuming you are still reading this, and agree that sleeps are bad, you are probably asking what you can do to avoid sleep commands and make your test both stronger and more reliable.

Read the rest of this entry »

Posted in Uncategorized | Tagged: , , , , , , , , | Leave a Comment »

Automated test data (using setup servers or setup scripts?)

Posted by Mike Longin on August 13, 2008

So I feel that this is kinda of a religious debate but I have never shied away from a little fun.

When it comes to writing an automated test (lets discuss functional UI tests), should the data come from a setup script, or sitting on a DB server that is intended for this purpose.  To further complicate this question, for my company there are multiple tables that would need to have data inserted, possibly as many as 10 or more.

For myself I have found that there is no real hard and fast rule.  I lean towards setup data for stock data.  By stock data I mean data that is fairly static(because no data is ever 100% static) seems to be best left in a setup server.  However data that is either specifically being tested or that is subject to a great deal of change should always come from a setup script.

What about you?

Posted in Uncategorized | Tagged: , , , , | Leave a Comment »