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

API Testing

  API Testing (feature)   Retried   1 To 10 Seconds (Duration)   Webkit 18.0 (browser)   Linux 6.8.0-1014-Azure (platform)

JSON Placeholder /todos should retrieve a todo item by id
 

Cast

 

Alice can:
  • PerformActivities (PerformActivitiesAsPlaywrightSteps)
  • AnswerQuestions
  • RaiseErrors
  • ScheduleWork { scheduler: { clock: { timeAdjustment: { milliseconds: 0 } }, interactionTimeout: { milliseconds: 5000 } } }
  • BrowseTheWeb (BrowseTheWebWithPlaywright)
  • TakeNotes { notepad: {} }
  • CallAnApi { baseURL: "https://jsonplaceholder.typicode.com", headers: { common: { Accept: "application/json, text/plain, */*" } }, timeout: 10000 }
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.7.7
Accept-Encoding: gzip, compress, deflate, br

Response Headers

date: Fri, 20 Sep 2024 22:06:54 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=1721153529&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=qap423zj6b0IdkSTqS0Yj41iNrX5a0KLUbbjVsp04No%3D"}]}
reporting-endpoints: heroku-nel=https://nel.heroku.com/reports?ts=1721153529&sid=e11707d5-02a7-43ef-b45e-2cf4d2036f7d&s=qap423zj6b0IdkSTqS0Yj41iNrX5a0KLUbbjVsp04No%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: 1721153554
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: 13887
server: cloudflare
cf-ray: 8c652014bed6c9a0-IAD

Response Body

{
"userId": 1,
"id": 1,
"title": "delectus aut autem",
"completed": false
}
SUCCESS 099ms
Alice ensures that the status of the last response does equal 200
SUCCESS 002ms
Alice ensures that 1 does equal 1
SUCCESS 002ms
SUCCESS 2.38s
Serenity BDD version 4.1.20