Search code examples
automated-testsreportinge2e-testingweb-testingtestcafe

Testcafe reporter inside script


Is it possible to add a reporter to a TestCafe js File? Common usage is:

testcafe chrome 'path/to/test/file.js' --reporter allure

But is it also possible to add this to the script itself? In my script I have

import { Selector } from 'testcafe';

fixture `Ordner erstellen`
    .page `https://bc3-channel.cliplister.com/`;

//It is absolutely necessary that the names are completely unique for finding elements.


test('Create and Delete Folder', async t => {
   .click(Selector('span').withText('Login'))
});

Can I add a section inside the script?


Solution

  • Yes, you can use the TestCafe Programming Interface and its reporter property for this purpose.

    However, I'm not sure what 'section' you'd like to add. Please clarify this.