@orangebeard-io/codeceptjs-listener
v1.0.1
Published
A CodeceptJS Mocha reporter for Orangebeard.io
Maintainers
Readme
Installation
Install the npm package
npm install @orangebeard-io/codeceptjs-listener --save-devConfiguration
1. Orangebeard connection
Create orangebeard.json in your project root (or any parent directory):
{
"endpoint": "https://your-instance.orangebeard.app",
"token": "your-api-token",
"project": "your-project-name",
"testset": "Your Test Set Name",
"description": "CodeceptJS test run",
"attributes": [
{
"key": "env",
"value": "ci"
}
]
}You can also provide connection values with environment variables:
ORANGEBEARD_ENDPOINTORANGEBEARD_TOKENORANGEBEARD_PROJECTORANGEBEARD_TESTSET
2. Configure the reporter in CodeceptJS
Set the Mocha reporter in codecept.conf.js or codecept.conf.ts:
exports.config = {
// ...your existing config...
mocha: {
reporter: '@orangebeard-io/codeceptjs-listener',
reporterOptions: {
// Optional: override orangebeard.json settings
// endpoint: 'https://...',
// token: '...',
// project: '...',
// testset: '...',
},
},
};3. Screenshots (optional)
The reporter attaches failure screenshots produced by CodeceptJS screenshotOnFail.
exports.config = {
// ...
plugins: {
screenshotOnFail: {
enabled: true,
},
},
};Running
Run tests as usual:
npx codeceptjs runResults are streamed to Orangebeard in real time.
What gets reported
The reporter will:
- Map CodeceptJS Features to Orangebeard suites.
- Map Scenarios to Orangebeard tests.
- Report
I.*actions as real-time steps. - Group hook activity under
Before/Afterparent steps. - Group
I.say(...)sections as parent comment steps. - Parse tags into Orangebeard test attributes.
- Attach failure screenshots to the related test.
- Send error details and stack traces as logs.
- Log
I.executeScript(...)source as markdown step logs. - For HTTP request steps (
sendGetRequest,sendPostRequest, etc.), keep only URL in step titles and log payload/headers as markdown.
License
Apache-2.0 — see LICENSE.
