Search code examples
javascripttestingautomated-teststestcafeend-to-end

How to save report results from console to a file (TestCafe)?


I'm doing e2e tests with Test-cafe. I would like to know if there is a way to save the report results from the console to a file. So, every time the tests are finished, the results are automatically saved in a separate file that I could use to see what's wrong, etc.

https://devexpress.github.io/testcafe/

ps. I'm using Ubuntu.

Thanks.


Solution

  • You can use the reporter option (-r, --reporter) to output to a file.

    For example, testcafe chrome example.js -r spec:output.txt produces the following file:

    enter image description here

    You can find the list of built in reporters here, as well as some links to custom reporters that you would have to install separately.