grafana / xk6-browser

k6 extension that adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol
https://grafana.com/docs/k6/latest/javascript-api/k6-experimental/browser/
GNU Affero General Public License v3.0
337 stars 42 forks source link

possibility to collect network requests and its details which are being triggered in browser while running k6 browser performance tests #1079

Open saudixit opened 10 months ago

saudixit commented 10 months ago

Feature Description

Like puppeteer supports , there should be a possibility to collect the details related to API, AJAX requests which are being triggered during browser test interaction.

Currently K6 browser performance tests provides average summary of network request which doesnt give much information about which Network request took how much time.

With the above feature request user will have possibility to capture the individual requests which are being triggered during browser interaction

Suggested Solution (optional)

like puppeteer or cypress framework if framework can provide way to monitor all the network request from browser

Already existing or connected issues / PRs (optional)

No response

ankur22 commented 10 months ago

Hi @saudixit,

From what I understand you would like the browser module to measure all http requests that chrome makes when the browser module navigates to a page. The browser module measures the following for each http request that chrome makes after navigating to a page and while the test runs on the page:

Which other measurements are you looking for when chrome makes these http requests?

Currently K6 browser performance tests provides average summary of network request

How are you currently displaying the http results after your test runs?

saudixit commented 10 months ago

Hi @ankur22 , Currently K6 browser performance tests result summary provides average browser request duration through browser_http_req_duration this parameter. We would like to have a req -response duration for each individual requests which are being made while browser interaction and this will help us to understand the bottlenecks from API server while running through browser. With current setup we are not able to find which request took how much time.

ankur22 commented 10 months ago

Hi @saudixit,

Can you take a look at the following two comments and add anything that might be missing for your requirements in https://github.com/grafana/xk6-browser/issues/1081?:

  1. https://github.com/grafana/xk6-browser/issues/1081#issuecomment-1782979045
  2. https://github.com/grafana/xk6-browser/issues/1081#issuecomment-1783678280