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
Feature Request: Add Support for page.on('request'), page.route(), and CDP Access in k6 Browser Module
Description:
There is a need for enhanced functionality in the k6 browser module. Specifically, methods like page.on('request') and page.route() used in Playwright/Puppeteer are not available. Additionally, the k6 browser module doesn’t expose Chrome DevTools Protocol (CDP) sessions, limiting our ability to intercept network traffic.
Proposed Features:
Add Support for page.on('request'):
Enable event listeners for network requests similar to Playwright/Puppeteer.
Example use case: Logging or manipulating request/response headers.
Add Support for page.route():
Enable request interception and the ability to mock responses or alter requests.
Example use case: Testing application behavior under different network conditions or simulating specific API responses.
Expose CDP Sessions:
Provide access to Chrome DevTools Protocol (CDP) sessions.
Example use case: Intercepting network traffic, gathering performance metrics, or accessing detailed browser logs.
Use Cases:
Enhanced Network Interception: Intercept network requests and modify them on the fly during load testing, enabling more detailed and specific test scenarios.
Mocking and Simulating Network Conditions: Mock specific API responses or simulate network issues to test the resilience of applications.
Gathering Detailed Metrics: Access performance metrics and browser logs via CDP to gain deeper insights into application performance under load.
Adding these features would align k6's capabilities more closely with existing browser automation tools like Playwright and Puppeteer, providing more comprehensive testing abilities.
Thank you for considering this request.
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered:
@aupadhyay-coursera thanks for opening an issue for these three feature requests that you've mentioned. They all have good use cases and ones which we would like to work on. We can't say when we will get to them but we will keep this issue open until we have a better idea of what the next steps are for this. I am working with the team to get a better answer.
Feature Description
Feature Request: Add Support for
page.on('request')
,page.route()
, and CDP Access in k6 Browser ModuleDescription:
There is a need for enhanced functionality in the k6 browser module. Specifically, methods like
page.on('request')
andpage.route()
used in Playwright/Puppeteer are not available. Additionally, the k6 browser module doesn’t expose Chrome DevTools Protocol (CDP) sessions, limiting our ability to intercept network traffic.Proposed Features:
Add Support for
page.on('request')
:Add Support for
page.route()
:Expose CDP Sessions:
Use Cases:
Adding these features would align k6's capabilities more closely with existing browser automation tools like Playwright and Puppeteer, providing more comprehensive testing abilities.
Thank you for considering this request.
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: