Look. This is How To Test For Speed.
More than 83% of people expect a web page to load in three seconds or less.We easily think about features for testing a software, but functionalities can lose their value if the non-functional requirements are not met.
Performance is one of the most important non-functional requirements. The Google web core vitals are now focused on the human perception of speed. These metrics even impact the overall ranking of the site, and in the end, potential users.
Your users expect a fast and reliable user experience. Your responsibility is to ensure these requirements are systematically met. While test automation products can test the features, they fall short on testing requirements of response time.
In this article, you will learn how to test the performance of your application with automated tests. We will rely on Cerberus Testing to stop coding and start testing:
- Define your pages speed requirement
- Configure the required action and control
- Verify and deploy your test in your environment
- Expand your quality with a scalable framework
Let’s start by defining the scope of our tests.
Define your pages speed requirement
Your first priority is to define the pages that will mainly benefit from testing response time. A structured and user-centric approach is to cascade the pages from your most valuable customer journeys.
From that point, you can then work by exclusion. Your pages with the most traffic and impacting the conversion rate are the most important: homepage, products browsing and checkout experience. On the contrary, a page rarely accessed that will load the invoices history is probably less important.
Your next task is to define the speed requirement for each page. That can be done simply in an excel spreadsheet to validate with your product and engineering team. You can even incubate a part of SRE with emerging SLO and SLAs. For example, you can set your checkout page to always load under 2.5 seconds.
You are now ready to set the test case parameters.
Configure the required action and control
The implementation of the controls is done in low-code with Cerberus Testing. For each page you want to test, you have to define one action and one control.
The action “setNetworkTrafficContent” is required to collect the necessary performance data. You can read this article to see how to configure the collector. Cerberus Testing will natively calculate a series of valuable metrics to enable additional verifications.
Then, you need one control on the element holding the total duration “$.stat.internal.time.totalDuration”. To test the response time, we choose a numerical comparison under the value of 2580 ms.
You are now ready to Test for Speed.
Verify and deploy your test in your environment
You can run the test manually for a first run. You just have to use the web interface of Cerberus Testing from the test case or the execution menu.
The test execution will provide native test traceability and reporting. You can see all actions and controls performed with their associated results. Your control on the page load will also start to collect valuable metrics of performance over time.
You can now deploy your test across the software delivery pipeline. You can shift-left by configuring quality gates in CI/CD across your various environments. You can also shift-right by scheduling the test on a regular basis in staging and production.
A ready-to-use framework is what enables you to focus on testing.
Expand your quality with a scalable framework
You are now ready to Test for Speed on the user journeys and pages identified. You can build upon the same structure of action and control on expected response time.
While growing your test suite, you can go further leveraging reusable parameters across tests. You can also activate your tests in different countries. You can complement your production monitoring by running your tests continuously in production.
The best signal of value is when a software change won’t impact the user experience with your automated tests. Your Test for Speed will contribute to a successful product unlocking the truth about continuous testing.
Look. Stop coding and start testing. Now, for free, here.