In my last post-Structure of Automation Test Cases, I have shown how we can improve the test structure and make a better one.Too many tests will make feedback loop delayed and too less tests may not have enough coverage.Sometimes too many tests are added to a single E2E(End to End) script.This kind of test design will make it spaghetti. The goal is to design a significant approach that will lower down the feedback loop.
Now lets looks at the question below:
- What is the biggest benefit or goal ?
- What is the cost ?
- How is the team?
- What training team needs?
- What is holding automation back?
We have to prioritise the issues and resolve one by one. Now in this post I am trying to venture the pattern on which the structure is made. The test structure is made on Hermetic Test Pattern. As per the Hermetic test pattern each test should be completely Independent and should not depend on other test. So,It should be atomic in nature and self sufficient.As per the maintenance concern,each test case should be maintained concern,each testcase should be maintained separately and if any dependency outside of the test found(may be a 3rd party library,3rd party service) test engineer should cut the linkage with the service.
The best way to start is to look into smaller objectives but add test slowly to make it mature.
Advantages: Each testcases are atomic in nature so no dependency on anything. Test takes clean start as precondition creates all test data No polluted data inflow our outflow. We can execute the test in different order on need based. We can create more molecularity which increase code re usability. As each testcase is atomic,parallel execution is still possible.The deep advantages are:
- Increase confidence in software quality.
- Earlier time to produce the software to the market means more revenue.
- Reduce the cost in testing.
- Consistent repeatable testing
- Run tests unattended.
- Find more regression bugs
- Run tests more often
- Better quality software
- Coverage is high
- Find more bugs
- Test on different systems.
Disadvantages: Duplication of code increases if not created modular type. Design testdata for each testcase Execution time increases. High resource utilisation.