How effective is your test automation framework for AngularJS based Applications?

by Satya K Vivek | February 22, 2018 How effective is your test automation framework for AngularJS based Applications?

Few years back the web user interface design evolved into a single page concept. This approach later gained wide acceptance and emerged as a better technology named AngularJS.

A well-designed test automation framework should have

  • Well defined structure
  • Robust key words
  • Pluggable interface for interacting with other third party tools like browser stack, Appium etc.

Effective Approach for Automating AngularJS based Web applications?

AngularJS applications doesn't have that much difference than other web applications as it make use of HTML directives, templates etc. Hence the automation is also possible on AngularJS applications similar to other non-angular applications. Two different approaches are considered for the angular content automation.

  • Most commonly used automation tool selenium
  • Newly emerged protractor released by google.

Selenium is the widely used tool which also supports automation of angular applications. But when we analyze deeply, Selenium have few limitations while automating the angular applications which can be addressed by using Protractor.



Need to deal with synchronization issues

It automatically handles synchronization issues

There is no locator strategy available for angular specific locators

Angular specific locator strategy is available

Need to add sleeps/waits while scripting

No need to add sleeps/waits

Same scripts cannot be used for mobile browsers

Ability to run the same scripts in mobile browsers without changing the code

Execution is not that much fast

Faster execution

Gadgeon’s Protractor Framework - A Solution for Automating Angular based Web Applications

Gadgeon - IoT software development company developed a customized framework by making use of protractor and other third party tools which serves as an end to end solution for AngularJS application automation.

Key differentiator for Gadgeon’s Protractor Framework:

  • Well defined structure which enables maintainability
  • Robust key words for better stability and reusability
  • Browser Stack support for cross browser compatibility testing on real browsers
  • Appium support for extending this framework to integrate with MobApp testing
  • Pluggable interface for DevOps build Chain, CI Framework and Test Management tools like TestRail.

The test engine contains the protractor along with selenium webdriver and selenium server. The installed jasmine framework will help to write the test cases as it contains predefined keyword which can be used to define test cases and suites. Based on the manual trigger or trigger from CI server, automation engine will initiate the execution of test cases based on the configurations provided.

 test automation framework for AngularJS based Applications

The directory structure allows user to write the test in such a way that test scripts and test objects will be separated.  If there any changes required in future, only those objects need to be modified. There are distinct locators available for setting the framework related properties, for storing the element locators, for providing the test data etc. This framework already packed with predefined helper methods which allow the user to select any of those methods while scripting.

We have maintained the following directory structure for our framework.

  • Configuration Base: Contains all the configuration parameters, suite parameters and execution details.
  • Action helper: Customized helper methods for different set of actions are defined here. This includes:
    • Click helper methods
    • Sendkeys helper methods
    • Validation action helper methods
    • Web actions helper methods
    • Other utility actions helper methods.
  • Reporting: Detailed test execution logs and reports are created using open source tools.
  • Test Objects Package: This package contains the test object files which are required for writing the test scripts. For each test files there will be a corresponding test object file.
  • Test Package: This package contains the test files from which the methods in test object files will be called. All the test cases are grouped into different suites.
  • Utility Package: This package contains other helper methods for framework, Element repository and Test data. Whenever there is a change in an element locator or test data, there is no need to edit the values in test scripts or test object files as the changes are required only for the files in Utility Package.
  • Other Unique Features provided
    • Integrated with Appium mobile automation tool.
    • Integrated with standard SQL /NoSQL databases
    • Data parsing modules for excel, json, xml etc.


For the automation of angular web platforms a well-defined test automation framework is essential and these requirements resulted in Gadgeon Protractor framework which makes use of Protractor as the base. This user friendly framework supports integration with various tools and provides more features which are useful while automation. In the context of agile and DevOps this framework will be having a great impact as it helps for faster release of the application with much better quality.

You can download the primary version of Gadgeon Protractor Automation framework from the following link:

Download this Blog
You may also like