Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qavajs/steps-lighthouse
Steps to perform lighthouse audit
https://github.com/qavajs/steps-lighthouse
qa test-automation testing
Last synced: 2 months ago
JSON representation
Steps to perform lighthouse audit
- Host: GitHub
- URL: https://github.com/qavajs/steps-lighthouse
- Owner: qavajs
- License: mit
- Created: 2023-12-06T11:03:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-06T11:14:45.000Z (about 1 year ago)
- Last Synced: 2024-08-08T23:12:29.120Z (6 months ago)
- Topics: qa, test-automation, testing
- Language: TypeScript
- Homepage:
- Size: 93.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @qavajs/steps-lighthouse
Steps to perform lighthouse audit.
Library can work on top of playwright and webdriverio drivers## Installation
`npm install @qavajs/steps-lighthouse`## Configuration
```javascript
module.exports = {
default: {
require: [
'node_modules/@qavajs/steps-wdio/index.js', //corresponding driver library should be imported first
'node_modules/@qavajs/steps-lighthouse/index.js'
],
format: [
['@qavajs/html-formatter', 'report.html']
],
}
}
```## Usage
Module provides `I perform lighthouse audit as save results as {variable}`
step that performs audit, attaches html report and save results as \{variable} variable```gherkin
Feature: LighthouseScenario: perform lighthouse audit
When I open 'https://qavajs.github.io/' url
# with default config
And I perform lighthouse audit and save results as 'lh'
# with provided config https://github.com/GoogleChrome/lighthouse/blob/main/docs/configuration.md
And I perform lighthouse audit and save results as 'lh':
"""
{
"extends": "lighthouse:default",
"settings": {
"formFactor": "desktop",
"screenEmulation": {
"mobile": false,
"width": 1350,
"height": 940,
"deviceScaleFactor": 1,
"disabled": false
}
}
}
"""
```