The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing


External Resources

More Info

Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

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.

Chrome Only

This feature is available only for testing web applications with the Google Chrome browser.

Why Use Sauce Performance?

Front End Performance Testing is a set of tools and practices, addressing the combination of the following three market trends:

  • End-users' expectation for a functional and engaging experience nowadays includes a consistently responsive interaction with the application (beyond perfect functional flow)
  • Modern applications leverage the tremendous evolution in front-end computational power (offered on mobile devices and browsers) to deliver compelling and rich experiences (that do not exclusively rely on backend resources), therefore creating a need to test these front end experiences.
  • Modern development teams include front-end developers, for whom early awareness of performance degradation translates into faster corrective actions and increased developer efficiency, not dissimilar from early functional testing.

Sauce Labs offers a front end performance testing tool that you can use to obtain earlier feedback on your web application responsiveness during the development cycle. This tool is commonly incorporated into your existing CI/CD workflow. 

How Does Front End Performance Testing Work?

Once the feature is enabled for your organization, you can measure the performance of your application. Sauce Labs will begin collecting the performance metrics for URLs that were visited during the test execution. Sauce Labs will assemble these measurements into a historical performance baseline for each page transition. With the baselines are established, performance measurements from subsequent test executions will be compared against these baselines, and a performance report will be established for each URL. An advanced machine learning algorithm will assist in establishing a range around your benchmark when comparing metrics from an executing test, in order to enable detection of true performance degradations. In addition to these metrics, you can also access filmstrips of the page load process and a complete tracing log alongside a set of core user experience metrics.


  • Front end performance testing of soft page transitions (e.g. view changes in Single Page Applications built in React, Angular or Vue.js) is not supported yet. This functionality is part of our roadmap. In the meantime, reload the page or directly navigate to the URL in order to get the performance metrics for that page.
  • The tool supports Chrome browsers, the latest 3 versions. Support for other browsers and mobile devices is on our roadmap.

How Do I Get Started with Sauce Performance?

Choose the workflow that suits you best:

Run your First Performance Tests From the Command Line

Run your first test using our CLI tool (Speedo). Once installed you can run your performance test and it will automatically run jobs on Sauce platforms, set baselines and check the metrics for regressions. Note that this approach supports a single URL measurement, one that is readily accessible. If you require script logic to access the URL, you will need to use the script approach.

1) Install the package on your system and will make the command available.

$ npm install speedo -g

2) The following examples assume that you have SAUCE_USERNAME and SAUCE_ACCESS_KEY exposed in your environment.

If not you can pass them in as command line parameters -u <username> and -k <access key> or export them via:

$ export SAUCE_USERNAME=Slavocado

The simplest way to make use of the Sauce Performance feature is to use the Speedo run command. It accepts the URL of the web page you want to check performance for as parameter and takes care of everything required along the way.

3) Run your first test

$ speedo run <URL>

Capture Performance for Existing WebDriver Tests

WebDriver scripts can be enhanced to capturing front-end performance. You may want to set your starting point by taking an existing test script, and adding specific Sauce Labs capabilities. We provide a set of custom WebDriver commands that allow you to either log or assert against the captured performance metrics.

  1. Include these desired capabilities for tests that are executed on Sauce Labs:
  2. Run tests against the latest versions of Google Chrome.
  3. Once the jobs are complete, you should see a Performance Tab on the Test Details page with the new performance data.

To read more, visit Incorporating Front End Performance Testing into WebDriver Test Scripts.


  • The performance testing tool relies on metrics pertaining to the conclusion of the page loading process. To ensure script stability and collection of the correct measurements, page navigation will be paused until the page loading process is complete. As a result, the typical execution time for scripts enabled for performance testing will be longer compared to the equivalent scripts where performance is not enabled.
  • While your performance testing journey with Sauce may begin from enabling existing functional tests, we recommend considering this practice as separate from functional testing. Scripts, builds, and report examination, as an example, will be somewhat different. To read more about Sauce Labs recommendations and best practices, please read here.

For more information, check out these topics:

  • No labels