Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

protractor for testing angularjs

Protractor is an end to end test framework for Angular applications built on top of WebDriverJS.

I am new to the field of web testing, and I am trying to figure out what are the advantages of using protractor, instead of using directly WebDriverJs. What is the added value of protractor?

like image 653
cateof Avatar asked Oct 18 '13 20:10

cateof


People also ask

Is Protractor only for AngularJS?

Protractor is an open source end-to-end testing framework for Angular and AngularJS applications. It was built by Google on the top of WebDriver. It also serves as a replacement for the existing AngularJS E2E testing framework called “Angular Scenario Runner”.

Why Protractor is used for Angular applications?

Protractor supports Angular-specific locator strategies, which allows you to test Angular-specific elements without any setup effort on your part.

What are the test frameworks supported by Protractor?

Protractor supports two behavior driven development (BDD) test frameworks out of the box: Jasmine and Mocha. These frameworks are based on JavaScript and Node. js and provide the syntax, scaffolding, and reporting tools you will use to write and manage your tests.


1 Answers

The added value of protractor is that Protractor knows about Angular. This has some advantages like:

  • You do not have to build in wait statements to wait for angular processing because protractor knows when Angular is still busy and waits for it.
  • You can add extra selectors on things like Angular bindings, Angular repeators, ..
like image 152
Edwin Avatar answered Oct 14 '22 19:10

Edwin