Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Experiment: Edit response body #2471

Closed
scottjehl opened this issue Oct 14, 2022 · 2 comments
Closed

Add Experiment: Edit response body #2471

scottjehl opened this issue Oct 14, 2022 · 2 comments
Assignees
Labels
Type: Enhancement An improvement to WebPageTest

Comments

@scottjehl
Copy link
Contributor

This experiment allows you to edit the response of any same-domain file requested in this test. The text in this field will replace the text of the response before it is sent to the browser.

As an initial release, allowing editing the initial request response body is likely the most important one (the HTML).
Ideally, we'd allow one or many of these fields and offer all same domain requests in the select menu.

Proposed Design

image

@scottjehl scottjehl added the Type: Enhancement An improvement to WebPageTest label Oct 14, 2022
@scottjehl scottjehl self-assigned this Oct 14, 2022
@scottjehl
Copy link
Contributor Author

Realized this morning that there's probably a handy way for us to post bigger response body swaps in experiments. Since the form fields post with the experiment, they're written to the test metadata, so I think as long as the experiments worker has the id of the current test, it can fetch that result's json (which won't have much populated in it during the experiment), and get the encoded text that was posted with the experiment for a given request.

Building on that, I think this will be able to work from the start test page too once we move experiments there, but it'll need to be different field types: an freeform input for the request to replace (any substring match should work), and an unpopulated textarea since we won't know the content yet.

scottjehl added a commit that referenced this issue Jan 12, 2023
scottjehl added a commit that referenced this issue Jan 12, 2023
scottjehl added a commit that referenced this issue Jan 27, 2023
Edit Initial Response HTML experiment. #2471
@scottjehl
Copy link
Contributor Author

Merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement An improvement to WebPageTest
Projects
None yet
Development

No branches or pull requests

1 participant