Agent for integration Mocha with ReportPortal.
ReportPortal
ReportPortal on GitHub
- Install the agent in your project:
npm i mocha-reportportal-agent --save-dev
- Add reporter to mocha options:
javascript
mochaOpts: {
colors: true,
reporter: 'mocha-reportportal-agent',
reporterOptions: {
// client settings
token: "00000000-0000-0000-0000-000000000000",
endpoint: "http://your-instance.com:8080/api/v1",
launch: "LAUNCH_NAME",
project: "PROJECT_NAME",
// agent settings
attachScreenshots: true,
showPassedHooks: false
},
timeout: 600000
},
Agent settings consist of two parts:
- Client settings can be viewed here
- Agent settings are described below
Parameter | Description |
---|---|
attachScreenshots | It is 'true' or 'false', if set 'true' then attempts will be made to attach screenshots to the logs. Default: 'true'. |
showPassedHooks | It is 'true' or 'false', if set 'true' then attempts will be made to add passed hooks to the logs. Default: 'false'. |
Licensed under the GPLv3 license (see the LICENSE.txt file).