Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Support generation of HAR for entire test run #119

Open
buildscientist opened this issue Aug 1, 2017 · 5 comments
Open

Support generation of HAR for entire test run #119

buildscientist opened this issue Aug 1, 2017 · 5 comments

Comments

@buildscientist
Copy link

buildscientist commented Aug 1, 2017

Hello,
Love the project - fantastic idea.

Would it possible to modify the API such that a HAR file can be generated after the Chromeless run has completed?

There's a lot of beneficial data in the HAR file - e.g. how long an HTTP request/response cycle took? The format has a full timing based breakdown as well.

Normally the HAR file can be saved via the Chrome web inspector so I'm not sure if that's possible with headless Chrome.

Also not sure if this issue is related to #91 ?

@buildscientist
Copy link
Author

Looks like there is an existing NodeJS tool called chrome-har-capturer that provides an API for doing exactly this with headless Chrome.

@ppcano
Copy link

ppcano commented Aug 9, 2017

@adieuadieu Would you accept a PR for this feature?

A HAR file can be generated after the Chromeless run has completed.

chrome-har-capturer solves the problem but I don't think the library "at the current state" can be reused into this project.

https://github.com/cyrus-and/chrome-har-capturer/blob/master/lib/page.js#L113-#L214

Thoughts?

@adieuadieu
Copy link
Collaborator

Hi @ppcano — yes of course we'd welcome a PR! The challenge with chrome-har-capturer would be figuring out how it best fits (if at all) into Chromeless. Behind the scenes, Chromeless uses the same chrome-remote-interface package that chrome-har-capturer uses, but it doesn't seem like the har-capturer project's API let's you pass in an already existing CDP client..

@skiloop
Copy link
Contributor

skiloop commented Aug 22, 2018

I create a branch to log response here which is not a full har format. And I am not satisfied with it. More work is required.
Any detail about these features?

@aral
Copy link

aral commented Aug 24, 2018

This might be a useful reference (in terms of the events that need to be listened for and use of chrome-har to generate the HAR from those events): puppeteer/puppeteer#1916 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants