This repository contains the Lighthouse extension for the AET.
Contents:
- bundle that contains Lighthouse Report Collector and Comparator,
- default configuration,
- AET Report extension for Lighthouse results,
- simple HTTP Server written in NodeJS that provides Web Endpoint to run Lighthouse
This collector requires external Lighthouse instance with Web Endpoint configured.
lighthouseInstanceUri
property in the LighthouseCollectorFactory
should be set to the Web Endpoint under which Lighthouse Server
works.
Expected response is a JSON with specification explained in the Lighthouse Server Endpoint docs.
Module name: lighthouse
No parameters so far.
This comparator is form of a health-check. It base on the Lighthouse report collected by the
AET Lighthouse Collector and compares the results against KPI (see the
parameters section below).
If the difference between Lighthouse scores (from the collector) and any of kpi-
parameter
value is negative and bigger than kpi-threshold
, comparison will end with FAILED
status. E.g.
- Let's set
kpi-performance
to80
andkpi-threshold
to10
.- When the Lighthouse Performance audit score will be
60
that means that our KPI failed and the report will be red. - When the Lighthouse Performance audit score will be
72
that means it fit in the threshold and it will pass.
- When the Lighthouse Performance audit score will be
Module name: lighthouse
Resource name: lighthouse
Parameter | Value | Description | Mandatory |
---|---|---|---|
kpi-threshold |
integer (default: 5 ) |
Accepted difference between kpi values and Lighthouse results |
no |
kpi-performance |
integer (default: 75 ) |
Minimal score for performance KPI. |
no |
kpi-accessibility |
integer (default: 75 ) |
Minimal score for accessibility KPI. |
no |
kpi-best-practices |
integer (default: 75 ) |
Minimal score for best-practices KPI. |
no |
kpi-seo |
integer (default: 75 ) |
Minimal score for seo KPI. |
no |
To use the lighthouse
plugin simply put <lighthouse />
tag in collect
and compare
sections.
Example suite:
<?xml version="1.0" encoding="UTF-8" ?>
<suite name="lighthouse" company="aet" project="lighthouse">
<test name="max-one-url">
<collect>
<lighthouse/>
</collect>
<compare>
<lighthouse kpi-threshold="10"/>
</compare>
<urls>
<url href="https://github.com"/>
</urls>
</test>
</suite>
Yes, you don't need
<open/>
.
Simply run build
task.
The results will be following artifacts:
aet-lighthouse-extension.jar
bundleaet-lighthouse-report.zip
- containing AET Report extension to display Lighthouse findingsaet-lighthouse-config.zip
- containing configs for the moduleaet-lighthouse-server.zip
- containing simple HTTP Server written in NodeJS that runs Lighthouse
ToDo