2

I am using cucumber js + selenium webdriver + Webstorm IDE. What is the most convenient way to debug my tests?

1

I use Protractor in Webstorm, but I imagine this would work for you as well:

Webstorm has a built in debug tool that is pretty easy to work with. Just next to the line numbers in the IDE, click the empty space next to the number to put a red circle on that line. That's the debugger's breakpoint. Run as debugging to have it break there and you can use the debug menu to look around at the code at that point in the tests.

Also, look into configuring stacktraces to suit your needs. There tends to be an npm module for everything. Here's one that does no stacktrace, just the error message. For Protractor with Jasmine, I use jasmine-spec-reporter and just show the stacktrace in the failures summary, but it doesn't look like cucumberJS uses Jasmine (from my light Googling).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.