When running a collection test with Newman, I'd like it to display the request body sent, to have a more detailed record of the test (and making sure the environment variables were replaced correctly).
I checked the Newman command line options at the project documentation and found nothing, and the -O option described in this old issue is not working.
I'd like to know how to activate the verbose output.
This is a popular feature request that has been documented at GitHub here
As a workaround, you can add this to the post-request each test you want to log:
tests["[INFO] Request: " + JSON.stringify(request)] = true;
tests["[INFO] Response: " + responseBody] = true;
try the --verbose
option. This is an example output:
GET http://myapp:8080/b/api/v1/0
401 Unauthorized ★ 59ms time ★ 290B↑ 367B↓ size ★ 8↑ 5↓ headers ★ 0 cookies
┌ ↓ application/json ★ text ★ json ★ utf8 ★ 193B
│ {"path":"http://myapp:8080/b/api/v1/0","message":"401 Unauthorized from POST http:
│ //myotherapp:8080/v1/auth/user","timestamp":"2022-03-23
│ T10:11:31.133683","status":401}
└
prepare wait dns-lookup tcp-handshake transfer-start download process total
1ms 284µs (cache) (cache) 56ms 1ms 51µs 59ms
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With