Click to learn more about author Drew Horn.
This is the conclusion of a three-part series on introducing and building test automation into your application development and deployment pipeline.
In part one and part two of this series, we outlined how to get started with test automation. In part three, we’ll conclude with what it takes to achieve an advanced level of maturity in your automation practice.
We’ve acknowledged throughout this series that the end goal of test automation is to enable frictionless, continuous testing in a high-throughput deployment pipeline. As you move from the beginner to intermediate stages of test automation, you should see a slow and steady increase in efficiency and release velocity. Yet, following a templated approach to test automation will only take you so far.
The expert stage of test automation focuses on continuous optimization. More precisely, this phase is about looking at your existing process, collecting data, and analyzing that data to derive quality insights. With insights in hand, you are able to advance your practice and continuously measure the improvements as part of a repeating cycle. There are three key steps to realize continuous optimization.
Step #1: Do Just Enough Testing at Each Phase of Deployment
To enable successful continuous optimization, you should first take a step back to ensure you are doing the correct amount of testing at each stage of your deployment process. How much unit and initial integration testing are you doing? How many smoke and sanity tests are running sooner rather than later to ensure which builds are stable, and which warrant additional downstream testing? When are you running your regression tests and your later-stage manual tests? Where does your non-functional or other costly testing fit in your pipeline?
It is imperative to analyze your pipeline and verify you are doing just enough testing at each stage as it allows you to pause if you have an issue at a specific stage. This testing method is really the first step of continuous optimization because it is both cost effective and establishes multiple, measurable milestones in your testing pipeline. If you extend the process and tests incrementally, you can start collecting data at every individual stage. Validate you have quantifiable quality gates at each of these stages to help identify which measurements to take during the testing process.
Step #2: Collecting Metadata About Your Testing Process
At each phase of testing, think about what data you can collect and feed into a repository so you can mine it later. Focus on at least these key questions while you are implementing your metadata collection strategy:
- What stage of the testing process are we looking at?
- What build or milestone is under test?
- How many tests were run?
- How long did each test take?
- What platforms were tested on?
- Which tests passed and which ones failed?
- Is the ratio of passed-to-failed tests acceptable for that particular quality gate?
- How long is it taking to triage automated test failures?
- Was the build kicked back or is the deployment process continuing?
- What bugs were associated with this build?
Collecting test metadata that answers questions like these at each phase allows teams to compile substantial insights in the future, especially when munging this data with data from other teams (e.g. engineering, marketing, etc.).
Step #3: Making Data-Driven Decisions
Now that you have collected data about your testing process, you can review and analyze it with the help of tools like Splunk or Domo.
Putting your data into a dashboard enables you to actually do something with it. You might, for example, review the data and conclude that a subset of your automated tests are not providing your team with the right value. This is a regular circumstance – where a select number of complex tests have been automated, but did not run reliably. By collecting the data described above, you should be able to measure the impact such unreliable tests are having on your release process. You may instead try adding those tests to the manual suite and then measuring how that improves your test times.
To take things a step further, you can also integrate data from other departments into your insights to further polish your testing strategy. For instance, you might consider munging development code coverage data into your quality decisions. This can help you literally visualize what your testing triangle looks like. Moreover, think about incorporating marketing insights into your datasets to cross reference real-time customer usage data with your testing strategy. Your customers’ usage patterns will evolve over time as your application matures with new features and functionality. It is critical to closely monitor how those usage patterns change so that you can quickly and continuously adjust your testing strategy accordingly.
Remember that improving your automation practice is an ongoing process. There are always adjustments that can be made, more that can be done. Abiding by these steps, while assimilating the lessons you’ve learned along the way, will enable you to continually optimize and perfect your automation practice.