Repository navigation
Test/wait for http characterization - #5436
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the HTTP wait characterization tests and shared fixture changes.
No open issues 🎉
What changed in this PR
Adds characterization tests for the existing Wait For Request and Wait For Response behavior, preparing for #5119 without changing the keywords themselves.
Changes:
- Covers legacy JSON parsing, response metadata, body chunking, and empty or unreadable bodies.
- Adds acceptance checks for binary-to-text decoding and JSON responses served as plain text, while allowing additive request metadata.
- Centralizes the mocked gRPC channel fixture for reuse across Python tests.
| File | Description |
|---|---|
utest/test_wait_for_http.py |
Adds Python coverage for response parsing, metadata, and nested request data. |
utest/test_failed_page.py |
Reuses the shared gRPC channel fixture. |
utest/conftest.py |
Introduces the shared gRPC channel fixture. |
node/playwright-wrapper/__tests__/network.test.ts |
Covers request parsing and response serialization, chunking, and read failures. |
node/dynamic-test-app/src/server.ts |
Adds a JSON-as-text endpoint and deterministic binary response bytes. |
atest/test/05_JS_Tests/http_with_waiting.robot |
Checks legacy binary decoding and content-type-independent JSON parsing. |
atest/test/03_Waiting/wait_for_http.robot |
Verifies required request keys without rejecting additional metadata. |
Review effort: Balanced
…onse Characterization tests for the behaviour that #5119 keeps backwards compatible, before the keywords are enriched: - utest: body parsing in Wait For Response (JSON parsed regardless of content type, scalars, chunk joining, empty and unreadable bodies, nested postData parsed only with a JSON content type) - Jest: waitForResponse metadata, body transfer and chunking; JSON postData parsed regardless of content type in waitForRequest - atest: JSON body served as text/plain is returned parsed Fixes two weak acceptance tests: the binary response test compared two equally mangled bodies of a single byte and now asserts the UTF-8 decoded PNG signature, and the request key count no longer blocks additive keys.
- The waitForResponse metadata test uses toMatchObject, so new keys planned in #5119 do not break it while existing keys stay locked. - The gRPC channel stub moves to a shared stub_grpc_channel fixture in utest/conftest.py, used by test_failed_page.py and test_wait_for_http.py. - makeMockPage accepts a waitForResponse override instead of a separate pageResponding helper.
Snooz82
force-pushed
the
test/wait-for-http-characterization
branch
from
November 1, 2026 22:04
bd1f6c6 to
534768d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just improved the tests for
Wait For RequestandWait For Responseto prepare #5119