You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to view the lighthouse report for the failure
So that I can see the exact reason for the failure
Lighthouse supports multiple output formats - this would be --output=[JSON,HTML]
JSON outputs to STDOUT by default - would need to check what it does with HTML output
Ideally we would export the HTML report to a file, while capturing JSON to STDOUT. If we can't do this, we can export both HTML and JSON to a file, and read the file to grab the results. If the audit passes, we can clean up the test artifacts. If the audit fails, we can let the user know where to find the HTML report.
The text was updated successfully, but these errors were encountered:
Confirming that --output json --output html --output-path='lighthouse_results.html' outputs lighthouse_results.report.json and lighthouse_results.report.html - so no STDOUT for JSON anymore, but it would allow us to read the JSON result and discard the files if the audit passes.
RSpec examples have metadata we can use to get information about the test. We should look at how Capybara's save_screenshot gets the filename, since that would be a good one to use.
@robotdana did something like this in #32, which I've since cherry-picked out into another branch as it was useful for debugging - it outputs JSON not HTML, but I think it's probably a good place to start
As a developer
When an audit test fails
I want to be able to view the lighthouse report for the failure
So that I can see the exact reason for the failure
Lighthouse supports multiple output formats - this would be
--output=[JSON,HTML]
JSON outputs to STDOUT by default - would need to check what it does with HTML output
Ideally we would export the HTML report to a file, while capturing JSON to STDOUT. If we can't do this, we can export both HTML and JSON to a file, and read the file to grab the results. If the audit passes, we can clean up the test artifacts. If the audit fails, we can let the user know where to find the HTML report.
The text was updated successfully, but these errors were encountered: