API testing

Send a form-urlencoded body

Medium70 pts~25 min
  • Form encoding
  • Content-Type
Practice app · Acme REST API

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

BASE_URL
/api/practice
Console app
/lab/sdet-send-a-form-urlencoded-body

Your starter code already declares BASE_URL — call the API relative to it.

Objective

Post an HTML-form style body and verify the server parsed it as application/x-www-form-urlencoded.

Your task

  1. 1POST BASE_URL + "/echo" with the form fields name=Ada and role=admin (not JSON).
  2. 2Assert 200 and that body.contentType contains "application/x-www-form-urlencoded".
  3. 3Assert body.body.name === "Ada" and body.body.role === "admin".

Acceptance criteria

  • POST /echo returns 200
  • The request uses a form-urlencoded body
  • At least 3 assertions pass

Fixtures

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

API testing · SDET · Requests & methods