NewmanPostman_VSTS_Task icon indicating copy to clipboard operation
NewmanPostman_VSTS_Task copied to clipboard

Overriding (?) JUnit report file - azure pipelines

Open Kammitora opened this issue 3 years ago • 0 comments

Hello! I have a problem. I'm executing 12 postman collections with tests (over 50 tests in total) and I want export it in one file. When I want to publish it, I can see only few test results. I think the last postman collection the task is executing overrides previous test results.

How to export all test results?

Greetings!

code fragment:

    - task: NewmanPostman@4
      displayName: postman - tests
      inputs:
        collectionSourceType: 'file'
        collectionFileSource: 'POSTMAN\collections'
        Contents: '*.postman_collection.json'
        environmentSourceType: 'none'
        globalVars: |
          var1=5
          var1=10
        reporters: 'junit'
        reporterJUnitExport: 'POSTMAN\collections\junitReport.xml'
      continueOnError: true

    - task: PublishTestResults@2
      inputs:
        testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit
        testResultsFiles: 'POSTMAN\collections\junitReport.xml'

Kammitora avatar Jan 12 '22 15:01 Kammitora