Created
June 4, 2024 02:43
-
-
Save unjust/70eb522d164cfd764693aff3887ca084 to your computer and use it in GitHub Desktop.
collection output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
newman | |
Fleet Management API - Auth | |
❏ Login | |
↳ login | |
POST http://localhost:5000/auth/login [200 OK, 389B, 3s] | |
✓ /auth/login endpoint exists and responds with status OK 200 if successful | |
✓ /auth/login responds with an object with accessToken and user if authentication successful | |
↳ login bad credentials - unknown user | |
POST http://localhost:5000/auth/login [404 NOT FOUND, 230B, 2.3s] | |
✓ /login endpoint responds with 404 if credentials do not match | |
↳ login bad credentials - wrong password | |
POST http://localhost:5000/auth/login [404 NOT FOUND, 230B, 2.1s] | |
✓ /login endpoint responds with 404 if credentials do not match | |
↳ login missing credentials - no email | |
POST http://localhost:5000/auth/login [400 BAD REQUEST, 219B, 5ms] | |
✓ /login endpoint responds with 400 if email is missing | |
↳ login missing credentials - no password | |
POST http://localhost:5000/auth/login [400 BAD REQUEST, 260B, 5ms] | |
✓ /login endpoint responds with 400 if email or password are missing | |
❏ Taxis | |
↳ taxis | |
GET http://localhost:5000/taxis [200 OK, 669B, 2.2s] | |
✓ /taxis endpoint exists and responds with status OK 200 | |
✓ /taxis endpoint responds with default limit 10 if none is specified | |
✓ /taxis returns an array of taxis with id and plate | |
↳ taxis?plate= | |
GET http://localhost:5000/taxis?plate=GH [200 OK, 619B, 2.2s] | |
✓ /taxis returns an array of taxis with plate that matches | |
↳ taxis?limit=5 | |
GET http://localhost:5000/taxis?page=2&limit=5 [200 OK, 418B, 1860ms] | |
✓ /taxis endpoint responds with specified limit | |
↳ taxis - not authenticated | |
GET http://localhost:5000/taxis [401 UNAUTHORIZED, 207B, 12ms] | |
✓ /taxis endpoint responds with 401 if no authorization header | |
❏ Trajectories | |
↳ trajectories - not authenticated | |
GET http://localhost:5000/trajectories?taxiId=6418&date=02-02-2008 [401 UNAUTHORIZED, 207B, 10ms] | |
✓ /trajectories responds with 401 if no authentication header | |
↳ trajectories - not authenticated (invalid token) | |
GET http://localhost:5000/trajectories?taxiId=6418&date=02-02-2008 [401 UNAUTHORIZED, 206B, 3ms] | |
✓ /trajectories responds with 401 and error if invalid token | |
↳ trajectories | |
GET http://localhost:5000/trajectories?taxiId=6418&date=02-02-2008 [200 OK, 1.32kB, 2.1s] | |
✓ /trajectories/{{taxiId}}?date={{date}} endpoint exists and responds with status OK 200 | |
✓ /trajectories/{{taxiId}}?date={{date}} responds with data for only the specified taxi id and date | |
↳ trajectories - taxi not found | |
GET http://localhost:5000/trajectories?taxiId=999999&date=02-02-2008 [200 OK, 167B, 2s] | |
1. /trajectories/{{taxiId}}?date={{date}} responds with 404 if taxi id not found | |
↳ trajectories - missing date | |
GET http://localhost:5000/trajectories?taxiId=6418 [400 BAD REQUEST, 214B, 4ms] | |
✓ /trajectories/ responds with 400 for missing required parameters (date) | |
↳ trajectories - missing taxiId | |
GET http://localhost:5000/trajectories?date=02-02-2008 [400 BAD REQUEST, 216B, 4ms] | |
✓ /trajectories/ responds with 400 for missing required parameters (taxiId) | |
↳ trajectories - badly formatted date | |
GET http://localhost:5000/trajectories?date=0x-31-2222&taxiId=6418 [400 BAD REQUEST, 227B, 5ms] | |
✓ /trajectories/?taxiId={{taxiId}}&date={{date}} responds with 400 if date badly formatted | |
↳ latest trajectories - not authenticated (invalid token) | |
GET http://localhost:5000/trajectories/latest [401 UNAUTHORIZED, 206B, 4ms] | |
✓ /trajectories/latest responds with 401 and error if invalid token | |
↳ latest trajectories - not authenticated | |
GET http://localhost:5000/trajectories/latest [401 UNAUTHORIZED, 207B, 4ms] | |
✓ /trajectories/latest responds with 401 if no authentication header | |
↳ latest trajectories | |
GET http://localhost:5000/trajectories/latest [200 OK, 1.56kB, 2s] | |
✓ /trajectories/latest endpoint exists and responds with status OK 200 | |
✓ /trajectories/latest endpoint responds with an array of trajectory id, latitiude, longiture, plate, timestamp | |
❏ Users | |
↳ users - not authenticated | |
GET http://localhost:5000/users [401 UNAUTHORIZED, 207B, 5ms] | |
✓ /users responds with 401 if no authentication header | |
↳ users - not authenticated (invalid token) | |
GET http://localhost:5000/users [401 UNAUTHORIZED, 206B, 3ms] | |
✓ /users responds with 401 and error if invalid token | |
↳ users | |
GET http://localhost:5000/users [200 OK, 709B, 2.2s] | |
✓ /users endpoint exists and responds with status OK 200 | |
2. /users endpoint responds with default limit 10 if none is specified | |
✓ /users endpoint responds with an array | |
↳ users?limit=5 | |
GET http://localhost:5000/users?limit=5 [200 OK, 557B, 2.1s] | |
✓ /users endpoint responds to specified limit param | |
↳ users - invalid page | |
GET http://localhost:5000/users?page=x [200 OK, 709B, 2.1s] | |
3. /users endpoint responds with status 400 and error for invalid page | |
↳ users - invalid limit | |
GET http://localhost:5000/users?limit=y [200 OK, 709B, 1886ms] | |
4. /users endpoint responds with status 400 and error for invalid limit | |
↳ users - not authenticated | |
POST http://localhost:5000/users [401 UNAUTHORIZED, 207B, 3ms] | |
✓ /users POST endpoint responds with 401 if no authentication header | |
↳ users - not authenticated (invalid token) | |
POST http://localhost:5000/users [401 UNAUTHORIZED, 206B, 3ms] | |
✓ /users POST endpoint responds with 401 and error if invalid token | |
↳ users | |
POST http://localhost:5000/users [201 CREATED, 242B, 2.5s] | |
✓ /users POST endpoint exists and responds with status CREATED 201 and id, name, email if successful | |
↳ users - user exists | |
POST http://localhost:5000/users [409 CONFLICT, 208B, 2.1s] | |
✓ /users POST endpoint responds with 409 and error if user with email already exists | |
↳ users - missing params (email) | |
POST http://localhost:5000/users [400 BAD REQUEST, 232B, 3ms] | |
✓ /users POST endpoint responds with 400 and error if no email provided in body | |
↳ users - missing params (password) | |
POST http://localhost:5000/users [400 BAD REQUEST, 232B, 5ms] | |
✓ /users POST endpoint responds with 400 if no password provided in body | |
↳ users - not authenticated | |
PATCH http://localhost:5000/users/37 [401 UNAUTHORIZED, 207B, 7ms] | |
✓ /users PATCH endpoint responds with 401 and error if missing authorization header | |
↳ users - not authenticated (invalid token) | |
PATCH http://localhost:5000/users/37 [401 UNAUTHORIZED, 206B, 4ms] | |
✓ /users PATCH endpoint responds with 401 and error if invalid token | |
↳ users | |
PATCH http://localhost:5000/users/6 [200 OK, 231B, 2.5s] | |
✓ /users/{{uid}} PATCH endpoint exists and responds with status OK 200 if successful | |
✓ /users/{{uid}} PATCH endpoint exists and responds with id, email, name of updated user if successful | |
↳ users - user does not exist | |
PATCH http://localhost:5000/users/999999 [404 NOT FOUND, 209B, 2.2s] | |
✓ /users/{{uid}} PATCH endpoint responds with status 404 and error if user does not exist | |
↳ users - no body | |
PATCH http://localhost:5000/users/37 [400 BAD REQUEST, 212B, 11ms] | |
✓ /users/{{uid}} PATCH responds with status 400 and error if no request body | |
↳ users - email or password | |
PATCH http://localhost:5000/users/37 [400 BAD REQUEST, 250B, 4ms] | |
✓ /users/{{uid}} PATCH responds with status 400 and error if trying to update email or password | |
↳ users - not authenticated | |
DELETE http://localhost:5000/users/37 [401 UNAUTHORIZED, 207B, 3ms] | |
✓ /users/{{uid}} DELETE endpoint to respond with 401 if no authorization header | |
↳ users - not authenticated (invalid token) | |
DELETE http://localhost:5000/users/37 [401 UNAUTHORIZED, 206B, 5ms] | |
✓ /users/{{uid}} DELETE endpoint to respond with 401 and error if invalid token | |
↳ users | |
DELETE http://localhost:5000/users/37 [200 OK, 237B, 2.3s] | |
✓ /users/{{uid}} DELETE endpoint responds with 200 and id, email, name of deleted user if successful | |
↳ users - user doesn't exist | |
DELETE http://localhost:5000/users/999999999 [404 NOT FOUND, 209B, 2s] | |
✓ /users/{{uid}} DELETE endpoint responds with 404 and error if user does not exist | |
→ non-existent route | |
GET http://localhost:5000/taxiss/ [404 NOT FOUND, 311B, 3ms] | |
✓ responds with status 404 for non existent route /taxiss | |
┌─────────────────────────┬───────────────────┬───────────────────┐ | |
│ │ executed │ failed │ | |
├─────────────────────────┼───────────────────┼───────────────────┤ | |
│ iterations │ 1 │ 0 │ | |
├─────────────────────────┼───────────────────┼───────────────────┤ | |
│ requests │ 42 │ 0 │ | |
├─────────────────────────┼───────────────────┼───────────────────┤ | |
│ test-scripts │ 84 │ 0 │ | |
├─────────────────────────┼───────────────────┼───────────────────┤ | |
│ prerequest-scripts │ 45 │ 0 │ | |
├─────────────────────────┼───────────────────┼───────────────────┤ | |
│ assertions │ 50 │ 4 │ | |
├─────────────────────────┴───────────────────┴───────────────────┤ | |
│ total run duration: 44s │ | |
├─────────────────────────────────────────────────────────────────┤ | |
│ total data received: 7.47kB (approx) │ | |
├─────────────────────────────────────────────────────────────────┤ | |
│ average response time: 1017ms [min: 3ms, max: 3s, s.d.: 1128ms] │ | |
└─────────────────────────────────────────────────────────────────┘ | |
[31m # [39m[31m failure [39m[31m detail [39m | |
[90m [39m[90m [39m[90m [39m | |
1. AssertionError /trajectories/{{taxiId}}?date={{date}} responds with 404 if taxi id not found | |
expected 200 to equal 404 | |
at assertion:0 in test-script | |
inside "Trajectories / trajectories - taxi not found" | |
[90m [39m[90m [39m[90m [39m | |
2. AssertionError /users endpoint responds with default limit 10 if none is specified | |
expected 7 to equal 10 | |
at assertion:1 in test-script | |
inside "Users / users" | |
[90m [39m[90m [39m[90m [39m | |
3. AssertionError /users endpoint responds with status 400 and error for invalid page | |
expected 200 to equal 400 | |
at assertion:0 in test-script | |
inside "Users / users - invalid page" | |
[90m [39m[90m [39m[90m [39m | |
4. AssertionError /users endpoint responds with status 400 and error for invalid limit | |
expected 200 to equal 400 | |
at assertion:0 in test-script | |
inside "Users / users - invalid limit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment