top of page
Search
  • Sumit Mundhada

Test Automation Best Practices for True Return on Investment

Test Automation is very important only when it has true ROI. We often here about reliability of automation tests, many a times test automation project does not provide true benefits but are they really so unreliable? I strongly believe it is just one side of a story, something must be wrong in the automation strategy, process, expectation and planning. Do a retrospective and fix it before it is too late.

I also believe it is very difficult to come up with the exact rules & strategy for your automation project just because there are always many exceptions from each rule and changing nature of the project & priority. But despite that fact, there are some core principles that you should follow, stick to the basics, revisit your automation strategy more often, update it with changing nature of the project, process and priority.

In this post, I will share best practices to look for test automation strategy, best practices to follow during test automation.

Long Term Automation Strategy

Most important mistake is vision & expectations from test automation. Once you are clear with set of expectations and long term vision then things will automatically fall into place. So, your automation test strategy should create having these two factors always in mind.

Now, ensure vision & expectations are measurable, we should be able to evaluate our progress in timely manner so bring those factors into your test strategy – for example, tentative number of runs required in different phases, rough timelines for the same, phased wise development with respect to project priority & expectations.

Decide what to automate

Goal of automation is to save time, improve productivity and catch bugs. Ensure you are clear with scope and book of work. It is important to decide test cases based on project priority, stability and keeping in mind all upcoming changes or at least key changes with respect to core functionality. This will help us to avoid maintenance and re-work. Also ensure automation timelines are aligned with project timelines. Ideally, automation should be part of project sprint but if not then at least timelines should be aligned to avoid other issues.

Do consider other factors apart from only UI Automation

I see one of the big mistake most of the test automation project ended up having is only UI automation as a main focus.

UI Automation is an important part for any test automation but one should not rely on only UI automation.

Automated API testing, Unit testing are equally important at different stages of the development. It is always best to define priority for your test cases and then choose which test cases can be qualified for UI automation. It is advisable to have high level test case automated for GUI automation. API automation is very important, they are faster compare to UI tests and so they should be used to run before UI tests. API automation will give faster feedback, catch defects early, and inform you about build stability which will help to save huge cost for overall testing. It is also important to do things right first time itself, Unit testing is mostly ignored but it is the key for overall success so ensure to have it as a best practice.

Invest in framework and automation tool

It is always recommended to have a POC before jumping in to tools or automation framework. Test automation framework is not one day job, it requires thorough planning, skills and time. Framework should be flexible, adaptable and secure. Goal of automation is to create test cases faster, so ensure test case writing is simple. Best practices should be part of framework itself. Well, to name a few, versioning control, code review, Traceability matrix, CI-CD, Virtualization, logs, screenshots, mocking, modular approach, parallel execution, TDD, BDD, test reporting, Integration with defect tracking tool and test case management should be part of any basic framework.

Consult with the Expert for automation approach & strategy

It is always good to consult with a subject matter expert. Sometimes, companies with a limited budget may ignore this step but for long term vision and better strategy it is always good to have an expert opinion. Nowadays lots of tools, features are coming for test automation, different project suits different types considering scope, capabilities, time and budget, so plan wisely before you jump for one tool.

Follow automation best practices

No matter how good the strategy, results will be better if you follow best practices for test automation.

Try to have a modular approach, test cases should be independent and self-contained, use data driven testing, code review should be part of process, clean up modules are important to ensure environment is clean, exception handling is an important part for catching surprise errors and exceptions, you should be able to run tests on different environment without changing the code, avoid hard coded code, use dynamic variables and so on. It is always good to have an expert automation engineer in your team so that someone can track the progress and follow all best practices.

Summary

Plan well, invest your time and have patience. Automation testing takes time, practice and experience to get it right.

Re-visit your test automation strategy, learn from the mistakes and most importantly keep learning and evolving your framework.

98 views
bottom of page