Protractor is a test framework for Angular and AngularJS applications. Protractor executes tests against your application running in a real browser, which ensures correctness and trustworthiness of test results. JetBrains Rider integrates with Protractor so you can run and debug your tests from inside the IDE. You can see the test results in a treeview and easily navigate to the test source from there.
Before you start
Download and install Node.js.
You can install Protractor locally, in your project, or globally. Global installation is preferable.
To install Protractor globally
npm install -g protractor
To download the necessary binaries, type
webdriver-manager update. See also Getting Started on the Protractor official website.
To create a Protractor run configuration
Specify the location of the protractor package and the path to the protractor.conf.js configuration file. If you followed the standard installation, JetBrains Rider detects all these paths and displays them in the corresponding fields.
To run tests via a run configuration
Start the Selenium Server manually or configure it to start automatically in protractor.conf.js. For details, see the Protractor official website.
View and analyze messages from the server in the <current_run_configuration_name> tab of the Run tool window.
With JetBrains Rider, you can jump between a file and the related test file or from a test result in the Test Runner Tab to the test.
To jump between a test and its subject or vice versa, open the file in the editor and selector from the context menu, or just pressN/A.
To jump from a test result to the test definition, click the test name in the Test Runner tab twice or select from the context menu. The test file opens in the editor with the cursor placed at the test definition.
To start debugging tests
Create a Protractor run/debug configuration as described above.