Tips and tricks Best practice guides, FAQ & more
Automation is a prerequisite for success with DevOps. Especially test automation is a key ingredient when it comes to providing fast and accurate feedback to testers and developers enabling quick reactions to errors, bugs, and changing requirements.
DevOps—the practice of bridging software development and software operations—is a means to releasing high quality software into production.
DevOps personnel facilitate collaboration and transparency between the different roles involved in the production of software: Development, Testing, and Operations. This includes defining the release pipeline, building or adopting the right tools for the team, and—perhaps most importantly—automating as much of the release pipeline as possible.
The backbone of DevOps is the definition of the release pipeline. A release pipeline consists of various phases and checks (gates) that a piece of code or software must pass through as it travels from the individual developer’s computer into production. The pipeline is typically controlled by an “orchestrator” ensuring that things happen in the right order and the right checks are made between phases.
Examples of pipeline orchestrators include Jenkins, Atlassian Bamboo, TFS/VSTO, and TeamCity.
As illustrated in the figure below, a release pipeline typically includes:
To meet the requirements of a Continuous Delivery pipeline, automated functional UI testing is crucial.
But how do you integrate automated testing in a release pipeline?
A common mistake when implementing automation is to settle for a tool that is not a good fit for the release pipeline. A pipeline should dictate the tool—not the other way around.
With the right setup, a test automation platform can be integrated with the release pipeline at several stages serving multiple purposes.
Below are three examples of stages within the release pipeline where you can and should use test automation.
This is the primary and most common target for automation; “classic” regression testing in a relatively stable test environment.
Automated regression tests can be triggered from the pipeline orchestrator or simply run on a scheduled basis as needed.
The second area where test automation can support DevOps is to run a small, select set of test cases against CI servers. This will help answer the question: “Is the latest build from the CI servers testable?” In other words, is this build ready to be moved to the Test environment and worth spending actual tester resources on?
This verification exercise provides developers with fast feedback in addition to running unit and integration tests.
The third and final application of test automation in the release pipeline is to verify single elements or parts of the software in a Production environment.
The test cases running against Production should be non-intrusive, meaning that they shouldn’t leave any traces or interfere with the main purpose of the software. Instead, this kind of verification is intended for catching issues such as unwanted outages, malfunctions, etc. before users of the software experience them.
These three examples of how to utilize automatedtesting in a DevOps setup is shown in the figure below.
From a DevOps perspective, the next step is to look at the requirements for your platform for automation of functional UI tests.
In this respect, there are three things in particular that you should look for:
The underlying vision of the Leapwork Automation Platform is based on the idea of the DevOps-pipeline.
The Leapwork Automation Platform comes with a comprehensive public REST API allowing third party systems to trigger collections of test cases and retrieve a well-formatted response. Native plugins for the most common pipeline orchestrators (Jenkins, Atlassian Bamboo, TFS/VSTO, TeamCity, and more) are also available for Leapwork.
All of this makes it very easy to include test automation as part of a release pipeline.
Do you want to learn more about how to ensure rapid feedback across the CI/CD pipeline through shared automation ownership? Then download the whitepaper: