Publish results simple and easy.
npm install testcafe testcafe-reporter-qase
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
});
test
.meta({ CID: [2, 3] })
('Click check boxes and then verify their state', async (t) => {
await t
});
You should also have an active item in the project settings at
https://app.qase.io/project/QASE_PROJECT_CODE/settings/options
options in the Test Runs
block:
Auto create test cases
and
Allow submitting results in bulk
To run tests and create a test run, execute the command (for example from folder examples):
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
Qase reporter supports passing parameters using two ways:
using .qaserc
file and using ENV variables.
.qaserc
parameters:
enabled
- Enable reporterapiToken
- Token for API access, you can find more information herebasePath
- Qase.io URLprojectCode
- 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
- Pass Run IDenvironmentId
- Environment ID from Qase TMSrunName
- Set custom Run name, when new run is created. Supports two parameters:%DATE%
%AGENTS%
runDescription
- Set custom Run description, when new run is createduploadAttachments
- Uploading attachment to Qase TMSrunComplete
- Complete run after all tests are finishedlogging
- Enabled debug logging from reporter or notrootSuiteTitle
- A parent suite for your autocreated tests
Example configuration file:
{
"enabled": true,
"logging": true,
"apiToken": "api_key",
"projectCode": "project_code",
"runName": "TestCafe run %DATE% %AGENTS%"
}
Supported ENV variables:
QASE_ENABLED
- Same asenabled
QASE_API_TOKEN
- Same asapiToken
QASE_PROJECT
- Same asprojectCode
QASE_RUN_ID
- Pass Run ID from ENV and override reporter optionsQASE_RUN_NAME
- Same asrunName
QASE_RUN_DESCRIPTION
- Same asrunDescription
QASE_RUN_COMPLETE
- Same asrunComplete
QASE_LOGGING
- Same aslogging
QASE_UPLOAD_ATTACHMENTS
- Same asuploadAttachments
QASE_ROOT_SUITE_TITLE
- Same asrootSuiteTitle
We maintain the reporter on LTS versions of Node. You can find the current versions by following the link