What news from AWS re:Invent last week will have the most impact on you?
Amazon Q, an AI chatbot for explaining how AWS works.
Super-fast S3 Express storage.
New Graviton 4 processor instances.
Emily Freeman leaving AWS.
I don't use AWS, so none of this will affect me.
Frontend Development / Software Development

How User Interface Testing Can Fit into the CI/CD Pipeline

Using CI/CD to run automated UI tests as part of the build process requires carefully picking the tools, strategies, and tests to run in the pipeline.
Sep 13th, 2022 10:00am by
Featued image for: How User Interface Testing Can Fit into the CI/CD Pipeline
Feature image via Pixabay.

Testing plays a vital role in the software delivery cycle. UI testing in the continuous integration and continuous delivery (CI/CD) pipeline helps balance delivery speed and test coverage. So does UI testing really fit into CI/CD at all? And what tests should developers have in place without slowing down their pipelines?

Below are ways developers can be more efficient while scaling their testing operations without compromising the quality of the project.

UI Testing in the Pipeline

Ramiro Millan
Ramiro is an automation testing strategist and has over 20 years of experience in software development, QA and management. He has worked with small startups and large multinational enterprises. Ramiro has spent over a decade at Telerik and Progress in roles including product management, sales engineering, testing product leadership, and as recently as 2017, leading professional services for DevTools and for Sitefinity. Ramiro currently leads Progress’ automated testing solutions division.

CI/CD is not a one-size-fits-all solution. Using CI/CD to run automated UI tests as part of the build process requires carefully picking the tools, strategies, and tests to run in the pipeline. It requires a cultural shift in every organization, especially the ones that still practice entirely manual UI testing. The main blockers preventing teams from successfully bringing UI testing into CI/CD include:

  • Lack of skills in the team to automate testing and integrate it
  • Lack of capacity and infrastructure to support testing and maintain test automation
  • Tests are not stable enough and are mostly manual

Dealing with these is key for a successful transition from manual to automated in-pipeline tests. While lack of skills and capacity is a matter of investment in training and infrastructure, unstable and manual testing is anchored in the selection of appropriate tooling to support the introduction of automated testing even for less-technical QAs.

Why CI/CD?

The goal is to accelerate the CI/CD pipeline and have a healthy application when it is deployed. Automation ensures a level playing field for everyone on the team including testing. The automation environment incorporates source control, bug tracking, build integrations, test results and remote test execution. Developers aren’t the only ones involved in the process because an agile environment requires collaboration between several departments, including testing.

The tooling and technology make the learning curve easier to reach for DevOps, QA, IT and engineering teams. Success relies on the collaborative agile mindset rather than the traditional waterfall review process which can hinder the application development and slow the pipeline down. The moment an app publishes, decay is imminent because browsers need updates, especially for security. Developers then start pushing updates immediately and because organizations want to provide quality standards for their customers, critical updates need to come fast.

How to Make UI Testing Efficient Enough to Fit into CI/CD

Reliance on manual testing is why organizations can’t successfully implement CI/CD. If CI/CD involves manual processes that cannot be sustained as it slows down the entire delivery cycle. Testing is no longer the sole responsibility of developers or testers only and it takes investment and integration in infrastructure. Developer teams need to focus on building the coverage that is essential. They should focus on testing workflows and not features to be more efficient. Additionally, manual testers who are not developers can still be part of the process, provided that they use a testing tool that gives them the required automation capabilities in a low code environment. For example, with Telerik Test Studio, a manual tester can create an automated test by interacting with the application’s UI in a browser. That test can be presented in a way without code and as a result, they can learn how the code behaves.

Another best practice in making UI testing efficient is to be selective with what is included in the pipeline. Automated UI tests can be very complex and last up to three hours and there can be too much room for error. That is not ideal as it will slow down the CI/CD cycles.

When effectively managed though, some tests can be automated to run in 3-5 minutes and done on a weekly basis. This includes basic smoke tests, regression tests and acceptance tests, verifying the quality of critical app functionality such as login, payment, checkout etc.

Such tests won’t cause further delivery delays and will at the same time ensure the quality and experience end-users are looking for. Developers can then focus on reliability if they are not constantly rebuilding and maintaining tests. CI/CD allows for automation flexibility and containerized in-sprint testing.

How to Design Robust, Non-Brittle Automated Tests and Speed up Test Execution

Automating in-sprint means collaboration with the dev team. Ideally, testing and development should be happening at the same time and automation helps with the test sprint. However, not all UI tests qualify for CI/CD and pipeline build tests are different than a full visual end-to-end test cycle. They need to be fast, stable, business-critical and headless. Headless testing saves time because there is no UI, it’s faster and it can be easily multiplied and scaled.

Accessibility is also an important aspect in the design testing process and should be a priority for designers, developers and testers. For example, applications should be able to have color contrast and capabilities for zooming in and out of texts. Only core functionality and critical aspects should be tested in the pipeline and this can include cosmetic tests that are functional. Long cosmetic tests with a lot of visual verification such as logos, videos, font, and images are hard to sustain for scheduled in-pipeline tests.

Implementing Tests into the CI/CD

Cracking automated testing is difficult even for the best testing experts. These tips will help teams set up CI/CD environments to run tests, prioritize testing efforts within their build process, and design on-schedule testing strategies for their regression suites. Test stability and reliability, fewer duplications, speed, and reduced maintenance are the critical criteria that define the success of continuous testing.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.