testcafe-reporter-spec-plus
v2.3.2
Published
Spec TestCafe reporter plugin with warnings filter and other bonuses.
Downloads
12,510
Maintainers
Readme
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
},
]
}
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