(venv) PS O:MetZeal_Projectnewman> newman run “O:MetZeal_ProjectnewmanvenvIncludeFile Processing API.postman_collection.json”
newman
File Processing API
→ Upload File
POST http://localhost:5000/upload [errored]
connect ECONNREFUSED 127.0.0.1:5000
2. Status code is 200
3. Response contains success message
→ List File
GET http://localhost:5000/files [errored]
connect ECONNREFUSED 127.0.0.1:5000
5. Status code is 200
6. Response contains a list of files
┌─────────────────────────┬──────────┬──────────┐
│ │ executed │ failed │
├─────────────────────────┼──────────┼──────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ requests │ 2 │ 2 │
├─────────────────────────┼──────────┼──────────┤
│ test-scripts │ 2 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ prerequest-scripts │ 0 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ assertions │ 4 │ 4 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 422ms │
├───────────────────────────────────────────────┤
│ total data received: 0B (approx) │
└───────────────────────────────────────────────┘
failure detail
-
Error connect ECONNREFUSED 127.0.0.1:5000
at request
inside “” -
AssertionError Status code is 200
expected PostmanResponse{ …(5) } to have property ‘code’
at assertion:0 in test-script
inside “Upload File” -
JSONError Response contains success message
“undefined” is not valid JSON
at assertion:1 in test-script
inside “Upload File” -
Error connect ECONNREFUSED 127.0.0.1:5000
at request
inside “” -
AssertionError Status code is 200
expected PostmanResponse{ …(5) } to have property ‘code’
at assertion:0 in test-script
inside “List File” -
JSONError Response contains a list of files
“undefined” is not valid JSON
at assertion:1 in test-script
inside “List File”
Automate one get and post API using newman.
yes reports like this will help..
mainly focus on test where, you give correct input, it should return correct result and pass… if u give incorrect input the result will be incorrect and it will fail
Om Divekar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.