Reporting Results
Newman

Newman

Reporting from the newman CLI is extremely easy using our NPM package. Simply install the package globally:

npm install -g newman-reporter-testify

Then run newman, specifying the testify reporter:

newman run mycollection.json -r testify

Or, you can run it from JS code using the newman package installed locally in your project:

npm install newman newman-reporter-testify --save-dev
var newman = require('newman');
 
newman.run(
  {
    collection: require('./your_collection.json'),
    environment: require('./your_environment.json'),
    reporters: ['cli', 'testify'],
    reporter: {
      testify: {
        apiKey: process.env.TESTIFY_API_KEY,
        runId: process.env.TEST_RUN_ID,
      },
    },
  },
  function (err) {
    if (err) {
      throw err;
    }
    console.log('collection run complete!');
  }
);

Configuration

You must provide the following environment variables:

  • TESTIFY_API_KEY: An API key for your Testify account which will be used to authenticate the requests
  • TEST_RUN_ID: The ID of the test run to which the results should be added