testcafe-reporter-qase
v2.0.3Qase TMS TestCafe reporter
Publish results simple and easy.
To install the latest version, run:
npm install -D testcafe-reporter-qase
Updating from v1
To update a test project using testcafe-reporter-qaser@v1 to version 2:
- Update reporter configuration in
qase.config.json
and/or environment variables — see the configuration reference below.
Example of usage
The TestCafe reporter has the ability to auto-generate test cases and suites from your test data.
But if necessary, you can independently register the ID of already
existing test cases from TMS before the executing tests. Meta key should be CID
.
You should assign list of case IDs to it, e.g.:
test.meta('CID', [1])('Text typing basics', async (t) => {
await t;
});
const q = qase.id(1)
.title('Text typing basics')
.field({ 'severity': 'high' })
.parameters({ 'browser': 'chrome' })
.create();
test.meta({ ...q })(
'Click check boxes and then verify their state',
async (t) => {
await t;
},
);
To run tests and create a test run, execute the command (for example from folder examples):
QASE_MODE=testops npx testcafe chrome test.js -r spec,qase
or
npm test
A test run will be performed and available at:
https://app.qase.io/run/QASE_PROJECT_CODE
Configuration
Qase Testcafe reporter can be configured in multiple ways:
- using a separate config file
qase.config.json
, - using environment variables (they override the values from the configuration files).
For a full list of configuration options, see the Configuration reference.
Example qase.config.json
file:
{
"mode": "testops",
"debug": true,
"testops": {
"api": {
"token": "api_key"
},
"project": "project_code",
"run": {
"complete": true
}
}
}
Supported ENV variables:
QASE_MODE
- Same asmode
QASE_DEBUG
- Same asdebug
QASE_ENVIRONMENT
- Same asenvironment
QASE_TESTOPS_API_TOKEN
- Same astestops.api.token
QASE_TESTOPS_PROJECT
- Same astestops.project
QASE_TESTOPS_RUN_ID
- Pass Run ID from ENV and override reporter optiontestops.run.id
QASE_TESTOPS_RUN_TITLE
- Same astestops.run.title
QASE_TESTOPS_RUN_DESCRIPTION
- Same astestops.run.description
Requirements
We maintain the reporter on LTS versions of Node.
testcafe >= 2.0.0