Lighthouse Service
A WebdriverIO service that allows you to run accessibility and performance tests with Google Lighthouse.
Note: this service currently only supports tests running on Google Chrome or Chromium! Given that most cloud vendors don't expose access to the Chrome DevTools Protocol this service also usually only works when running tests locally or through a Selenium Grid v4 or higher.
Installation
The easiest way is to keep @wdio/lighthouse-service
as a dev dependency in your package.json
, via:
npm install @wdio/lighthouse-service --save-dev
Instructions on how to install WebdriverIO
can be found here.
Configuration
In order to use the service you just need to add the service to your service list in your wdio.conf.js
, like:
// wdio.conf.js
export const config = {
// ...
services: ['lighthouse'],
// ...
};
Usage
The @wdio/lighthouse-service
allows you to run Google Lighthouse accessibility and performance tests through WebdriverIO.