Skip to main content

View Lighthouse Performance Metrics Using Online Selenium Grid

LambdaTest now integrates Lighthouse to view the performance metrics (Lighthouse Audits) on its online cloud based Selenium Grid. You can now view the scores of:

  • Performance,
  • Accessibility,
  • Best Practices,
  • SEO, and
  • Progressive Web App

metrics with the help of LambdaTest. LambdaTest also allows you to perform cross-browser testing on 2000+ combinations of real devices, browsers and operating systems.

Note: As of now, LambdaTest supports Lighthouse for all Windows OS, along with macOS BigSur, macOS Mojave, and macOS Catalina.


You will need a LambdaTest account to run your tests on its cloud based online Selenium Grid. Use your:

  • LambdaTest Username
  • LambdaTest Access Key

to run your tests on LambdaTest and view the Lighthouse performance metrics.

How To Include Lighthouse Performance Metrics In Selenium Automation?#

You can easily add the lighthouse performance metrics of the website you want to test, using the Desired Capabilities. Use the Performance feature of the Desired Capabily Generator in order to do so.

For example, if you are using TestNG for Selenium Automation on LambdaTest, you can include the lighthouse performance feature with the help of below code snippet:

DesiredCapabilities caps = new DesiredCapabilities();..
// To view performance metricscaps.setCapability("performance", true);

Below is the code snippet to trigger the Lighthouse performance metrics on LambdaTest in MacOS Catalina with Google Chrome browser version 86.0.

DesiredCapabilities caps = new DesiredCapabilities();    caps.setCapability("browser", "Chrome");    caps.setCapability("version", "86");    caps.setCapability("platform", "MacOS Catalina");    caps.setCapability("build", "Lighthouse Performance Demo");    caps.setCapability("name", "TestNG Test 3");    caps.setCapability("network", true);    caps.setCapability("visual", true);     caps.setCapability("video", true);    caps.setCapability("console", true);    caps.setCapability("selenium_version", "4");        // To view performance metrics    caps.setCapability("performance", true);

How To View Lighthouse Performance On LambdaTest?#

Once you have run your selenium automation tests on LambdaTest platform, you can view the Lighthouse performance metrics on the website under test. Follow the below steps to view the Lighthouse performance metrics on LambdaTest platform:

  1. Go to the Automation Dashboard. Here you can see your recently executed Selenium automation tests. For this demo purpose, we have used a sample TestNG script, from this GitHub repository.
  1. Click on the test which in which you have activated the Lighthouse performance feature, as shown above.
  1. Click on the Performance tab.
  1. You can see the Lighthouse performance metrics on your screen now, for the website under test. For example, in the below image, the website under test is, which we have used for our demo purpose.
  1. Click on any of the metrics to know about it in detail, along with the individual factors score. For example, upon clicking on Performance metric, its details gets open.

Similarly, you can click on any performance metrics to view it in detail. Not only this, but LambdaTest also helps you view the Passed Audits, individual metrics, detailed diagnosis, and improvement opportunities about that particular Lighthouse Audit.

That's it folks! That's all about the Lighthouse Performance Metrics with LambdaTest. You can read more about the Lighthouse Audits and Performace Metrics from here. If you have any doubt or questions, feel free to contact our experts at 24/7 chat support or mail us at [email protected]. Happy testing! :)

Last updated on