Registry / testing / testcafe-reporter-nunit

testcafe-reporter-nunit

JSON →
library0.1.2jsnpmunverified

The `testcafe-reporter-nunit` package provides a plugin for TestCafe, an end-to-end testing framework, to generate test results in the NUnit Test Result XML format. This specific reporter (version 0.1.2) outputs an XML file that can be consumed by various CI/CD systems, such as Azure DevOps, which rely on the NUnit XML schema for displaying and analyzing test outcomes. This package is an early and relatively minimal implementation. Its release cadence is effectively abandoned, with its GitHub repository showing no significant updates for a considerable period. While it fulfills the basic requirement of producing NUnit-compatible XML, it lacks advanced features such as detailed screenshot attachments, rich metadata, or explicit NUnit 3 support, which are typically found in more modern alternatives like `testcafe-reporter-nunit3`.

npm install testcafe-reporter-nunit
INSTALL
IMPORT
SIG · TESTCAFE-REPORTER-
T
testcafe-reporter-nunit
testingjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Reporter via CLI
testcafe chrome tests/my-fixture.js --reporter nunit:report.xml
Reporters are activated via the TestCafe command-line interface using the `--reporter` or `-r` flag, followed by the reporter's name and an optional output file path. The reporter is `nunit` for this package.
Reporter via TestCafe API
await runner.browsers('chrome').src('tests/my-fixture.js').reporter('nunit', 'report.xml').run();
When using TestCafe programmatically, the reporter name and output file are passed to the `runner.reporter()` method. This allows for dynamic configuration within a Node.js script.
Reporter via Configuration File
{ "reporter": [ { "name": "nunit", "output": "results/nunit-report.xml" } ] }
For project-wide configuration, the reporter can be specified in the `.testcaferc.json` file. It can be combined with other reporters, provided only one outputs to stdout.

Demonstrates how to install the reporter, create a basic TestCafe test, and then run TestCafe via the command line to generate an NUnit XML report.

npm install --save-dev testcafe testcafe-reporter-nunit // Create a sample TestCafe test file (e.g., tests/example.js) // const { Selector } = require('testcafe'); // Not needed for basic fixture fixture `Getting Started` .page `http://devexpress.github.io/testcafe/example`; test('My first test', async t => { await t .typeText('#developer-name', 'John Smith') .click('#submit-button'); const articleHeader = await t.eval(() => document.querySelector('.result-content > h1').innerText); await t.expect(articleHeader).eql('Thank you, John Smith!'); }); // Run TestCafe from your terminal to generate the NUnit XML report: // npx testcafe chrome tests/example.js --reporter nunit:report.xml // This command will run the tests in Chrome and save the NUnit XML output to 'report.xml'.
Debug
Known issues
deprecatedThis `testcafe-reporter-nunit` package (v0.1.2) appears to be largely unmaintained. Its GitHub repository shows minimal activity and it has not been updated in several years.
fix
Consider using `testcafe-reporter-nunit3` (npm install testcafe-reporter-nunit3) as a modern, actively maintained alternative, especially if you require NUnit 3 compatibility or advanced features like screenshot attachments and quarantine mode support.
affects: >=0.1.2
gotchaTestCafe reporters are plugins and are not imported directly into your test files using `import` or `require`. Instead, they are specified as command-line arguments, in the TestCafe API, or within the configuration file.
fix
Refer to the `imports` section for correct usage patterns via CLI, API, or configuration file.
affects: >=0.1.0
gotchaWhen using multiple reporters in TestCafe, only one reporter can output to `stdout` (the console). If you specify multiple reporters without an output file for each, TestCafe will throw an error.
fix
Ensure that only one reporter (e.g., `spec` or `list`) is configured to output to `stdout`. All other reporters, including `nunit`, should specify an output file path (e.g., `--reporter nunit:report.xml`).
affects: >=0.1.0
Errors
Common errors & fixes
Error: Reporter 'nunit' is not found. Make sure that you have installed it (e.g. `npm install testcafe-reporter-nunit`).
The `testcafe-reporter-nunit` package is not installed or TestCafe cannot locate it in `node_modules`.
fix
Ensure the package is installed as a `devDependency` (`npm install --save-dev testcafe-reporter-nunit`) and that `node_modules` is accessible to your TestCafe command.
Error: You cannot use multiple reporters that write to stdout. Specify a file path for one of them.
Multiple reporters are configured without specifying an output file for each, leading to a conflict where more than one attempts to write to the console.
fix
Modify your TestCafe command or configuration to specify an output file for the NUnit reporter (e.g., `--reporter spec,nunit:report.xml`) and ensure only one reporter writes to stdout.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
testcafe-reporter-nunit — npm install testcafe-reporter-nunit · libregistry