The approach for Jankiness measurement is slightly different than the one for Page Load Performance. To get a sense of the smoothness of the page we need to interact with it. A common user interaction where jankiness is exposed to users is when one is scrolling in the application. In order to make the perceived performance testable we created a custom command that you can use independently from the framework you use. The command executes a set of automation actions:
- It jumps to the top of the back
- It then scrolls slowly from the top to the bottom for ~5 seconds
- It captures the browser activity for the time it was scrolling through the app
- Based on this browser activity it generates the metrics you can use to assert the performance
Enterprise Plans Only
This feature is available for Enterprise plans only. For more information about other benefits that are included with Enterprise plans, check out our Pricing page.
This feature is available only for testing web applications with the Google Chrome browser.
The custom command is a WebDriver extension that can be used with any framework like Selenium or WebdriverIO. If the framework doesn't support it natively you can always use the JS Executor to call the command:
The result object contains the url that you are currently visiting, the overall performance score, and detailed metric information:
We recommend asserting against the overall Jankiness Score as it offers a general idea of how smooth the website behaved. You can then assert against the value to ensure it doesn't go below a minimum value:
You can find an example script to play around with in our samples repository.