Tuesday, September 16, 2008

Design Automation system with states for debugging purpose

It is very important to design your automation system with debugging in mind. For example, you have a an automated suite that runs in sequence, and you needed to make changes in the last test or even add a new test; if you don't design your system correctly, you will end up running through your entire test in order to debug your test under development.

Thus, the solution is to identify states in your system, which makes each of the test of test suite be dependent on any of these states.

For example, we could have the following states in our system:
  • StartUpState
  • LoggedInState
  • FileOpenState
This way, each test is independent, and you no longer are required to run the entire suite in sequence. This will make debugging and maintenance a breeze in comparison to create a sequential test suite. This concept is used heavily in SILK, with the Base State concept.

The interesting part is how to implement this concept taking advantage of object oriented language such as C#? I will cover this in my next post, stay tuned!