question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write HTML reports to .lighthouseci folder during collect

See original GitHub issue

I’m attempting to replace a custom lighthouse test configuration with lhci. I’m not getting HTML output in .lighthouseci, only json. I’ve attempted to define the lighthouse settings in lighthouserc.json:

{
  "ci": {
    "collect": {
      "settings": {
        "output": ["html"],
        "skipAudits": ["is-cralwable"],
        "useThrottling": "true",
        "onlyCategories": [
            "performance",
            "accessibility",
            "best-practices",
            "seo"
        ]
    },

...

And also pointing to the original configuration file:

{
  "ci": {
    "collect": {
      "settings": {
        "configPath": "./tests/lighthouse/lighthouse-config.js"
    },

...

with lighthouse-config.js containing:

module.exports = {
    extends: 'lighthouse:default',
    settings: {
        output: ['html'],
        skipAudits: ['is-cralwable'],
        useThrottling: true,
        onlyCategories: [
            'performance',
            'accessibility',
            'best-practices',
            'seo'
        ],
    },
}

Does LHCI not allow for HTML result pages, or am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
patrickhulcecommented, Dec 4, 2019

It was just a proposal, we’ll just write the HTML reports to .lighthouseci for now unless there becomes more demand for a filesystem target.

0reactions
alexfornutocommented, Dec 4, 2019

Is filesystem currently a valid target for upload, or are you suggesting that as a solution? The docs don’t indicate it as an option currently.

I agree that writing HTML reports into .lighthouseci is good enough for me. If you wanted to implement filesystem as a target for upload, a possible advantage would be defining a target artifact directory, instead of having to move/point from/to .lighthouseci in the CI system config. Up to you if that’s worth the effort.

Thanks for your attention to this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance monitoring with Lighthouse CI - web.dev
A single Lighthouse report provides a snapshot of a web page's performance at the time that it is run; Lighthouse CI shows how...
Read more >
Continuous Performance Analysis with Lighthouse CI and ...
In this article, we'll go over how to set up Lighthouse CI and run it ... Opens the HTML reports of collected runs...
Read more >
An Introduction To Running Lighthouse Programmatically
This article contains a brief introduction to Lighthouse, discusses the advantages of running it programmatically, and walks through a basic ...
Read more >
Measure the performance of a web application with ... - Medium
The second step is configuring Lighthouse CI, to do this you need to create a new file called lighthouserc.js in the root folder...
Read more >
Testing static sites with Lighthouse CI and GitHub Actions
By default Lighthouse CI will run tests against every HTML file in that folder so we are also specifying that we just want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found