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
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.
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.
Selenium |
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 - 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:
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.
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.
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:
https://bitbucket.org/gadgeon/protractor-framework/get/7811e0467967.zip