Apexon Test Automation Framework

Reading Time: 19  min

Apexon Test Automation Framework

I want to take opportunity to introduce you Apexon test automation framework. With increase in market needs for creating efficient web functional test automation using selenium, Apexon has developed an automation framework. Apexon test automation framework is designed to solve common industry problems related to testing complex web systems. The framework is best suited for writing Automated Web Application UI Tests to simulate real user activities on the page.

The framework is built upon java and integrates TestNG, Selenium, Autoit, ReportNG. Due to the framework’s thorough design, test developer does not need to worry about common tasks such as thread safe browser session for running test in parallel, reporting or to incorporate result with test management tools. The tests run can be configured through standard testing configuration files, the test run filters and behavior can be changed within the config File.

The architecture of the framework ensures a low cost of maintenance while supporting extensibility by:

  • Abstracting the technical implementation away from the operational components
  • Following accepted design patterns in creating the core functionalities within the framework.
  • Providing an approach to develop highly maintainable and repeatable tests that utilize reusable test assets, proper modularity and semantic structure. Framework has readymade services for assertions, browser, reporting and data. Also, framework concept is based on page services so your page and related actions will be reusable from any test case. There is a good logging functionality and screen shot facility for assertions.

Features

Some features of the framework are:

  • Less maintenance
  • More reusability of code
  • Reduced execution time
  • Data-driven capability
  • Handles file upload/download
  • Easy configurable parallel execution, Supports parallel execution provided by TestNG
  • Descriptive report with all verification/assertions having screenshots
  • Utility classes
  • Test Results integration with test management tools like QMetry, Rally.
  • Integration with Sauce labs, Supports parallel execution
  • Enabling testing across multiple platforms with or without selenium grid

Question over here is how the framework reduces maintenance, execution time and reuses code?

Apexon test automation framework provides high level construct to satisfy automation needs. It includes top level interfaces, abstract base classes, service classes and their implementations and custom annotations. Test developer only need to concentrate on writing the tests and not spend time on adjusting the underlying framework.

This framework provides test page concept in a best efficient way by which you can manipulate page navigation same as on actual web application under test. Once page get created page objects/functionalities can be used in any test case, makes code more reusable. The framework takes care of not only launching that page but the entire page hierarchy to reach that specific page. Furthermore it also checks that is page already active in browser? If so then it will continue from there, results in reduced execution time.

When functionality changes only the specific test page file needs to be updated: if there is any change in page/ui of web application under test you need to update just in particular page rather than each and every test case, thus result in less maintenance.

In case of sequential execution it will take advantage of sharing browser sessions between multiple test cases. No special coding or design required to run test in parallel, you just need to set parallel attribute’s appropriate value in configuration file (eg. false, Test, methods, classes) and framework will take care for providing thread safe browser sessions with maximum level of sharing browser session between multiple test cases.? This will result in reducing time by parallel processing as well as by some level of sharing browser session(depends on configuration). You also can configure to run parallel in different browser (eg. iexplorer, firefox) with or without selenium grid. If you are not planning for physical distributed selenium server then, without selenium grid, you can achieve higher performance by the framework as compare to grid that configured different selenium server instance on the same physical machine. While integration with Sauce labs, though Sauce labs not provides parallel processing, still you can achieve parallel processing using this framework.

Reporting of test run result includes selenium commands log, each assertions/verification details with screenshot on failure. One can configure to capture screenshots for pass verifications too.

Case Study:

For understanding how one can create page navigation let us see an example. Suppose I want to write test case(s) for edit user account functionality on my web site. In order to test it manually one has to navigate through login page-> My account -> edit account. The page implementation for this site looks like below:

 

/**

* Login page ? site entry point

* Reacts as home page once user logged in

*/

publicclass LoginPage extends BaseTestPage<TestPage> {

public LoginPage (SeleneseTestBase stb) {

super(stb);

}

??

}

publicclass MyAccountPage extends BaseTestPage<LoginPage> {

public MyAccountPage (SeleneseTestBase stb) {

super(stb);

}

??

}

publicclass EditAccountPage extends BaseTestPage<MyAccountPage> {

public EditAccountPage (SeleneseTestBase stb) {

super(stb);

}

// below are method that will be used by framework as and when needed

@Override

protectedvoid initParent() {

parent = new MyAccountPage(stb);

}

@Override

protectedvoid openPage(PageLocator loc) {

parent.clickEditAccount();

//selenium.click(loc.getLocator());

}

@Override

publicboolean isPageActive() {}

??

}

//page functionality goes here

//for all elements

publicvoid editAccountDetais(UserInfoBean bean) {

//set element values

}

//for individual element

publicvoid setFirstName(String s) {

}

publicvoid save() {

}

??

}

Now to create a testcase for use account edit functionaly, you need to do as below:

@Test

publicvoid TC01() {

EditAccountPage editAccount = new EditAccountPage(getSTB());

editAccount.launchPage(editAccountLoc);

editAccount.setFirstName(??fname test??);

editAccount.save();

}

Framework Architecture:

Tools integration:

Apexon Test Automation Framework

I want to take opportunity to introduce you Apexon test automation framework. With increase in market needs for creating efficient web functional test automation using selenium, Apexon has developed an automation framework. Apexon test automation framework is designed to solve common industry problems related to testing complex web systems. The framework is best suited for writing Automated Web Application UI Tests simulate real user activities on the page.

The framework is built upon java and integrates TestNG, Selenium, Autoit, ReportNG. Due to the framework’s thorough design, test developer does not need to worry about common tasks such as thread safe browser session for running test in parallel, reporting or to incorporate result with test management tools. The tests run can be configured through standard testing configuration files, the test run filters and behavior can be changed within the config File.

The architecture of the framework ensures a low cost of maintenance while supporting extensibility by:

  • Abstracting the technical implementation away from the operational components
  • Following accepted design patterns in creating the core functionalities within the framework.
  • Providing an approach to develop highly maintainable and repeatable tests that utilize reusable test assets, proper modularity and semantic structure. Framework has readymade services for assertions, browser, reporting and data. Also, framework concept is based on page services so your page and related actions will be reusable from any test case. There is a good logging functionality and screen shot facility for assertions.

Features

Some features of the framework are:

?Less maintenance

?More reusability of code

?Reduced execution time

?Data-driven capability

?Handles file upload/download

?Easy configurable parallel execution, Supports parallel execution provided by TestNG

?Descriptive report with all verification/assertions having screenshots

?Utility classes

?Test Results integration with test management tools like QMetry, Rally.

?Integration with Sauce labs, Supports parallel execution

?Enabling testing across multiple platforms with or without selenium grid

Question over here is how the framework reduces maintenance, execution time and reuses code?

Apexon test automation framework provides high level construct to satisfy automation needs. It includes top level interfaces, abstract base classes, service classes and their implementations and custom annotations. Test developer only need to concentrate on writing the tests and not spend time on adjusting the underlying framework.

This framework provides test page concept in a best efficient way by which you can manipulate page navigation same as on actual web application under test. Once page get created page objects/functionalities can be used in any test case, makes code more reusable. The framework takes care of not only launching that page but the entire page hierarchy to reach that specific page. Furthermore it also checks that is page already active in browser? If so then it will continue from there, results in reduced execution time.

When functionality changes only the specific test page file needs to be updated: if there is any change in page/ui of web application under test you need to update just in particular page rather than each and every test case, thus result in less maintenance.

In case of sequential execution it will take advantage of sharing browser sessions between multiple test cases. No special coding or design required to run test in parallel, you just need to set parallel attribute??s appropriate value in configuration file (eg. false, Test, methods, classes) and framework will take care for providing thread safe browser sessions with maximum level of sharing browser session between multiple test cases.This will result in reducing time by parallel processing as well as by some level of sharing browser session(depends on configuration). You also can configure to run parallel in different browser (eg. iexplorer, firefox) with or without selenium grid. If you are not planning for physical distributed selenium server then, without selenium grid, you can achieve higher performance by the framework as compare to grid that configured different selenium server instance on the same physical machine. While integration with Sauce labs, though Sauce labs not provides parallel processing, still you can achieve parallel processing using this framework.

Reporting of test run result includes selenium commands log, each assertions/verification details with screenshot on failure. One can configure to capture screenshots for pass verifications too.

Sample Code:

For understanding how one can create page navigation let us see an example. Suppose I want to write test case(s) for edit user account functionality on my web site. In order to test it manually one has to navigate through login page-> My account -> edit account. The page implementation for this site looks like below:

/**

* Login page ? site entry point

* Reacts as home page once user logged in

*/

publicclass LoginPage extends BaseTestPage<TestPage> {

public LoginPage (SeleneseTestBase stb) {

super(stb);

}

??

}

publicclass MyAccountPage extends BaseTestPage<LoginPage> {

public MyAccountPage (SeleneseTestBase stb) {

super(stb);

}

??

}

publicclass EditAccountPage extends BaseTestPage<MyAccountPage> {

public EditAccountPage (SeleneseTestBase stb) {

super(stb);

}

@Override

protectedvoid initParent() {

parent = new MyAccountPage(stb);

}

@Override

protectedvoid openPage(PageLocator loc) {

parent.clickEditAccount();

//selenium.click(loc.getLocator());

}

@Override

publicboolean isPageActive() {

}

//page functionality goes here

//for all elements

publicvoid editAccountDetais(UserInfoBean bean) {

//set element values

}

//for individual element

publicvoid setFirstName(String s) {

}

publicvoid save() {

}

??

}

Now to create a testcase for use account edit functionaly, you need to do as below:

@Test

publicvoid TC01() {

EditAccountPage editAccount = new EditAccountPage(getSTB());

editAccount.launchPage(editAccountLoc);

editAccount.setFirstName(??fname test??);

editAccount.save();

}

Framework Architecture:

Tools integration:

Stay Updated
Please enable JavaScript in your browser to complete this form.
LinkedIn
Share
Copy link
URL has been copied successfully!

Other stories you may enjoy...

Healthcare Apps and the Need for Security

One of the most exciting areas in tech right now promises to be “the most personal” ever. A key aspect of making wearable devices like the Apple Watch personal is through...

Developing an App for the 2020 General Election?

Here is a thought: With the UK General Election having just finished, could the next one in 2020 be the first to use a mobile app to allow people to vote? The polling...

Be honest. Describe the state of your test cases.

“There’s some dead wood in there.” “Hmmm…. Someone really needs to clean them up.” “A little outdated.” For those reading this in the northern hemisphere,...