0.2.0 • Published 5 years ago
agent-js-nightwatch v0.2.0
agent-js-nightwatch
Agent for integration NightwatchJS with ReportPortal.
- More about NightwatchJS
- More about ReportPortal
How to use
- Install the agent in your project:
npm install --save-dev agent-js-nightwatch
Create rp.json file with reportportal configuration:
{ // client settings "token": "00000000-0000-0000-0000-000000000000", "endpoint": "https://your.reportportal.server/api/v1", "project": "YourReportPortalProjectName", "launch": "YourLauncherName", // agent settings "agentOptions": { "launchParams": { "attributes": [ { "key": "YourKey", "value": "YourValue" }, { "value": "YourValue" } ], "description": "Your launch description", "rerun": true, "rerunOf": "00000000-0000-0000-0000-000000000000" } } }
Where
- rerun - to enable rerun
- rerunOf - UUID of launch you want to rerun. If not specified, report portal will update the latest launch with the same name
Create reporter.js file with code like:
const NightwatchAgent = require('agent-js-nightwatch'); const config = require('./rp.json'); const agent = new NightwatchAgent(config); module.exports = { write : (results, options, done) => { return agent.startReporting(results, done); } };
Create the nightwatch.json configuration file.
Run your tests with --config and --reporter options specified:
nightwatch --config ./nightwatch.json --reporter ./reporter.js
Example
To run example:
npm run example:{exampleName}
0.2.0
5 years ago