What is Protractor:
·
Protractor is
an end-to-end test framework for Angular and AngularJS applications. Protractor
runs tests against your application running in a real browser
·
Protractor is
built on top of WebDriverJS, which uses native events and browser-specific
drivers to interact with your application as a user would.
·
Protractor
supports Angular-specific locator strategies, which allows you to test
Angular-specific elements without any setup effort on your part.
·
Protractor also
speeds up your testing as it avoids the need for a lot of “sleeps” and “waits” in your tests,
as it optimizes sleep and wait times
·
It runs on real
browsers and headless browser
History:
·
The first version of Protractor was
released in July, 2013, when the framework was basically a prototype of a
testing framework. However, Google, with the support of the testing community,
is evolving the framework to follow the evolution of AngularJS and to meet the
needs of the community that is using AngularJS.
·
The Protractor project is public
in Github and you can follow the issues in the project, add issues you think
are interesting, comment on issues opened by others, do a pull request to help
the project, etc. Anyone interested in supporting the growth of the project is
welcome!
Protractor is a
framework for automation of functional tests, so its intention isn't to be the
only way to test an AngularJS application, but to cover the acceptance criteria
required by the user
Salient Features of Protractor:
·
It is built on the top of Selenium
server.
·
Introduced new simple syntaxes to write tests.
·
The developer/tester can take advantage of
Selenium grid to run multiple browsers.
·
A developer can use Jasmine or Mocha to write
test suites.
As Protractor
was built on top of Selenium WebDriver, so it contains every feature that is
available in the Selenium WebDriver. Also, Protractor provides some new
strategies and functions which are very useful to automate AngularJS
applications.
It is also
possible to use some drivers which implement WebDriver's wire protocol
like ChromeDriver and GhostDriver, as Protractor
runs on top of the Selenium. In the case of ChromeDriver it is possible to run
tests without the Selenium Server. However to run tests using GhostDriver you
need to use PhantomJS which uses GhostDriver to run tests in Headless mode.
What is Angular JS applications:
They are Web
Applications which uses extended HTML's syntax to express web application
components. It is mainly used for dynamic web applications. These applications
use less and flexible code compared with normal Web Applications.
Why cant we use selenium webdriver for
Angular Applications:
Angular
applications has attributes like ng-repeater, ng-controller, ng-model.., etc.
which are not included in Selenium locators due to which selenium is not able
identify such objects. So Protractor on top of Selenium can handle those objects
in any web application.
No comments:
Post a Comment