Docs menu

Set up diagnose-only reports

Use these recipes to diagnose an existing failure without changing the test runner. Run each command from the project root with the reporter installed, then point KwikQA at the current run's report. Compare the report formats eligible for repair and validation.

Jest

Install jest-junit as a dev dependency. In a POSIX shell, enable the file attribute so KwikQA can locate each test.

JEST_JUNIT_ADD_FILE_ATTRIBUTE=true npx jest --reporters=default --reporters=jest-junit

The default output is junit.xml. For a cross-platform setup, use ["jest-junit", { "addFileAttribute": "true" }] in Jest's reporters config and retain "default" for terminal output.

Vitest

npx vitest run --reporter=default --reporter=junit --outputFile.junit=reports/vitest.xml

Mocha

Install mocha-junit-reporter as a dev dependency.

npx mocha --reporter mocha-junit-reporter --reporter-option mochaFile=reports/mocha.xml

Cucumber-JS

Create the reports directory first if your runner needs it.

npx cucumber-js --format progress --format json:reports/cucumber.json

For the Java runner and browser-test repair eligibility, see Cucumber-JVM.

Allure results

Pass the raw allure-results directory from your framework's Allure adapter. For pytest with allure-pytest installed, for example:

.venv/bin/python -m pytest --alluredir=allure-results --clean-alluredir
npx kwikqa analyze --report allure-results --html

For other producers, use a fresh results directory for each run. KwikQA reads the whole directory as one run.

CTRF

Use your runner's CTRF reporter. For Jest, install jest-ctrf-json-reporter.

npx jest --reporters=default --reporters=jest-ctrf-json-reporter
npx kwikqa analyze --report ctrf/ctrf-report.json --html

Point --report at the JSON file the reporter writes. For pytest CTRF with Python file identities, see other pytest reports.

Generic JUnit XML

Pass a JUnit XML file or an output directory from one run. KwikQA can diagnose a compatible report even when it cannot identify its producer.

npx kwikqa analyze --report reports/junit.xml --html

Read the result

--html writes kwikqa-report.html. Add --local to group failures on your machine without an account. For a model diagnosis, sign in and approve the evidence request.

Once it has checked account access, kwikqa fix stops at inconclusive (report-only-framework) for a failing report it cannot repair. It makes no model request or test-code edit in that case. This informative outcome can exit 0. For Java, Cucumber-JVM, or pytest reports with unit tests or other groups whose browser use cannot be confirmed, see not-a-browser-test. See CLI exit codes before using the result in a CI gate.

Updated

Search the docs