Playwright / Quiz
No Browser Required
APIRequestContext, the request fixture, cookie-sharing hybrids, and setting up test data at API speed instead of UI speed.
- Difficulty
- Medium
- Format
- Quiz
- Points
- 150
- Estimate
- 10 min
// MISSION BRIEF
Your Mission
Not every test deserves a browser. Playwright ships a full HTTP client, the same one that powers its network layer, wired into the test runner as the request fixture.
This quiz covers API testing with APIRequestContext, hybrid UI+API tests that share cookies, and using the API to make UI tests faster and less flaky.
Speed bonus active.
// FIRST CONTACT
Battle teaser
The `request` fixture available in every Playwright test is:
- AThe most recent network request the page made
- BAn APIRequestContext: an HTTP client with get/post/put/delete methods, independent of any browser page
- CA wrapper around Node's http module with no extras
- DOnly available when a browser is NOT launched
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
playwrightapi-testingrequest-contexttypescripte2e-testing