-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
summary.run.executions contains each request only once, even if executed multiple times #189
Comments
@mcserbak This is intentional, as the HTML reporter aggregates run statistics across multiple iterations. Quite a few users have been caught off guard by this behaviour, and we're looking at ways to improve this to become more usable. |
@kunagpal I totally see your point. Between iterations, even the number of repeats could differ. Let me rephrase my request in a way, that would be valid even if I had more iterations: My first preference would be to have it in the junit report, but I can live with any other solution (having it logged in the HTML report, or even in console). Thanks! |
To rephrase @mcserbak's rephrasing: if the loop changes GET route URL members or query parameters, you won't have a clear indication of which request had a problem if a test failed on only some requests. I worked around this by adding the relevant GET route info into the test description, but that's somewhat clumsy: It would be better if it the HTML reporter output was closer to the default CLI report:
Still present in Newman 4.3.1, CLI |
Newman Version (can be found via
newman -v
):4.0.2
OS details (type, version, and architecture):
Linux (Ubuntu, 18.04.1, x64)
Are you using Newman as a library, or via the CLI?
Via the CLI
Did you encounter this recently, or has this bug always been there:
Encountered recently, but checking the git repo, it has always been there
Expected behaviour:
I'd expect summary.run.executions to contain one item per request executed, even if the request is the same one looped over and over again.
The problem is observable by checking newman.report.html, where the Get Timestamp request turns up only once, with a response body not fulfilling the assertion, however the Test Script on the request is set up in a way, to re-run the same request while a condition holds. My suspicion is that the response body is saved from the first execution of the request only. Suspected code: https://github.com/postmanlabs/newman/blob/8426e61ade45c76ee6dfde23ce25235c7c5c1648/lib/run/summary.js#L143
Command / script used to run Newman:
newman run NewmanHtmlReporterMultiRequestIssue.postman_collection.json --reporters cli,html --reporter-html-export newman.report.html --reporter-html-template template-withreqrespcontents.hbs
Sample collection, and auxiliary files (minus the sensitive details):
NewmanHtmlReporterMultiRequestIssue.postman_collection.json.txt <- please remove .txt extension
template-withreqrespcontents.hbs.txt <- please remove .txt extension
Screenshots (if applicable):
N/A
Steps to reproduce the problem:
The text was updated successfully, but these errors were encountered: