There is a way to run and debug protractor web-tests in WebStorm. I just want to share this answer here
Add “debugger” keyword to the test case that we want to debug. The test will start and pause at the beginning. We can click F8 (resume script execution), and the test will pause at the first line that has our “debugger” keyword. We can then add breakpoints and debug tests.
Debugging tests With WebStorm, you can quickly start debugging a single Jest test right from the editor or create a run/debug configuration to debug some or all of your tests. in the gutter and select Debug <test_name> from the list. to the right of the list.
When you want to run protractor scripts by opening a browser instance for each test, you should add two capabilities shardTestFiles and maxInstances in the Capabilities block of the conf. js file. This will help to execute your scripts on same browser with multiple instances.
which node
in your terminal)Node interpreter: Full path to Node.js (from step 1)
Working directory: home directory for the protractor tests.
Javascript file: Full path to node_modules/protractor/lib/cli.js
Application parameters: Full path to protractor-conf.js
Now you be able to run and debug tests by clicking on "Run" or "Debug" buttons on the top of IDE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With