Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Currents + Postman

Report test results generated by Postname to Currents

Setup

  • Get a Record key and Project ID from Currents dashboard
  • Run Postman tests using newman
npx newman run ./collection.json -e ./environment.json -r cli,junit --reporter-junit-export ./results.xml
  • Convert JUnit test results to Currents-compatible format
npx currents convert \
  --input-format=junit \
  --input-file=results.xml \
  --framework=postman \
  --framework-version=v11.2.0
  • Upload the results to Currents
npx currents upload --key=your-record-key --project-id=currents-project-id

Example

# Run Postman tests
❯ npx newman run ./collection.json -e ./environment.json -r cli,junit --reporter-junit-export ./results.xml

# Convert Postman results to Currents results
❯ npx currents convert \
  --input-format=junit \
  --input-file=results.xml \
  --framework=postman \
  --framework-version=v11.2.0
[currents] Convertion files: results.xml
[currents] Conversion completed, report saved to: /Users/agoldis/currents-junit-xml-example/packages/postman/.currents/2024-11-27T21-14-06-189Z-24038566-8abf-42b5-910d-2af57dd4d3c6

# Report the results to Currents
❯ npx currents upload --key=xxx --project-id=yyy

Currents config: {
  projectId: 'kLfVfq',
  recordKey: '*****',
  removeTitleTags: false,
  disableTitleTags: false,
  debug: false
}
Report directory: /Users/agoldis/currents-junit-xml-example/packages/postman/.currents/2024-11-27T21-14-06-189Z-24038566-8abf-42b5-910d-2af57dd4d3c6
[Tests] Run created: https://app.currents.dev/run/178ad580f51fc637

🎉