SlideShare a Scribd company logo
EFFECTIVE
TESTING OF
RICH INTERNET
APPLICATIONS
Abstract
From a testing point of view, Rich Internet
Applications(RIA's) pose significant challenges due to
complex multilayer architecture. One of the most difficult
challenges from the point of view of automation testing
arises with the AngularJS use of JavaScript. The very
nature of JavaScript whereby it dynamically changes
web page content, validates inputs and creates new web
objects makes testing a challenging affair. Existing
testing tools consequently find it very difficult to keep the
test environment in sync with the application state. The
Protractor framework is able to address many of these
challenges to provide a powerful solution to effectively
test Rich Internet Applications.
2
www.compassitesinc.com
EFFECTIVE
TESTING OF
RICH INTERNET
APPLICATIONS
Pooja Gadekar
Rashwin Segu
Compassites Test Competency Center
Author
3
www.compassitesinc.com
EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS
Protractor Solution
Protractor is a popular end-to-end testing framework for AngularJS
applications. It can not only be used to test AngularJS applications but also
to perform automated regression tests for other types of web applications.
Protractor runs tests against an application instance running in a browser,
interacting with it in a manner exactly as a real user would. 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 scaffolding and reporting tools to write and
manage your tests.
Why Protractor?
Protractor comes with several exceptional features that differentiate it from
competing solutions in the market:
One of the unique features of Protractor is that it supports locator
strategies that are specific to AngularJS. This permits you to test those
page elements that are specific to AngularJS without requiring any
additional setup efforts.
Protractor supports automatic waiting which means that specific wait
and sleep steps do not need to be added to test setups. Protractor
automatically recognizes the point when a webpage has completed
executing all pending tasks and then executes the next step. This means no
manual efforts in waiting to execute a step until a webpage and the test
environment are synced up.
How does Protractor work?
Protractor works in conjunction with Selenium WebDriver to provide an
automated test infrastructure that can simulate a user’s interaction with an
AngularJS application running in a browser or mobile device. Protractor is a
wrapper around WebDriverJS, the JavaScript bindings for the Selenium
WebDriver API. While WebDriver commands are asynchronous, the test
scripts will send commands to the Selenium Server which in turn
communicates with the browser driver.
4
www.compassitesinc.com
EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS
A test using Selenium WebDriver involves three key elements - the test
script, the server, and the browser. The communication between these
elements is shown in Fig.1. The WebDriverJS upon which Protractor is built
supports drivers for all leading browsers. Output test results and errors are
written into a Test repository.
Protractor Page Object Model
The Protractor Page Object Model helps write cleaner tests by
encapsulating information about elements on the application page. The
Page Object design pattern conceptualizes the Page Object as on object
oriented class that operates as an interface to a page. The methods of this
class are then utilized by tests across suites in a standardized manner.
The use of Protractor specific code and functions can cause hiding of
business level detail, code duplication and excessive coupling between
page behavior related code and low level page logic elements , all making
for difficult maintainability. The Protractor Page Object Reference Model
helps avoid the disadvantages arising out of these factors.
Integration with Allure reports
Protractor provides complete integration with the Allure reporting
framework. Allure provides a variety of advanced functionality including
Timeline and Graphs. Allure also builds in a Behaviors page that uses BDD
based grouping to conveniently report the specific stories and features that
have reported issues during testing.
Allure is an open source testing framework that provides high quality
representations of test execution outputs in web page format. Allure takes
Fig.1 - Compassites Protractor Framework
5
www.compassitesinc.com
EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS
the standard outputs produced by xUnit and adds additional data before
producing the final outputs.
Compassites Test Lab for Protractor
Compassites has been investing for the past several years in testing
technologies that provide compelling capabilities with regards to the testing
of Rich Internet Applications and products. Compassites has customised
Protractor library functions to suit specific application needs, which is a
part of the Compassites automation test framework. Compassites has
built a test lab around the Protractor framework that involves a Hub and
three Nodes – Linux, Windows and iOS as shown below.
Fig.2 - Allure Report Sample
Fig.3 - Compassites Test Lab
Chrome Driver Firefox Driver
Test Scripts
Test Scripts
Test Scripts
Test Scripts
Scripts For Application
Under Test
Page Object Model
Hub
Selenium
Server
Protractor WebDriverJS
Config
File
Node
Browser Driver
Browser Driver
Browser Driver
IOS
IE Driver Chrome Driver Firefox Driver
Safari Driver Chrome Driver Firefox Driver
Jenkins Master
Test Scripts
Jenkins Slave
Selenium
Server
Protractor WebDriverJS
Config
File
Windows
Test Scripts
Jenkins Slave
Selenium
Server
Protractor WebDriverJS
Config
File
Linux
Test Scripts
Jenkins Slave
Chrome
Driver
Firefox
Driver
Chrome
Driver
Firefox
Driver
IE
Driver
Chrome
Driver
Firefox
Driver
Safari
Driver
6
www.compassitesinc.com
EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS
Summary
Protractor presents an excellent option for testing Rich Internet
Applications due to several reasons; support for locator strategies,
automatic waiting and the Page Object Reference model prime among
them.
Recently, Compassites has executed a testing engagement with a complex
product built on Java and AngularJS using the Protractor framework. There
were several challenges around the Protractor framework, which was
effectively overcome by the customised library functions. The use of the
Protractor framework aided in greatly reducing the number of testing cycles
and the total testing time in the engagement.
Compassites has an active Test Center of Excellence with clearly defined
focus on Web testing and Mobility testing. The Center is actively working on
Advanced automation frameworks, performance testing methodologies
and Security testing techniques. We are leveraging our expertise and assets
to deliver value-added services to our existing engagements.
Compassites Software Solutions PVT, Ltd
Bangalore, India
IBC Knowledge Park, Tower C, 4th
Floor, Bannerghatta Road,
Bangalore -560029
+91-80-4663 7200
United States
3500S, Dupont Highway
Dover, Delaware -19901
+1 408 708 9090
Singapore
Compassites Technology Solutions Pte Ltd,
International Plaza, 10 Anson Road,
#03-50, Singapore 079903
+65-67186204, +65-81574120

More Related Content

PPT
Hybrid framework
PPTX
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
PDF
automationframework
PPTX
ATLAS Automation POC
PDF
Designing keyword and Data Driven Automation framework with Selenium
PDF
Oracle Application Testing Suite. Competitive Edge
PPTX
Hybrid automation framework
PDF
O - Oracle application testing suite test starter kits for oracle e business ...
Hybrid framework
Tech talks (Automation on Selenium Web Driver. How to begin & implement)
automationframework
ATLAS Automation POC
Designing keyword and Data Driven Automation framework with Selenium
Oracle Application Testing Suite. Competitive Edge
Hybrid automation framework
O - Oracle application testing suite test starter kits for oracle e business ...

What's hot (20)

PDF
Automation framework using selenium webdriver with java
ODP
Jbossworld Presentation
PDF
OLT open script
PDF
Automation Testing using Selenium
PPTX
Best java automation training institute in Bangalore - Selenium Labs
PPT
Web Test Automation with Selenium
PPT
Testing soa, web services and application development framework applications
DOC
Hybrid framework for test automation
PDF
Case study: Open Source Automation Framework using Selenium WebDriver
DOC
PDF
Selenium 1july
PPTX
Java web start Quick Reference
PPTX
Setup and run automated test framework for android application
PPT
Selenium ppt
PPT
Data driven automation testing of web applications using selenium
PDF
Automate Web Apps With Selenium
PDF
Designing an effective hybrid apps automation framework
PPT
Selenium Presentation at Engineering Colleges
PDF
Webinar: Selenium WebDriver - Automation Uncomplicated
PPTX
Web Testing
Automation framework using selenium webdriver with java
Jbossworld Presentation
OLT open script
Automation Testing using Selenium
Best java automation training institute in Bangalore - Selenium Labs
Web Test Automation with Selenium
Testing soa, web services and application development framework applications
Hybrid framework for test automation
Case study: Open Source Automation Framework using Selenium WebDriver
Selenium 1july
Java web start Quick Reference
Setup and run automated test framework for android application
Selenium ppt
Data driven automation testing of web applications using selenium
Automate Web Apps With Selenium
Designing an effective hybrid apps automation framework
Selenium Presentation at Engineering Colleges
Webinar: Selenium WebDriver - Automation Uncomplicated
Web Testing
Ad

Viewers also liked (6)

PPT
ETAPAS DE GRANDES CAMBIOS
PPT
Iiep presentacion pubertad adolescencia shade
PPTX
Espacio geográfico: GEOGRAFÍA
PDF
Solucionario de 2do año secundaria
PPTX
Tipos de representación del espacio geográfico
PPTX
Cambios fisicos, psicologicos y sociales en el adolescente
ETAPAS DE GRANDES CAMBIOS
Iiep presentacion pubertad adolescencia shade
Espacio geográfico: GEOGRAFÍA
Solucionario de 2do año secundaria
Tipos de representación del espacio geográfico
Cambios fisicos, psicologicos y sociales en el adolescente
Ad

Similar to Effective testing of rich internet applications (20)

PPTX
Protractor overview
PDF
Maximize Your JavaScript Test Automation: Top Frameworks & Best Practices
PPTX
9 Best JavaScript Frameworks To Choose
PDF
Comparison Between React Vs Angular.pdf
PPTX
Web driver interface
PDF
7.pdf
PPTX
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
PPTX
Selenium-3-vs-Selenium-4-A-Deep-Dive-into-Web-Automation-Evolution (1).pptx
PPTX
Automated Acceptance Testing Example
PDF
React.js vs angular.js a comparison
PDF
11 Top Cross Browser Testing Tools to Know About.pdf
PDF
11 Top Cross Browser Testing Tools to Know About.pdf
PDF
React vs. vue which framework to select and when
PPTX
Introduction to APIs & how to automate APIs testing with selenium web driver?
DOCX
Top 10 Javascript Frameworks For Easy Web Development
PDF
Shashank_Venkataramanacharya
PDF
Cypress vs Playwright: A Comparative Analysis
PDF
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
PDF
Appium in Action: Automating Flutter & React Native Apps
PPTX
Latest Web development technologies 2021
Protractor overview
Maximize Your JavaScript Test Automation: Top Frameworks & Best Practices
9 Best JavaScript Frameworks To Choose
Comparison Between React Vs Angular.pdf
Web driver interface
7.pdf
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
Selenium-3-vs-Selenium-4-A-Deep-Dive-into-Web-Automation-Evolution (1).pptx
Automated Acceptance Testing Example
React.js vs angular.js a comparison
11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf
React vs. vue which framework to select and when
Introduction to APIs & how to automate APIs testing with selenium web driver?
Top 10 Javascript Frameworks For Easy Web Development
Shashank_Venkataramanacharya
Cypress vs Playwright: A Comparative Analysis
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Appium in Action: Automating Flutter & React Native Apps
Latest Web development technologies 2021

Effective testing of rich internet applications

  • 2. Abstract From a testing point of view, Rich Internet Applications(RIA's) pose significant challenges due to complex multilayer architecture. One of the most difficult challenges from the point of view of automation testing arises with the AngularJS use of JavaScript. The very nature of JavaScript whereby it dynamically changes web page content, validates inputs and creates new web objects makes testing a challenging affair. Existing testing tools consequently find it very difficult to keep the test environment in sync with the application state. The Protractor framework is able to address many of these challenges to provide a powerful solution to effectively test Rich Internet Applications. 2 www.compassitesinc.com EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS Pooja Gadekar Rashwin Segu Compassites Test Competency Center Author
  • 3. 3 www.compassitesinc.com EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS Protractor Solution Protractor is a popular end-to-end testing framework for AngularJS applications. It can not only be used to test AngularJS applications but also to perform automated regression tests for other types of web applications. Protractor runs tests against an application instance running in a browser, interacting with it in a manner exactly as a real user would. 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 scaffolding and reporting tools to write and manage your tests. Why Protractor? Protractor comes with several exceptional features that differentiate it from competing solutions in the market: One of the unique features of Protractor is that it supports locator strategies that are specific to AngularJS. This permits you to test those page elements that are specific to AngularJS without requiring any additional setup efforts. Protractor supports automatic waiting which means that specific wait and sleep steps do not need to be added to test setups. Protractor automatically recognizes the point when a webpage has completed executing all pending tasks and then executes the next step. This means no manual efforts in waiting to execute a step until a webpage and the test environment are synced up. How does Protractor work? Protractor works in conjunction with Selenium WebDriver to provide an automated test infrastructure that can simulate a user’s interaction with an AngularJS application running in a browser or mobile device. Protractor is a wrapper around WebDriverJS, the JavaScript bindings for the Selenium WebDriver API. While WebDriver commands are asynchronous, the test scripts will send commands to the Selenium Server which in turn communicates with the browser driver.
  • 4. 4 www.compassitesinc.com EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS A test using Selenium WebDriver involves three key elements - the test script, the server, and the browser. The communication between these elements is shown in Fig.1. The WebDriverJS upon which Protractor is built supports drivers for all leading browsers. Output test results and errors are written into a Test repository. Protractor Page Object Model The Protractor Page Object Model helps write cleaner tests by encapsulating information about elements on the application page. The Page Object design pattern conceptualizes the Page Object as on object oriented class that operates as an interface to a page. The methods of this class are then utilized by tests across suites in a standardized manner. The use of Protractor specific code and functions can cause hiding of business level detail, code duplication and excessive coupling between page behavior related code and low level page logic elements , all making for difficult maintainability. The Protractor Page Object Reference Model helps avoid the disadvantages arising out of these factors. Integration with Allure reports Protractor provides complete integration with the Allure reporting framework. Allure provides a variety of advanced functionality including Timeline and Graphs. Allure also builds in a Behaviors page that uses BDD based grouping to conveniently report the specific stories and features that have reported issues during testing. Allure is an open source testing framework that provides high quality representations of test execution outputs in web page format. Allure takes Fig.1 - Compassites Protractor Framework
  • 5. 5 www.compassitesinc.com EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS the standard outputs produced by xUnit and adds additional data before producing the final outputs. Compassites Test Lab for Protractor Compassites has been investing for the past several years in testing technologies that provide compelling capabilities with regards to the testing of Rich Internet Applications and products. Compassites has customised Protractor library functions to suit specific application needs, which is a part of the Compassites automation test framework. Compassites has built a test lab around the Protractor framework that involves a Hub and three Nodes – Linux, Windows and iOS as shown below. Fig.2 - Allure Report Sample Fig.3 - Compassites Test Lab Chrome Driver Firefox Driver Test Scripts Test Scripts Test Scripts Test Scripts Scripts For Application Under Test Page Object Model Hub Selenium Server Protractor WebDriverJS Config File Node Browser Driver Browser Driver Browser Driver IOS IE Driver Chrome Driver Firefox Driver Safari Driver Chrome Driver Firefox Driver Jenkins Master Test Scripts Jenkins Slave Selenium Server Protractor WebDriverJS Config File Windows Test Scripts Jenkins Slave Selenium Server Protractor WebDriverJS Config File Linux Test Scripts Jenkins Slave Chrome Driver Firefox Driver Chrome Driver Firefox Driver IE Driver Chrome Driver Firefox Driver Safari Driver
  • 6. 6 www.compassitesinc.com EFFECTIVE TESTING OF RICH INTERNET APPLICATIONS Summary Protractor presents an excellent option for testing Rich Internet Applications due to several reasons; support for locator strategies, automatic waiting and the Page Object Reference model prime among them. Recently, Compassites has executed a testing engagement with a complex product built on Java and AngularJS using the Protractor framework. There were several challenges around the Protractor framework, which was effectively overcome by the customised library functions. The use of the Protractor framework aided in greatly reducing the number of testing cycles and the total testing time in the engagement. Compassites has an active Test Center of Excellence with clearly defined focus on Web testing and Mobility testing. The Center is actively working on Advanced automation frameworks, performance testing methodologies and Security testing techniques. We are leveraging our expertise and assets to deliver value-added services to our existing engagements. Compassites Software Solutions PVT, Ltd Bangalore, India IBC Knowledge Park, Tower C, 4th Floor, Bannerghatta Road, Bangalore -560029 +91-80-4663 7200 United States 3500S, Dupont Highway Dover, Delaware -19901 +1 408 708 9090 Singapore Compassites Technology Solutions Pte Ltd, International Plaza, 10 Anson Road, #03-50, Singapore 079903 +65-67186204, +65-81574120