Newman: Junit report only contains results from last iteration

Created on 18 Dec 2019  路  5Comments  路  Source: postmanlabs/newman

When using newman with a data source file, the Junit report only contains the results for the last item in the file. The CLI output correctly shows the number of iterations, test scripts and assertions, while the Junit xml file only shows a single test case.

  1. Newman Version (can be found via newman -v): 4.5.7
  2. OS details (type, version, and architecture): Windows 10 64bit
  3. Are you using Newman as a library, or via the CLI? CLI
  4. Did you encounter this recently, or has this bug always been there: Always
  5. Expected behaviour: The JUnit report should contain results for all iterations.
  6. Command / script used to run Newman: newman run collection.json -d data.csv -r cli,junit
  7. Sample collection, and auxiliary files (minus the sensitive details): The sample collection has 1 request: https://postman-echo.com/get?iter={iter}
  8. Screenshots (if applicable):

image
image
image
image

Most helpful comment

Hey I was able to get all the iterations to report by using newman-reporter-junitfull. You can get it via npm
npm install -g newman-reporter-junitfull

All 5 comments

Also seeing this issue with 101 iterations only yielding one testsuite.

Hey I was able to get all the iterations to report by using newman-reporter-junitfull. You can get it via npm
npm install -g newman-reporter-junitfull

This is perfect, thank you! @Christian0411

@rycornell, can we reopen this? Adding a plugin as a dependency doesn't fix the issue internal to newman. The standard junit reporter should have been smart enough to handle this.

Is anyone already working on this issue?
If not, I am ready to start.

Was this page helpful?
0 / 5 - 0 ratings