@nfq/test-reporter
v1.1.5
Published
Sends CI tests to an report endpoint
Downloads
326
Maintainers
Readme
@nfq/test-reporter
Table of Contents
Description:
This is an module to report test data to an server endpoint.
Installation:
To install the package run
npm install @nfq/test-reporter
if you are in yarn
yarn add @nfq/test-reporter
or on pnpm
pnpm install @nfq/test-reporter
PeerDependencies:
- @cypress/code-coverage >= 3
- babel-plugin-istanbul >= 6
- cypress >= 8
- mochawesome >= 6
- nyc >= 15
Configuration:
Configure your cypress to do code coverage and everything is set.
cypress.json:
Add following keys to your cypress.json config.
example:
"reporter": "mochawesome",
"reporterOptions": {
"reportDir": "cypress/reports",
"json": true,
"html": false,
"timestamp": "yyyymmddHHMMssl"
},
package.json
Setup your test commands like you want to have them and make sure to call the reporter afterwards.
example:
{
...
"scripts": {
"test:cypress:ct": "pnpx cross-env NODE_ENV=test FEATURE_ENV=test pnpx cypress run-ct",
"test:cypress:integration": "pnpx cross-env NODE_ENV=test FEATURE_ENV=test pnpx cypress run",
"test": "pnpm run test:cypress:integration && pnpm run test:cypress:ct && pnpx nfqReport"
},
...
}
.env
To configure the test reporter you have to create an .env file with the following keys:
example:
REPORTER_KEY=identification key //Informations to our intern data can be asked from the author of this package
REPORTER_URL=reporterurl //Informations to our intern data can be asked from the author of this package
REPORT_NAME=report name and page title
Contributions:
.NFQ | Christoph Kruppe
License:
The licence used is: MIT
Click on licence badge for licence details:
Questions:
If you have any further questions please contact the following email address: email: [email protected]