Serenity/JS with Playwright Test
Home > API Testing > JSON placeholder /todos should retrieve a todo item by id
Report generated 30-04-2024 20:20

API Testing

  API Testing (feature)   Webkit 17.4 (browser)   Retried   1 To 10 Seconds (Duration)   Linux 6.5.0-1018-Azure (platform)

JSON Placeholder /todos should retrieve a todo item by id
Steps Outcome
Alice sends a GET request to '/todos/1'

Response

URL: https://jsonplaceholder.typicode.com/todos/1

Status code: 200

Request Headers

Accept: application/json, text/plain, */*
User-Agent: axios/1.6.8
Accept-Encoding: gzip, compress, deflate, br

Response Headers

date: Tue, 30 Apr 2024 20:20:18 GMT
content-type: application/json; charset=utf-8
transfer-encoding: chunked
connection: close
report-to: {"group":"heroku-nel","max_age":3600,"endpoints":[{"url":"https://nel.heroku.com/reports?ts=1714466121&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ljC2ALiksTNUKDFM9ODfYCiiqfLMHPPVkgCPM5deAbI%3D"}]}
reporting-endpoints: heroku-nel=https://nel.heroku.com/reports?ts=1714466121&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=ljC2ALiksTNUKDFM9ODfYCiiqfLMHPPVkgCPM5deAbI%3D
nel: {"report_to":"heroku-nel","max_age":3600,"success_fraction":0.005,"failure_fraction":0.05,"response_headers":["Via"]}
x-powered-by: Express
x-ratelimit-limit: 1000
x-ratelimit-remaining: 999
x-ratelimit-reset: 1714466163
vary: Origin, Accept-Encoding
access-control-allow-credentials: true
cache-control: max-age=43200
pragma: no-cache
expires: -1
x-content-type-options: nosniff
etag: W/"53-hfEnumeNh6YirfjyjaujcOPPT+s"
via: 1.1 vegur
cf-cache-status: HIT
age: 13487
server: cloudflare
cf-ray: 87ca3b4cfa719452-SJC
alt-svc: h3=":443"; ma=86400

Response Body

{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
SUCCESS 087ms
Alice ensures that the status of the last response does equal 200
SUCCESS 002ms
Alice ensures that <<the body of the last response>>.id does equal 1
SUCCESS
SUCCESS 2.33s
Serenity BDD version 4.1.6