Testcafe: More verbose output about actions and assertions

Created on 8 Jul 2019  路  7Comments  路  Source: DevExpress/testcafe

https://stackoverflow.com/questions/56932508/how-to-be-more-verbose-on-tests
https://stackoverflow.com/questions/56980542/testcafe-display-steps-while-running-tests

It will be useful if TestCafe provides more info about executed steps. Example:

-------------------------------------------------------------------------
VISIT: http://example.com
TYPE: 'username' in #UserName
CLICK: 'submit' button
-------------------------------------------------------------------------
level 2 enhancement

Most helpful comment

I'd like to see a shortened version of DEBUG=testcafe:* as well with what actions took place, what selectors / assertions took place and an option to show more or less.

All 7 comments

This would be nice to have

I'd love this too, especially with timing information.

Can confirm that it would relieve lives of developers for sure.

This is not just "nice", this would be an absolute lifesaver, which would (in many scenarios) make all the difference. Is there really not an option already which does just this? So, indeed, simply the ability to have the executed steps printed to the terminal (console). That would make it like a dozen times easier to know what's going, on and to troubleshoot things.

npm i testcafe-reporter-spec-time -D
./node_modules/.bin/testcafe -r spec-time chrome:headless ./tests

This gives you timing granularity.

Alternatively there's a DEBUG flag you can set to get testcafe to output everything

DEBUG=testcafe:* testcafe

This will give you all the messages it sends between main process and browser process.

Thanks!

I've tried the spec-time reporter - but, unless I'm mistaken, that doesn't address my problem - it's not printing what's going on, as it happens, while the test is running - it just prints the results after the test is finished.

I've tried DEBUG=testcafe:* and yes, that sort of achieves what I was looking for, but it's way way way too verbose, you then need to sift through a huge amount of cruft to see what's going on, that's virtually impossible.

So, yes a DEBUG=testcafe:* but much more concise, something along the lines of what @miherlosev was describing would be perfect.

It could be me, but I would say that this might be the #1 "game changer" feature which many TestCafe users are secretly craving for ;)

I'd like to see a shortened version of DEBUG=testcafe:* as well with what actions took place, what selectors / assertions took place and an option to show more or less.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inikulin picture inikulin  路  3Comments

madroneropaulo picture madroneropaulo  路  3Comments

xalvarez picture xalvarez  路  3Comments

chebum picture chebum  路  3Comments

KaneMorgan picture KaneMorgan  路  3Comments