In the realm of software testing, Quality Assurance (QA) Automation and Performance (Perf) testing have traditionally been divided into two distinct teams. This separation comes from their primary focus areas—functional correctness and system performance under load, respectively. It continued to be a main direction since the last decades of years until Agile came into play and discovered many issues with traditional approaches (both technical and resource efficiency). And eventually a closer examination revealed that there have been significant overlaps in methodologies and tools used by functional automation and non-functional (performance testing). This provides a great level of flexibility and an opportunity for integration.
This white paper explores the potential benefits and challenges of merging these teams and using common scripts for both functional and performance testing.
A detailed examination of the tools and methods employed by both QA Automation and Performance testing reveals substantial overlap, suggesting that much of the groundwork laid for functional testing can be repurposed for performance testing, and vice versa. This overlap provides a foundation for integration, where shared resources and tools can lead to greater efficiency and adaptability in handling testing requirements.
Test automation strategy makes a perfect example, because this is the first step both in functional and performance testing. For those that were part of both worlds it clear enough that they share many design steps:
Does that look familiar? Then the obvious question is why not to use the same framework and approach for both of them.
The idea of merging both testing strategies into a single framework is to leverage the strengths of each to overcome the other’s weaknesses. A unified approach allows for more comprehensive testing that covers both the internal workings and the user-facing elements of an application, potentially leading to more robust and reliable software development. Here are the main benefits:
There are several tools on the market (free and paid) that offer varying degrees of flexibility for running tests either as functional checks or under load/stress conditions. They allow you to build an automation framework that would be used for developing the same test scripts for multiple purposes. Here is a few of them that we successfully used for multiple customers to build robust unified frameworks:
An interesting example would be a combination of Artillery engine with Playwright framework to create a test to run as a functional UI test and as load tests with real browsers. Ever wished you could run load tests with real browsers? Well, now you can.
Let’s create a test using Playwright to interact with the UI (flow.js):
To run it as a functional can be done directly from the command line using Node.js:
To run it as a performance load test, we need to integrate with Artillery engine. It onlyrequires an Artillery configuration file named config.yml that references the flow.js script:
Where the phases section:
This part defines the workload model for the test, detailing how the virtual users (VUs) will be generated over time.
And to run it:
Even though the article only scratches the surface (we haven’t covered CI/CD, structure of unified library, infrastructure considerations, etc), the example provided demonstrates the practical advantages of building a unified test automation strategy. It’s a promising approach that can lead to more streamlined, efficient, and effective testing processes. We have been successfully applying this strategy for several customers. And given that organizations continue to seek faster development cycles and higher quality products, the integration of functional and non-functional testing into a cohesive framework will likely become a more prevalent and recommended practice.
Download pdf file