Publish results simple and easy.
npm install cypress-qase-reporter
If you want to decorate come test with Qase Case ID you could use qase function:
import { qase } from 'cypress-qase-reporter/dist/mocha';
describe('My First Test', () => {
qase([1,2],
it('Several ids', () => {
expect(true).to.equal(true);
})
);
qase(3,
it('Correct test', () => {
expect(true).to.equal(true);
})
);
qase(4,
it.skip('Skipped test', () => {
expect(true).to.equal(true);
})
);
qase(5,
it('Failed test', () => {
expect(true).to.equal(false);
})
);
});
You should also have an active item in the project settings at
https://app.qase.io/project/QASE_PROJECT_CODE/settings/options
option in the Test Runs
block:
Allow submitting results in bulk
If you are going to use several specifications for execution and you have in config
"runComplete": true
then it is necessary to additionally set in the project settings
Allow to add results for cases in closed runs.
To run tests and create a test run, execute the command (for example from folder examples):
QASE_REPORT=1 npx cypress run
or
npm test
A test run will be performed and available at:
https://app.qase.io/run/QASE_PROJECT_CODE
Reporter options (* - required):
- *
apiToken
- Token for API access, you can find more information here - *
projectCode
- Code of your project (can be extracted from main page of your project:https://app.qase.io/project/DEMOTR
-DEMOTR
is project code here) runId
- Run ID from Qase TMS (also can be got from run URL)logging
[true/false] - Enabled debug logging from reporter or notenvironmentId
- To execute with the sending of the envinroment informationbasePath
- URL Qase.ioscreenshotFolder
- Folder for save screenshot cypress,sendScreenshot
[true/false] - Permission to send screenshots to Qase TMSrunComplete
[true/false] - Permission for automatic completion of the test run
You can check example configuration with multiple reporters in demo project (cypress v10) and demo project (cypress v6).
Supported ENV variables:
QASE_REPORT
- You should pass this ENV if you want to use qase reporterQASE_RUN_ID
- Pass Run ID from ENV and override reporter optionsQASE_RUN_NAME
- Set custom Run name, when new run is createdQASE_RUN_DESCRIPTION
- Set custom Run description, when new run is createdQASE_API_TOKEN
- Token for API access, you can find more information hereQASE_API_BASE_URL
- URL Qase.io, default valuehttps://api.qase.io/v1
QASE_ENVIRONMENT_ID
- To execute with the sending of the envinroment informationQASE_SCREENSHOT_FOLDER
- Folder for save screenshot cypressQASE_SCREENSHOT_SENDING
- Permission to send screenshots to Qase TMSQASE_RUN_COMPLETE
- Permission for automatic completion of the test run
We maintain the reporter on LTS versions of Node. You can find the current versions by following the link