Book demo
Start trial
Book demo
Start trial

The LEAP

Automation insights and productivity tips from LEAPWORK.

All Posts

How to Automate Functional UI Tests in a DevOps World

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 and automation

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.

Defining the release pipeline

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.

Learn more about LEAPWORK integrations with pipeline orchestrators.

As illustrated in the figure below, a release pipeline typically includes:

  • the individual developer environment where the code is generated
  • a build phase where the code is prepared for release using Continuous Integration (CI)
  • a testing phase dedicated to various types of testing, incl. functional UI testing
  • a production environment

Aktiv 45

To meet the requirements of a Continuous Delivery pipeline, automated functional UI testing is crucial. Read the post “How to Achieve Agile Testing by Automating Functional UI Tests” to learn why test automation is vital in this context.

But how do you integrate automated functional UI 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.

How to automate testing across the release pipeline

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:

Regression testing

This is the primary and most common target for automation; “classic” regression testing in a relatively stable test environment. Automated regression tests can be either triggered from the pipeline orchestrator or simply run on a scheduled basis as needed.

Build verification

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.

Non-intrusive verification

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 automated functional UI testing in a DevOps setup is shown in the figure below.

Aktiv 44

DevOps criteria for a test automation platform

So, from a DevOps perspective, which requirements should you be aware of when choosing a platform for automation of functional UI tests?

  • Integration. Make sure the platform is easy to integrate with your pipeline. A tool should come with relevant plugins for the most common pipeline orchestrators and/or well-documented APIs allowing the orchestrator to control the test automation platform.
  • Execution time. In a fully automated pipeline, the time needed for running tests is crucial. If it takes 48 hours to run all test cases, the pipeline is dysfunctional and will not work in practice. Make sure that the test automation platform can scale the execution of test cases to keep run-time at a minimum.
  • Control and flexibility. Successful automation requires a high degree of flexibility without compromising the feeling of being in control of the pipeline. A test automation platform should make it easy to define and execute different collections of test cases,
    • in various environments,
    • for various purposes,
    • and at various times.

For example, some environments are more stable than others, allowing for more frequent testing, while other environments are just used for quick verification and feedback.

The underlying vision of the LEAPWORK Automation Platform is based on the idea of the DevOps-pipeline. We experienced that the lack of a platform that “could take care of everything” was a recurring issue.

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. This makes it very easy to include test automation as part of a release pipeline.CTA-StartTrial-7

Kasper Fehrend
Kasper Fehrend
Senior Product Evangelist at LEAPWORK.

Related Posts

Technical Post: Big Performance Improvement in Data Serialization

Usually, in this blog, we tend to look at the LEAPWORK Automation Platform from a user perspective. We talk about how to automate different kinds of work processes and we also give you a few tips and tricks every now and then. However, we’ve recently made some changes to the core engine, so we thought it would be interesting to look into the engine room for a change. Buckle up because we’re about to get a little technical.

Collaboration in Agile Teams: Codeless Automation For All

In order to improve testing processes and transform them into an efficient and cost-effective part of software development, companies are introducing concepts such as agile, DevOps, or BDD in their teams. The rising adoption of these frameworks is slowly shrinking the gap between IT and business, allowing for more collaboration and continuous delivery. In order to facilitate this collaboration, automation has been brought into play.

Introduction to Behavior Driven Development

In a traditional software development process, developers write programs and build features, and testers then test the written pieces of software. However, businesses are now operating at a faster pace and, therefore, software development needs to keep up with business demands.