Duration: 60–90 minutes
Format: Screen share, you code, we observe and ask questions
Tools: Your own machine, any editor, Python 3.10+, PyTest, any libraries you want
Make sure you have these ready before we start:
python --version # 3.10 or higher
pip install pytest requestsYou do not need any accounts or API keys.
You will write an automated test suite in Python + PyTest for a public REST API:
Base URL: https://reqres.in
Treat it as a real backend service you are responsible for testing.
Work through these in order. It is okay if you do not finish everything — we care more about how you work than how much you finish.
- Create a PyTest project structure
- Add any dependencies you need
- Make sure
pytestruns without errors
Write tests that verify:
- The service has a valid, trusted SSL certificate
- The TLS version is 1.2 or higher
- HTTP traffic is redirected to HTTPS (or plain HTTP is rejected)
Write tests for these endpoints:
| Endpoint | What to test |
|---|---|
GET /api/users?page=2 |
Status code, response schema, data is a list |
GET /api/users/{id} |
Existing user (e.g. id=2), non-existent user (e.g. id=999) |
POST /api/users |
Create a user, verify returned fields match what you sent |
For each: test at least one happy path and one negative/error case.
As you write, use:
- A fixture for the base URL or shared session
@pytest.mark.parametrizefor at least one test- Descriptive test names
- Talk through your thinking as you go — we want to understand your decisions
- Ask questions if anything is unclear
- If you get stuck on something minor, say so and move on — time management matters