3
votes

I have a vsts build where I run newman tests, tests work file but I do not get any report back even though the command i sent. the steps are

1) installing newman on build agent

2) running tests

newman run collection.json --reporter-junit-export

3) publishing test by adding test result step

enter image description here

but it does not find the .xml file, I suspect it is not created at all. anyone with idea

1
What's the result if you call newman run collection.json --reporter-junit-export to run test on build agent machine manually? Is there test result file generated?starian chen-MSFT
I do not see any output both on build and running locally, seems it doe snot create at all. Is there something wrong with command. I also tried to give a path after "--reporter-junit-export" but it did not work. the folder was still emptyZed
it worked after passing --reporters cli,junit --reporter-junit-export report.xml, it was able to create the report.xml file.Zed
What's the result if you publish test result during VSTS build (Publish test result task)starian chen-MSFT
well regarding your first comment, it was not able to create the file, after changing the command it was possible to see the test result file created. In the publish test result task you can then see how many test cases are run and some metrics such as response time and failing calls etc.Zed

1 Answers

0
votes

newman run collection.json --reporters cli,junit -reporter-junit-export Results\\JUnitReport.xml Try this it should create the JUnitReport.xml file in the Results folder which located in the same place where newman has run.