JESii
JESii

Reputation: 4967

Testcafe: find current working directory from test

I have a working TestCafe test suite which generates a custom xml report generated by code in the test suite. I would like to place this report in the "standard" ./results location that TestCafe uses for its reports, but I can't find an option to retrieve the current working directory (e.g., the bash pwd command).

I'm getting it by adding export pwd=$(pwd) on the command line when I run the test, but I wonder if there's a built-in mechanism in TestCafe to do this?

Upvotes: 1

Views: 175

Answers (1)

Alex Kamaev
Alex Kamaev

Reputation: 6318

If you run the tests from the command line, you can just use the reporter option as follows:

testcafe chrome test.js --reporter xunit:results/output.txt

See this question for details: How to save report results from console to a file (TestCafe)?.

Upvotes: 2

Related Questions