Protractor test framework for AngularJS applications, An introduction

28 / Oct / 2015 by Gaurav Gupta 0 comments

When to Use Protractor for automation testing?

Protractor is an end-to-end testing framework for AngularJS applications. It is customized for selenium to create tests for AngularJS applications like locator strategies are based on angular js specifically.

Protractor is based on AngularJS concepts, Which makes it easy to use if you already know about AngularJS.It is a framework for automation of functional tests, so it’s intention isn’t the only way to test an AngularJS application, but also to cover the acceptance criteria required by the user.

How Protractor works ?

1-Protractor works with Selenium using selenium server to provide an automated test infrastructure that can validate the user interaction on the angularjs application running on web browser.


2-Protractor is a wrapper to WebDriverJS, the JavaScript bindings for the Selenium WebDriver API

3-The WebDriverJS API is based on promises, which are managed by a control flow and return promises.

4-Test scripts from protractor send commands to the Selenium Server, which in turn communicates with the browser for user interaction with application.

Protractor Advantages

1-Protractor is a Node.js based program which supports the Jasmine, Mocha, and Cucumber test frameworks.

2-Protractor comes with many advantages like spec files, config files and global variables which help to work with test frameworks like Jasmine, Cucumber or Mocha using protractor.

3-Using Protractor, various automation strategies like page objects, configuring test suites etc can also be implemented for automation test frameworks.

4-Protractor speeds up test execution as it avoids sleep and waits which occurs much because of asynchronous nature of angular js applications.

5-It runs on real browsers and headless browsers too.



Leave a Reply

Your email address will not be published. Required fields are marked *