Newman: CLI reporter logging the request start/end times would be very helpful

Created on 10 May 2019  路  8Comments  路  Source: postmanlabs/newman

This is a feature/enhancement request rather than a bug.

The CLI reporter outputs information about each request as it runs, including request duration.
It would also be very helpful to include request start time, and possibly end time too.

For context, when a request in a collection behaves differently to expected, at the moment it's hard to pair up that request with our corresponding service logs, because we have to look in the full time period that the collection was running. Having timestamps on each request would make this troubleshooting process much simpler, because it would be easier to identify the relevant time window.

My current workaround is to also use the JUnit reporter and look through the XML to find the timestamp, but that's not ideal.

Newman Version: 4.4.1
OS: Ubuntu 16.04

getting-started pull request needed

All 8 comments

To get some more context on this, I'll go ahead and assume that this is an example of a CLI request report and the values within the brackets denote the status code, the bandwidth used (not really sure), and the request duration respectively. If this is the case, my suggestion would be to have the request start timestamp before the request method this will give us something like;

20-02-26 12:00:17 GET https://postman-echo.com/oauth1 [200 OK, 346B, 369ms]

sampleRequest

What are your views?

@misocho Yes, that would solve my issue, and has the benefit of being fairly standard.

Interestingly, when I run Newman within my CI, the CI framework tends to add on its own timestamps to all command-line output. In that context, it would be helpful have a flag to tell Newman whether or not to log timestamps, so that, for running it locally, I could turn it on, and for running it within my CI, I could turn it off.

@BrambleRamble We could have the CLI report logging the timestamps as default and have a --reporter-cli-no-timestamp flag to turn off the timestamps.

Cc. @codenirvana

@misocho That would work for me. I'm flexible on what behaviour's default, and what the flag is called.

Hello everyone! I would like to work on this issue if it's still available.
Thanks

@dmahajan980 there is a pull request already linked to it

@dmahajan980 Thank you for the offer though :-)

I'd like to use this feature, any updates on this? The PR seems to be awaiting a Review by @codenirvana

Was this page helpful?
0 / 5 - 0 ratings