All of those little things which add up pretty quickly. And yeah, if we don't take a look at this, we will have higher bounce rates, lower user engagement and a negative impact on Search Engine rankings.
So when it comes to performance testing, which is basically the type of testing conducted to evaluate the speed, the responsiveness, stability and scalability of application or website, there are a couple of ways on how you could use this. So when I'm thinking about stuff like load testing, where you have the normally expected user loads to determine its response time, but also stress testing, spike testing, when it comes to load spikes on how to handle it in your application, even stress testing, to try to push your website beyond its normal capacity, there are two aspects of performance testing you could utilise to get a bigger picture of your application's behaviour.
It could be back advice, of course, so the most traditional tools, I don't cover those, at all cost, but I want to focus on another thing, it's the front-end client side here, because we have front-end test automation here by utilising Javascript, but not only that, many people don't remember that most of the load time of a web page is spent in the front-end, as Marie says, I hope you have take a look at her talk, because she's awesome, but monitoring performance in the front-end makes a lot of sense, if most people will notice it in the front-end, and if you think about, okay, how can I monitor front-end audits, front-end metrics, I guess we share one similar thought, and basically the first step we take a look at when it comes to those topics, well, it's evaluating Lighthouse, so Lighthouse is basically the most common tool everyone uses to track front-end performance, and many people use it because it's pretty easy because you can access it via Chrome DevTools.
And I guess when it comes to debugging locally, many of you guys maybe already tried it out, but were you aware that you could automate this? You could use a GitHub Action which is I guess even predefined, but you could use your end-to-end test to keep track of those too. There's a plugin which is called Cypress Audit which provides Lighthouse audits but also Pally audits, but I don't want to focus on accessibility right now because it's I guess enough for the slot here. So Lighthouse it is. So you could use the Cypress Audit for Cypress tasks, there's a Playwright Alternative too, and there you take a look at the typical Lighthouse thresholds. The categories what we use for Lighthouse and provide the score between 0 and 100 in the realm of performance, which is important for us. Accessibility, best practices, SEO and PWA.
And when it comes to what's good and what's not, we could zoom on the performance audit here and we see that everything in between 0 and 49 is bad and probably will influence your ranking. Then everything in between 50 and 89 is something with some some possibilities of improvement and everything above 19 is great and you can see that here right now. And for our part, the performance, there are some interesting metrics named here like first contentful paint and largest contentful paint which are really interesting for us. We will take a closer look because these are the ones we want to take a closer look and we want to act on those. Okay, those two terms were taken from Google's web vitals which are a set of specific metrics that measure the user experience of a website. They focus on three critical aspects of the web performance loading, like how fast something is, interactivity, how fast the application reacts to our input and visual stability. So maybe you already happen to have a mobile page. You are scrolling through it, you want to click something, but it jumps. Yeah, this is something we need to take a look at. And yeah, as said those metrics are by Google and they have implications on the website. So the three core web vitals metrics are first, the largest content for paint, which measures how quickly the main content of a web page looks. It should occur within a 2.5 second or when the page first starts loading. The second one is the first input delay. It measures the time it takes for a web page to become interactive. Should be less than a hundred milliseconds. Last but not least, the cumulative layout shift, which measures the visual stability of a web page by tracking unexpected layout shifts of elements. And it should have a score of less than 0.1. And there are many more metrics, of course, but we will cover the core ones, the core web vitals here. And there is a Cypress Plugin 2, which you could use to monitor the core web vitals through our test automation.
Comments