To automate tests, first I think the requirements that I need to start.
The figure 1 bellow shows the inputs and the outputs that I consider in test automation.
|Figure 1 Test Automation Inputs and Outputs|
- Test Cases selected to be automated, they must be repeatable.
- Test Data.
- Test Tools environment configured and preferably Continuous Integration.
- Code, even using TDD (test driven development) the code (can be fake) is needed to run the tests.
- Test Scripts.
- Execution Log.
- Results Report.
- Traceability (tests and requirements or tests and failures) and code coverage.
Depending of test tool, other metrics could be extracted from test automation.
During the project a lot of external events can happen to disrupt the activities of automation as changes in requirements, extra requests from customer, change of deliverable dates and etc. For this reason I adopt some procedures listed bellow to automate tests and execute the software test activities.
- Plan the test cases for the priority functionalities developed using a test tool (for example Testlink).
- Select the test cases to be automated (selection can be according to acceptance criteria).
- Automated test scripts creation according to test cases selected to be automated. These test scripts must be possible to be edited and gathered in a test suite, and reused to others test cases;
- Update the test scripts is important to avoid wrong results.
- Then, the testers executed the automated tests using a test tool and the exploratory manual tests also. The defects found were registered in Testlink and in the defect tracking tool.
- The automatic regression tests for all functionalities must be executed also when defects were validated to ensuring that another part of system was not affected by code changes.
- The automated TestLink reports can be generated. The development team released another system version and the same activities process began again.
I call these procedures Test Iteration because it will be repeated again for next version of software until the end of project.
I executed it in Scrum projects and Waterfall projects as well.My experience is reported in my paper "Iterative Software Testing Process for Scrum and Waterfall Projects using Open Source Testing Tools Experience". It was presented in the event ICTSS 2010 (International Conference of Testing Software and Systems).
Executing these procedures is possible to ensure the test automation activities in the project and avoid problems as outdated test scripts.
According to project platform is possible to use many test automation tools, for example:
For desktop projects (Java AWT or Swing) : Marathon test tool
For C# or Java application is possible to use Fitnesse test tool
For mobile J2ME applications : J2MEUnit
My favorite tools to use are Selenium, Fitnesse and Jmeter. In next posts I will detail how to use them.