TestCafe test reporting
TestCafe does something almost no other framework does: with quarantine mode on, it tells you which tests only passed after a retry. Qualflare treats that as what it is — a flakiness signal — and turns every run into hosted, historical reporting: unstable tests scored as flaky, screenshots and video kept with the failure, and AI clustering of failures by root cause.
Send TestCafe results to Qualflare
TestCafe ships a JSON reporter, so this is one flag on the command you already run. The
--reporter flag takes a comma-separated list, so you
keep your console output and write the file in the same run:
# TestCafe's built-in JSON reporter
npx testcafe chrome tests/ --reporter json:testcafe-results.json
# Keep readable console output at the same time
npx testcafe chrome tests/ --reporter spec,json:testcafe-results.json Then upload it:
qf my-project collect testcafe-results.json --format testcafe In CI that's one changed line and one added step. Authenticate the CLI once with your Qualflare access token, stored as a CI secret — see the CLI docs.
# .github/workflows/tests.yml
- name: Run TestCafe
run: npx testcafe chrome:headless tests/ --quarantine-mode \
--reporter spec,json:testcafe-results.json
- name: Upload results to Qualflare
if: always() # upload even when tests fail — that's the point
run: qf my-project collect testcafe-results.json --format testcafe
The if: always() line is the one people leave out.
TestCafe exits non-zero on failures, so without it the upload runs only on green builds and your failure
history — the entire point — stays empty.
The framework that admits its tests are flaky
Most frameworks give you no in-run flakiness signal whatsoever. Go has no retry mechanism, so there is
nothing to read. TestNG has IRetryAnalyzer, but the
common implementation overwrites the failed result, so a test that failed twice and passed on the third
attempt reports a clean pass — the flakiness is actively erased. TestCafe is the exception:
# Quarantine mode: re-run a failing test, and record whether it settled
npx testcafe chrome tests/ --quarantine-mode \
--reporter spec,json:testcafe-results.json
# Defaults are successThreshold=3, attemptLimit=5 — tune if needed
npx testcafe chrome tests/ \
--quarantine-mode successThreshold=2,attemptLimit=4 TestCafe's own description is that quarantine mode exists to “eliminate false negatives and detect unstable tests”: a failing test is quarantined and repeated “until they yield conclusive results” — by default it must succeed 3 times, within at most 5 attempts. A test that needed those retries is not simply called green; it is marked unstable in the report:
{
"userAgents": ["Chrome 129.0 / macOS 15.0"],
"total": 214, "passed": 209, "failed": 3, "skipped": 2,
"fixtures": [
{
"name": "Checkout",
"tests": [
{ "name": "rejects an expired card",
"unstable": true, // ← passed, but only after a retry
"screenshotPath": "...",
"errs": [] }
]
}
]
} That single boolean is worth more than it looks. It is a framework telling you, unprompted, that a test is flaky — the exact fact most teams spend months reconstructing from CI history.
Qualflare records it structurally, not decoratively: the case
gets an unstable tag and its flaky flag is
set, so it counts in flaky scoring and filtering rather than just reading as flaky to whoever happens to
scan the tags. Storing it as a tag alone was a real defect — the information was present and unusable.
History still adds something on top. TestCafe tells you a test was unstable in this run; it cannot tell you the test has been unstable in 11 of the last 50 runs, that it started three weeks ago, or that it only happens on one browser. In-run detection and historical scoring answer different questions, and TestCafe is the rare case where you get both.
What you get on top of the JSON report
- Unstable tests scored as flaky. The quarantine signal feeds flaky scoring directly instead of sitting in a tag.
- Screenshots and video kept with the failure. For UI tests the artifact usually explains more than the stack trace does.
- Fixture-qualified identity. “Checkout > loads” and “Profile > loads” stay two tests rather than colliding into one.
- AI failure clustering. When one broken selector or a downed environment takes out 30 UI tests, they group into one root cause.
- History across runs and browsers. The JSON records the user agents; the trend is what tells you whether a fix worked.
- Sharded jobs merged. One launch per run, not one per worker.
TestCafe's JSON reporter vs Qualflare
| --reporter json | Qualflare | |
|---|---|---|
| Flags a test unstable in this run | Yes | Yes |
| Flakiness trend across runs | — | Yes |
| History across CI runs | — | Yes |
| AI failure clustering (root cause) | — | Yes |
| Merges sharded CI jobs into one run | — | Yes |
| Local, zero-setup, offline | Yes | — |
Note the first row: TestCafe already does the in-run part well, and Qualflare does not replace it. What it adds is the axis TestCafe has no way to see — the same test across thirty runs, branches and browsers.
Get AI analysis on your TestCafe runs
Start free — add the JSON reporter, run qf collect, and get your first AI analysis in minutes.
Qualflare works the same with Playwright, Cypress, Selenium, Jest, Mocha and 20+ more frameworks. On the quarantine trade-off, see flaky or a real bug? and test quarantine. Weighing tools? See how it compares to other test management platforms, or browse all framework reporting guides. Every reporter is open source.
Frequently asked questions
How do I send TestCafe results to Qualflare?
Use TestCafe’s built-in JSON reporter — npx testcafe chrome tests/ --reporter json:testcafe-results.json — then upload with qf my-project collect testcafe-results.json --format testcafe. The --reporter flag takes a comma-separated list, so you can keep spec output in the console and write the JSON file in the same run. No plugin and no change to your tests.
Does TestCafe detect flaky tests by itself?
Yes, and it is one of very few frameworks that does. Run with --quarantine-mode and TestCafe quarantines a failing test and repeats it until the result is conclusive — by default requiring 3 successes within at most 5 attempts. A test that only passed because of those retries is marked unstable in the report. That is an explicit in-run flakiness signal, which most frameworks simply do not emit — Go has no retry mechanism at all, and TestNG’s retryAnalyzer typically overwrites the failure so the report shows a clean pass.
What happens to an unstable test on upload?
It is recorded as flaky structurally, not just labelled. The case gets an "unstable" tag and its flaky flag is set, so it counts as flaky in scoring and filtering rather than only reading as flaky to a human scanning tags. Recording it as a tag alone was a real bug: the information was visible but not actionable.
Are screenshots and videos kept?
Yes, where TestCafe produced them. Screenshot paths and video recordings are carried through as attachments on the case, which matters for UI tests specifically — a stack trace rarely explains why a selector missed, and the screenshot at the moment of failure usually does.
How are fixtures represented?
A test’s identity is its fixture name plus its test name — "Checkout > rejects an expired card". Qualifying by fixture is deliberate: test names repeat constantly across fixtures ("loads", "shows an error"), and a bare name would let two unrelated tests collide into one case and silently drop a result. It also means renaming a fixture resets the history of every test inside it.
Should I use quarantine mode in CI?
It is a reasonable trade if you treat the unstable flag as a debt you pay down rather than a problem you solved. Quarantine mode keeps a flaky suite from blocking every build, and because TestCafe reports which tests needed their retries, the flakiness stays visible instead of being hidden. The failure mode is leaving it on for a year and never looking at the unstable list, at which point you have quietly accepted an unreliable suite.
Setup reflects the Qualflare CLI (docs.qualflare.com) as of September 2026. Quarantine-mode behaviour and reporter flags follow TestCafe's own documentation; the unstable-to-flaky mapping, fixture-qualified identity and attachment handling are taken from the CLI's TestCafe parser. Written by İbrahim Süren, Qualflare.