Closed bhatnagars closed 5 years ago
got it finally on my own
For anyone encountering this issue, the format for the reporter
should be .reporter("html", "report.html")
when instantiating the runner class i.e
return runner
.src('test.js')
.browsers(['chrome'])
.reporter("html", "report.html")
.run();
Global installation is required
npm install -g testcafe-reporter-html
Please help in getting the reports generated through runner class
runner class === const createTestCafe = require ('testcafe'); let testcafe = null;
createTestCafe('localhost', 1337) .then(tc => { testcafe = tc; const runner = testcafe.createRunner();
return runner .src(['tests/my-demo.js']) .browsers(['safari']) .reporter('Reports/') .run(); }) .then(failedCount => { console.log('Tests failed: ' + failedCount); testcafe.close(); });
==== Getting below error TestCafe nimit$ node runner.js Error: The provided "html:Reports/" reporter does not exist. Check that you have specified the report format correctly. at /Users/nimit/TestCafe/node_modules/testcafe/src/runner/bootstrapper.js:146:27 at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Promise.all (index 0) Nimits-MacBook-Pro:TestCafe nimit$ node runner.js Error: The provided "Reports/" reporter does not exist. Check that you have specified the report format correctly. at /Users/nimit/TestCafe/node_modules/testcafe/src/runner/bootstrapper.js:146:27 at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Promise.all (index 0)