Skip to content

VeryBuy/testcafe-reporter-slack-errors-only

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A custom reporter plugin for TestCafe that reports errors to Slack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%