4

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

Community
  • 1
  • 1
Zed
  • 191
  • 2
  • 13
  • 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 Jun 11 '18 at 05:48
  • 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 empty – Zed Jun 11 '18 at 09:27
  • it worked after passing --reporters cli,junit --reporter-junit-export report.xml, it was able to create the report.xml file. – Zed Jun 11 '18 at 10:18
  • What's the result if you publish test result during VSTS build (Publish test result task) – starian chen-MSFT Jun 12 '18 at 02:04
  • 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 Jun 12 '18 at 11:01

1 Answers1

0

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.