Playwright

Seed data through the API

Medium70 pts
  • API Seeding
  • Test Setup
  • Hybrid Testing
Practice app · Acme REST API

A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.

Test URL
/lab/playwright-seed-data-through-the-api

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Seed test data via an API POST request before asserting that the created record is available.

Your Task

  1. 1Send an HTTP POST request to seed a new test item or resource.
  2. 2Assert that the resource was created with a 200 or 201 status code.
  3. 3Verify that the created record can be fetched or referenced in subsequent requests.

Validation Checks

  • Seeds test data via API
  • Status is 200 or 201
  • At least 1 assertion passes

Fixtures

apiKey
tqa_live_key_123
basicUser
admin
basicPassword
secret
username
qa@target.dev
password
Test@123

Playwright · Playwright Practice Track · API testing with Playwright