Reputation:
I am running my postman collections in Azure devops pipelines, runs well but i get a warning "##[warning]No test result files matching **/*.xml were found" in the Publish Rest Results. Another issue is that Test tab is missing in the test summary. Could i be missing something in my scripts?
My YAML is as follows:
pool: name: Azure Pipelines demands: npm
steps:
task: Npm@1 displayName: 'npm custom' inputs: command: custom verbose: false customCommand: 'install -g newman'
task: Npm@1 displayName: 'Install html report' inputs: command: custom verbose: false customCommand: 'install -g newman-reporter-htmlextra'
script: | echo $(Build.ArtifactStagingDirectory) cd $(Build.ArtifactStagingDirectory) dir displayName: 'Command Line Script'
script: | newman run ./PostmanCollection.json -g ./GlobalVariables.json -e ./EnvironmentVariables.json -r htmlextra --reporters cli,junit.json.htmlextra --reporter-junit-export-junitReport.xml --reporter-htmlextra-export TestReport.html
displayName: 'Run API Test With Report' continueOnError: true
task: PublishPipelineArtifact@1 displayName: 'Publish Pipeline Artifact'
task: PublishTestResults@2 displayName: 'Publish Test Results ' inputs: testResultsFiles: '**/*.xml' mergeTestResults: true testRunTitle: Results
Upvotes: 0
Views: 948
Reputation: 1
Not a direct answer to your questions, but may be a better solution. Postman released their CLI which is similar to Newman and has built-in integrations and reporting https://learning.postman.com/docs/postman-cli/postman-cli-overview/
Upvotes: 0