lighthouse-ci
lighthouse-ci copied to clipboard
Custom audit graph not displayed on Lighthouse CI server dashboard
Describe the bug I have created a custom audit that runs fine and I can see the score in each individual report. I am running this custom audit with Lighthouse CI and uploading to a Lighthouse CI server. On the Lighthouse CI server, I can see a new section on the dashboard for my custom audit but instead of a graph, the text "No data available" is displayed.
To Reproduce Steps to reproduce the behavior:
- Create a new audit (in my case including a new gatherer too)
- In the
lighthouserc.js
, set the settingci => collect => settings => configPath
to the path ofcustom-config.js
which extendslighthouse:default
and includes the custom audit with theweight
of1
. - Run Lighthouse CI uploading to a Lighthouse CI server
Expected behavior On the dashboard, in the new section for the custom audit, the score should be displayed on a graph.
Logs/Screenshots
Graph for custom audit is not displayed
The score for the custom audit is available on each individual report
Environment (please complete the following information):
- OS: Windows 10
- Browser: Chrome 92
- Lighthouse CI server: v0.8.0
Additional context I can provide the custom audit files and config file if needed to look into this further.
@JonUK Hi, did you ever figure out a way to do this? I am trying to do the same
@johnpmitsch Unfortunately no I've not found a way to resolve this issue.
Same scenario for me.
Aaarrgh... running into same. Any assistance here, if this is a configuration issue that could be remedied on our end, would be appreciated.
Got it (sorta) working based on comments in #655.
Inside the Docker container, modify /usr/src/lhci/node_modules/@lhci/server/src/api/statistic-definitions.js
to add a line for your category. I added mine just above the performance
one:
'category_<custom-category-name>_median': categoryScoreMedian('<custom-category-name>'),
category_performance_median: categoryScoreMedian('performance'),
Save the file and restart Docker.