Assert an array length
Medium70 pts~25 min
- Arrays
- Pagination
Practice app · Acme REST API
A live REST + GraphQL API with auth, validation, pagination, rate limiting and an interactive request console.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Assert the size of the items array under different page sizes.
Your task
- 1GET BASE_URL + "/users?limit=5" and assert items has exactly 5 entries.
- 2GET BASE_URL + "/users?limit=3&page=2" and assert items has 3 entries and page === 2.
- 3Assert items.length never exceeds limit.
Acceptance criteria
- GET /users returns 200
- 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 · Working with JSON