testcafe-reporter-slack-errors-only

1.6.1 • Public • Published

testcafe-reporter-slack-errors-only

Build Status

This is the slack-errors-only reporter plugin for TestCafe.

preview

Install

npm install testcafe-reporter-slack-errors-only

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 slack-errors-only

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

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

Important Note

If you are looping over your test fixtures, each test fixture must have a unique name (otherwise error reports will be all grouped together under the same name, making it difficult to attribute the source of the error for each test)

For example:

//test.js  
 
function testFlow(config) {
 
    fixture(`${config.testName}`)
        .page `http://example.com`
 
        test('Example', async t => {
            await config.testing();
        });
}
 
const testSuite = getTestSuite();
 
for (const config of testSuite) {
    testFlow(config);
}

Author

Eden Adler

Package Sidebar

Install

npm i testcafe-reporter-slack-errors-only

Weekly Downloads

6

Version

1.6.1

License

MIT

Unpacked Size

6.93 kB

Total Files

5

Last publish

Collaborators

  • edenadler