Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.41 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.41 KB

testcafe-reporter-junit

Build Status

This is the fork of the xUnit reporter plugin for TestCafe.

This reporter plugin for TestCafe outputs a junit xml report that is compatible with continuous integration servers like Jenkins. The main difference between this plugin and the default xunit plugin is that in this plugin, the testcase name attribute will only contain the testcase name and any additional information such as screenshots and (unstable) flags are output to <system-out/> tag. This allows for better reporting and analysis or repeated test runs.

preview

Install

To install this reporter, you can use the following command:

npm install testcafe-reporter-junit

Usage

When you run tests from the command line, specify the reporter name by using the --reporter option:

testcafe chrome 'path/to/test/file.js' --reporter junit

When you use API, pass the reporter name to the reporter() method:

testCafe
    .createRunner()
    .src('path/to/test/file.js')
    .browsers('chrome')
    .reporter('junit') // <-
    .run();