Skip to content

gooddaytoday/testcafe-reporter-spec

 
 

Repository files navigation

testcafe-reporter-spec-plus

This is fork of the Spec reporter plugin for TestCafe. You can:

  • Filter warnings by specifying filter option in testcafe's config files: .testcaferc.cjs and .testcaferc.cjs:
  • Log progress after each fixture. Disabled by default.
  • Add human-readable duration (with colors by duration!) to every test. Disabled by default.
module.exports = {
    ...,
    reporter: [
        {
            name: "spec-plus",
            filter: [
                "TestCafe cannot interact with the",  // Substring
                /Was unable to take a screenshot due/ // Regex also could be used
            ],
            showProgress: true  // Log progress after each fixture
            showDuration: false // Switch off duration logging
        },
    ]
}

preview

Install

This reporter is shipped with TestCafe by default. In most cases, you won't need to install it separately.

However, if you need to install this reporter, you can use the following command.

npm install testcafe-reporter-spec-plus

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 spec-plus

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

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

Author

Developer Express Inc. (https://devexpress.com) and George Kiselev

About

This is the Spec reporter plugin for TestCafe.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%