Configuration :
- task: NewmanPostman@4
inputs:
collectionSourceType: 'url'
collectionURL: 'https://api.getpostman.com/collections/{collectionId}?apikey={apiKey}'
environmentSourceType: 'url'
environmentUrl: 'https://api.postman.com/environments/{enviormentId}?apikey={apiKey}'
reporters: 'htmlextra'
pathToNewman: '/opt/hostedtoolcache/node/18.15.0/x64/bin/newman'
htmlExtraDarkTheme: true
htmlExtraReportTitle: 'ExploreFunctionalTestSummary'
reporterHtmlExport: '$(Pipeline.Workspace)/drop/Postman'
verbose: true
logLevel: detailed
sslInsecure: false
Error : throwing issue ##[error]The process '/opt/hostedtoolcache/node/18.15.0/x64/bin/newman' failed with exit code 1
Debug same scenario on local system after newman install, but got collection not loading ,
error: collection could not be loaded unable to fetch data from url "*https://api.getpostman.com/collections/{collectionId}?apikey={apiKey}*"
Provide the correct approch to implement it without ollectionfile/enviormentfile
NewMan is preinstalled on
Ubuntu-latestagent, the version is6.1.1.As per the guide:
differentversion of newman, you can install with npm task as below:For the
pathToNewmanparameter, it points to the newman path if you don't want to use the default version.Unless you have newman installed on the path
/opt/hostedtoolcache/node/18.15.0/x64/bin/newman, please remove the parameter in the taskNewmanPostman@4.htmlextrareporter type, you need to installnewman-reporter-htmlextraahead via npm task:My complete yaml below, i added the comment on the tasks.
Check the report in artifact:
Edit: Add the variable list: