Installation
To integrate Qase Reporter in your TestCafe setup, follow these steps:
Activate the TestCafe App
======= To integrate Qase Reporter in your Playwright setup, follow these steps:
To activate the app, go to the Apps section in your workspace, and click on ‘Activate’.
Switch to the ‘Access tokens’ tab, and create a new API token from here. Save the API token as we’ll need it for the next steps.
Add testcafe-reporter-qase to your project
To install and add the reporter as a development dependency, run the following command in your node project 1:
npm install -D testcafe-reporter-qase
Configuration
At the very least, the reporter will need three variables defined — the mode, your testcafe app’s token, and the Qase project you want to publish the results to.
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).
You can configure the reporter options in a separate file qase.config.json
, placed in the root directory of your project.
{
"testops": {
"api": {
"token": "<token>"
},
"project": "<project_code>"
}
}
Please refer to this article for guidance on how to find your Project code in Qase.
Let’s verify the integration
We’ll use a simple test to check if the results are being published to your Qase project. Create a tests/
directory in the root of your project and add the following test:
import { test } from 'testcafe';
import { qase } from 'testcafe-reporter-qase/qase';
fixture`Simple tests`
.page`http://devexpress.github.io/testcafe/example/`;
test('Simple Test', async (t) => {
await t.expect(true).ok();
});
Now, let’s run the test by executing the following command:
QASE_MODE=testops npx testcafe chrome ./tests/exampleTest.js -r spec,qase
In the above command, we’re setting the reporter’s mode to ‘testops’ using the environment variable QASE_MODE
.
If you are using yarn
as your package manager, please run yarn add testcafe-reporter-qase -D
to install the reporter.