Has Automated Testing Become Any Easier Yet?
I am currently looking for suitable tools to help with automated testing in one of the projects I have been working on. This post provides an introduction into the topic and gives a brief overview of some of the available frameworks.
During my quest for the killer testing tools I came across two excellent posts elaborating on difficulties hidden in automated testing. The first one points out obstacles hidden in regression tests, a major concern of mine these days. The other post on automated GUI testing dates back to 2007 which makes it especially valuable for me. I subscribe to all the points found against the frameworks of that time.
Here is the list of questions one might ask when considering the test automation proper:
- How do we cope with ever changing requirements when writing our test scripts?
- Do we have to wait for developers to do their job first?
- Do we actually need developers to take ownership of the test scripts?
- How expensive is it, in terms of time and effort, to maintain the automated tests?
I would say the key to success lies in combining several tools and understanding their limitations. I consider unit tests mandatory but what else could be added on top of them?
A minimalistic approach would be to automate acceptance tests. In my experience, stake holders tend to underestimate their participation in testing. Therefore, many bugs occur shortly after the release has been signed off after a round of manual acceptance tests. On the other hand, the customers really are the domain experts. They surely know what is expected and perhaps could provide a few examples to describe the correct behavior. At least, that is the prerequisite the frameworks like Fit or its successor FitNesse have evolved around.
Since the testing is example-driven, only a limited number of scenarios can be tested. Also, the integration with modern CI servers is questionable. Finally, the collaboration does not go much further beyond a simple wikipedia and does not really enforce the constant need for being up-to-date.
Those who are lucky enough and work in a truly agile environment can make most from automated testing by using the Behavior Driven Development. The ultimate goal is to guarantee that only the required features are developed, tested and delivered. Such features should have a significant business value and are typically defined by stake holders. To set an example, Cucumber is probably the most popular tool at present.
Finally, there is a variety of tools specialized on automated UI tests, performance testing, integration etc. You might want to check the quick links on this page.
This post merely scratches the surface. I plan to provide a detailed example of using the TestMaker for the automated UI testing. Hope you find the post interesting nevertheless.