Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Get Puppeteer Lighthouse information (a11y, performance, etc) from API #89

Open
coderkind opened this issue Dec 29, 2020 · 1 comment
Open
Labels
api Anything related to the public API browser checks canny enhancement New feature or request

Comments

@coderkind
Copy link

馃挕 For general support requests and bug reports, please go to checklyhq.com/support

Is your feature request related to a problem? Please describe.
You can currently output lots of detailed information related to matters such as accessibility, performance via console.log in Checkly browser JS checks, but it doesn't appear to the possible to retrieve similar information from the API request.

So in a browser check, I can script something like this following a Puppeteer invocation:

const snapshot = await page.accessibility.snapshot();
console.log(JSON.stringify(snapshot, null, 2));

...and see page accessibility information, but you seemingly can't retrieve similar from calling the API. Similarly, you can't invoke Lighthouse and get performance/accessibility information that way, as specifying const lighthouse = require('lighthouse'); at the top of a Puppeteer script produces an error:

Dec 29 00:25:57 - ERROR - UserScript TypeError: Cannot read property 'some' of undefined

Describe the solution you'd like
It would be good if you could add additional page information to the JSON that's served from calling the API (or potentially calling another API endpoint).

Describe alternatives you've considered
None so far (not sure of a way around API limitations).

Additional context
Add any other context or screenshots about the feature request here.

@tnolet tnolet added api Anything related to the public API browser checks enhancement New feature or request DX labels Dec 29, 2020
@tnolet
Copy link
Member

tnolet commented Dec 29, 2020

@coderkind this is great feedback.

  1. exposing the log data through the API is something we can do. Right now we store just an S3 filename in the DB which would not be useful as you can only access it through the API so we would need to expose that in some way.

  2. We do not have the lighthouse lib incorporated in our runner infra yet, but we are working on something there.
    I noticed you found Access to the complete Lighthouse metrics聽#79 already. Please give it a 馃憤 so we can track it

@tnolet tnolet added accepted This issue is accepted for the roadmap and removed accepted This issue is accepted for the roadmap labels Jan 16, 2021
@tnolet tnolet added Data and removed DX labels Nov 10, 2021
@tnolet tnolet removed the Data label Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api Anything related to the public API browser checks canny enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants