I have been able to write tests using protractor in VS2013, however, when I open my "Test Explorer" tab and right click on the test I want to run it fails within seconds. I'm wondering if it is not possible to run protractor tests this way and if they can only be run from the cmd.
I have checked out the links left on other questions on this site and none of them have fixed the issue I am running into.
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.
Yes that is possible to Run the Protractor Tests in Visual Studio.
To run the Tests, you need to create a Node.Js Console application (Get template online) and create the project.
Here are the Steps:
Create a Node.js Console Application and install Protractor
npm install protractor --save-dev
Update selenium standalone server .bin\webdriver-manager update
Start selenium standalone server .bin\webdriver-manager start
Run test specs .bin\protractor protractor.conf.js
To get the tests in the Test Explorer in Visual Studio 2013, you need to get the Chutzpah Test Adapter which is a extension of visual studio.
you can either go to https://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe and download or go to Tools => extension and updates => search for this tool.
Once you have installed, you can run the tests directly from visual studio.
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