QA TOUCH + TESTCAFE
Publish TestCafe results to your QA Touch test run
Install the QA Touch reporter, tag each test with its TRID, and run TestCafe with --reporter qatouch. Passed, untested and failed results land in the test run.
Setup: API key, reporter package, .env file, TRID tags
TestCafe runs the browser. QA Touch keeps the record.
Your TestCafe tests already check the app end to end. The QA Touch reporter publishes the outcomes to the test run your team reports from, so nobody copies them over.
-
Problem: Results from a TestCafe run are copied into QA Touch by hand.
With the integration: The reporter publishes the results to the QA Touch test run and updates the case statuses.
-
Problem: It’s unclear which test belongs to which QA Touch record.
With the integration: A TRID meta tag on each test, such as TR001, links it to QA Touch.
-
Problem: Credentials end up hard-coded in test code.
With the integration: The domain, API token, project key and test run ID live in a .env file.
--reporter qatouch
Illustrative sample data. Test names are examples.
What the integration does
Four capabilities from QA Touch’s TestCafe guide, from install to the published result.
One reporter package
Install testcafe-reporter-qatouch in the project, or globally to share it across projects.
Settings in a .env file
Set QATOUCH_DOMAIN, QATOUCH_API_TOKEN, QATOUCH_PROJECT_KEY and QATOUCH_TESTRUN_ID in the project root.
Tests tagged with TRID
Add a TRID meta key to each test. The value is an array, such as [‘TR001’].
Run from the CLI or the API
Pass –reporter qatouch on the command line, or call .reporter(‘qatouch’) on a runner in code.
From reporter install to results in the test run
Step through the flow. The screens are schematic, drawn from the labels and snippets in the setup guide.
QA Touch My profile → Generate API key
Generate an API key and install the reporter
Generate an API key under My profile, then install the reporter in the TestCafe root directory, locally or globally.
Your project .env in the TestCafe root
Put the QA Touch settings in .env
Create a .env file in the project root with your domain, API token, project key and test run ID.
Keep the API token out of version control.
Your project test file
Tag each test with a TRID
Add a TRID meta key to every test you want published. The value is an array, for example ['TR001'].
Your project terminal or runner
Run TestCafe with the QA Touch reporter
Use --reporter qatouch on the command line, or .reporter('qatouch') when you create a runner in code.
QA Touch test run
Check the results in QA Touch
The guide says passed, untested and failed tests are published to the test run. Open it to see the updated statuses.
Illustrative sample data. Test names are examples.
What changes for your QA team
Tests stay in your repository. Outcomes show up in the test run.
No copying results
Statuses move from TestCafe to QA Touch with the run, so nobody retypes pass and fail.
Tests traceable in code
The TRID on each test shows, right in the test file, which QA Touch record it reports to.
One place to report from
Automated results sit in the same test run as the rest of your testing, ready for the team to review.
Works the way you run tests
Use the TestCafe command line or the runner API. Both take the same qatouch reporter.
Who uses it, and for what
Choose a role to see a scenario the integration supports.
A TestCafe suite needs a run to report to
The team writes TestCafe tests and wants their results in QA Touch.
What they do
- Generate an API key under My profile.
- Set up the project, the test run and its cases in QA Touch.
- Give the automation engineer the domain, API token, project key and test run ID.
Result: the engineer has what the .env file needs.
Existing tests need to report
You maintain TestCafe tests and want them to feed QA Touch.
What they do
- Install testcafe-reporter-qatouch and create the .env file.
- Add a TRID meta key to each test.
- Run TestCafe with --reporter qatouch.
Result: passed, untested and failed results are published to the test run.
Reviewing an automated run
You need to know how many cases passed before sign-off.
What they do
- Open the test run in QA Touch after the TestCafe run.
- Check the updated case statuses.
- Follow up on the failures.
Result: the run reflects the latest TestCafe outcome without manual updates.
You fixed something and want to re-check
You changed code and want to confirm the affected tests pass.
What they do
- Re-run the affected test file with the qatouch reporter.
- Open the QA Touch test run.
- Confirm the case status changed.
Result: the fix is confirmed in the same run the QA team reports from.
Set it up in four parts
These steps follow QA Touch’s TestCafe integration guide.
Before you start
- A TestCafe project (Node.js and npm).
- A QA Touch project with a test run.
- A QA Touch login that can generate an API key.
The guide doesn’t say where to find the project key or test run ID, how the TRID tag relates to QATOUCH_TESTRUN_ID, or whether a .env loader is needed. Check your first run in QA Touch, and contact QA Touch support if results don’t appear.
- Log in to QA Touch, open My profile and generate an API key.
- In the TestCafe root directory, run
npm install --save-dev testcafe-reporter-qatouch. - To share it across projects, install it globally with
npm install -g testcafe-reporter-qatouch.
- Create a
.envfile in the TestCafe project root. - Set
QATOUCH_DOMAIN,QATOUCH_API_TOKEN,QATOUCH_PROJECT_KEYandQATOUCH_TESTRUN_ID.
- Add
.meta({ 'TRID': ['TR001'] })to each test. - The value is a
TRXXXcode in an array. The guide calls it the test run code in QA Touch. - A test without the TRID tag isn't mapped to QA Touch, according to the guide.
- On the command line, run
testcafe chrome 'path/to/test/file.js' --reporter qatouch. - Or, in code, add
.reporter('qatouch')to your runner. - Only passed, untested and failed tests are published to the test run.
Tests tagged? See how results reach the run.
Questions about the TestCafe integration
Answers are based on QA Touch’s TestCafe integration guide.
What does the QA Touch TestCafe integration do?
The testcafe-reporter-qatouch package publishes TestCafe results to a QA Touch test run and updates the matching case statuses.
How do I install the reporter?
Generate an API key under My profile in QA Touch. Then run npm install –save-dev testcafe-reporter-qatouch in the TestCafe root directory, or npm install -g testcafe-reporter-qatouch to share it across projects.
What goes in the .env file?
Four values: QATOUCH_DOMAIN, QATOUCH_API_TOKEN, QATOUCH_PROJECT_KEY and QATOUCH_TESTRUN_ID. The guide doesn’t say where to find the project key or test run ID, or whether a .env loader is needed.
How does a test link to QA Touch?
With a TRID meta key whose value is an array, such as .meta({ ‘TRID’: [‘TR001’] }). The guide calls it the test run code, and doesn’t explain how it relates to QATOUCH_TESTRUN_ID.
How do I run TestCafe with the reporter?
On the command line, use testcafe chrome ‘path/to/test/file.js’ –reporter qatouch. In code, call .reporter(‘qatouch’) on your runner.
Which results are published?
The guide says only passed, untested and failed tests are published to the test run. It doesn’t explain how a skipped test is handled.
Which versions are supported, and does anything sync back?
The guide doesn’t list supported versions of TestCafe, Node.js or the reporter. It describes results going from TestCafe into QA Touch, and doesn’t describe any sync back.
Connect TestCafe to QA Touch
Install the reporter, tag your tests, and let the next TestCafe run publish to your test run.