ui_auto_core

Selenium based UI Test Automation Framework (selenium-uitaf) is Java framework which simplifies development process for Web UI test automation scripts.

License

License

Categories

Categories

Auto Application Layer Libs Code Generators
GroupId

GroupId

com.googlecode.selenium-uitaf
ArtifactId

ArtifactId

ui_auto_core
Last Version

Last Version

2.4.2
Release Date

Release Date

Type

Type

jar
Description

Description

ui_auto_core
Selenium based UI Test Automation Framework (selenium-uitaf) is Java framework which simplifies development process for Web UI test automation scripts.
Project URL

Project URL

https://github.com/braimanm/selenium-uitaf
Source Code Management

Source Code Management

https://github.com/braimanm/selenium-uitaf

Download ui_auto_core

How to add to project

<!-- https://jarcasting.com/artifacts/com.googlecode.selenium-uitaf/ui_auto_core/ -->
<dependency>
    <groupId>com.googlecode.selenium-uitaf</groupId>
    <artifactId>ui_auto_core</artifactId>
    <version>2.4.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.googlecode.selenium-uitaf/ui_auto_core/
implementation 'com.googlecode.selenium-uitaf:ui_auto_core:2.4.2'
// https://jarcasting.com/artifacts/com.googlecode.selenium-uitaf/ui_auto_core/
implementation ("com.googlecode.selenium-uitaf:ui_auto_core:2.4.2")
'com.googlecode.selenium-uitaf:ui_auto_core:jar:2.4.2'
<dependency org="com.googlecode.selenium-uitaf" name="ui_auto_core" rev="2.4.2">
  <artifact name="ui_auto_core" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.googlecode.selenium-uitaf', module='ui_auto_core', version='2.4.2')
)
libraryDependencies += "com.googlecode.selenium-uitaf" % "ui_auto_core" % "2.4.2"
[com.googlecode.selenium-uitaf/ui_auto_core "2.4.2"]

Dependencies

compile (9)

Group / Artifact Type Version
ru.yandex.qatools.allure : allure-java-aspects jar 1.5.4
ru.yandex.qatools.allure : allure-testng-adaptor jar 1.5.4
ru.yandex.qatools.allure : allure-bundle jar 1.5.4
org.seleniumhq.selenium : selenium-java jar 3.141.59
com.googlecode.page-component : page-component jar 1.3.5
org.eclipse.jetty : jetty-server jar 9.4.19.v20190610
org.assertj : assertj-core jar 3.11.1
org.testng : testng jar 6.14.3
org.apache.commons : commons-lang3 jar 3.8.1

Project Modules

There are no modules declared in this project.

selenium-uitaf

Minimalistic selenium based UI testing framework with page-component open source project and Allure reporting.

  • UITAF (UI Test Automation Framework) is another attempt to make life of automation developers easier by providing concise test automation development approach with automatic generation of test data-sets from page-objects and generation of detailed report at the end of the test execution.

  • The UITAF uses new approach for business oriented testing by introducing new design pattern called “domain-objects” where multiple web pages are involved across single business scenario.

  • UITAF supports concurrency right out of the box by invoking multiple test cases using multiple supported browsers on the single machine, on the selenium grid or on Virtual Machines in the cloud.

  • UITAF seamlessly integrates with continuous integration systems allowing easy configuration for running the tests jobs against multiple environments, it also has capability to embed test report with any job run by hosting the report on the CI server.

The following Diagram shows the architecture of the UITAF:

image

  • Selenium WebDriver API drives the Web Browser to simulate user actions on the Web Application under the Test.
  • Web Page Components comprise library of reusable components which encapsulate knowledge of how to operate and test underlying HTML composite component. Automation developer can declare and use those components in Page Objects without dealing with complexity of underlying UI technology. Page Components are highly reusable and mostly developed using Selenium WebDriver API.
  • Page Objects Models represents components and services offered by particular web page. Page Objects aggregates and operates various Web Page Components to provide Web Page HTML oriented methods. Page Object Models are highly reusable and doesn’t uses Selenium WebDriver API
  • Domain Object Models are the next layer above Page Objects Models which encapsulates business logic behaviors. Domain Object Models aggregates and operates Page Objects to provide methods which are business logic oriented and where the business logic spans across multiple Web Pages.
  • Test Orchestration and Concurrency is used for invocation of multiple test scenarios, data provisioning and concurrency. This sub-system allocates one execution thread per test from its configurable pull of threads.
  • XML Test Data Sets are XML structured files which describes the input parameters for the test and expected results. During the test, input data is used to feed application with specific data and expected results are used for validating results of specific business operations.
  • Test Scripts are code written in Java language. Test scripts are following use case scenarios to validate various expected behaviors and they can use combination of Domain Objects and Page Objects for the test development purposes.
  • Test Context + Test Parameters responsible for setup of global configurable environment including specific for the test WebDriver instance and various test related timeouts.
  • Test Lifecycle aggregates multiple events across the framework subsystems which are related to the test execution and uses them in report generation. The following are examples of various events that are recorded by the Test Lifecycle: suite start, suite end, test start, test end, step start, step end, create attachment and others. During the event collection Test Lifecycle writes all the events in to the file system usually represented by directory named “results” under the “target” folder.
  • Test Report is generated from Test Lifecycle artifacts and represents Report Web Application. User can use web browser to load the report and navigate through various test execution specific data views.

Test Automation Components (Page Components)

UITAF is designed around the usage of Test Automation Components and I'll try to explain what they are. In today’s web application technologies, webpages are composed from the JavaScript UI component libraries like AngularJS, React, jQuery UI, Ext JS, JSF PrimeFaces, and others. All these libraries use special templates composed by a collection of primitive HTML elements that acts as a single UI component and JavaScript code which encapsulates the logic of those components.

image

Here is an example of how UITAF is used: The test for the required business functionality should span across multiple pages, in our case it should use two pages Page1 which is resemble Login Page and Page2 which represents arbitrary number of UI controls for business related activity.

Unfortunately the Selenium API doesn't know about how to automate composite Web Controls or in another word "Page Components" but instead it can control primitive html elements which are scattered all around the Web Page, in our case the web controls are composite and they combines many primitive html elements and additional logic which is scripted using JavaScript library. Usually web developer is creating global library of specific functions to automate those composite web elements but those functions lives outside of the component representation and it's very hard to find which functions belongs to which component or web control.

To cope with this issue UITAF introducing new type of element which is called "Page Component" this new element is represented by a java class which encapsulates automation specific behavior which is coded once and used across many Pages which shares the same component. In our example Page1 and Page2 is composed using the same Page Components which are "Edit" and "Button" also Page2 includes other components like "Select" and "Radio Group". All those component are part of Component Library which consists of many automated components designed specifically to automate specific "JavaScript UI Framework" which is used in our Web business application under the test.

The huge benefit of creating those Page Component libraries is: that if in our quickly evolving application, developers will decided to use other JavaScript UI Framework then all we need to do is to introduce and develop new Component Library and all the other artifact of our Automation Test will remain intact. In other Test Automation Frameworks in similar case the automation developer needs to rewrite the tests from scratch.

There is another benefit of using "Page Component": currently "Page Object" design pattern can support only fields of "WebElement" interface type, but UITAF extends this capability and allows to declare specific "Page Components" as fields of the Page Object. This completely removes cluttered Selenium code from Page Objects and instead includes only Page Specific business methods without using Selenium API, in another words Selenium API is completely abstracted from the Business specific Test Automation code. In our specific example "Page Object 1" and "Page Object 2" PageObjects consists of fields which are of specific PageComponent type and they expose page oriented business methods "Login" and "Populate Form".

UITAF "Page Component" has two interfaces: one interface is facing toward technology aware functionality by providing a knowledge on how to operate and automate specific Page Components, and there is another interface facing toward DATA framework facility which abstracts our automation test from the data which is needed for Page Component population or operation. Data framework facility allows to invoke the same test using different data-sets and this is achieved through java object serialization & deserialization. Page Object can be serialized to XML templates, those templates can be filed with concrete data by test automation developer and deserialized during test execution without applying any data to object mapping algorithms.

Data for Page Components can be generated with random data generators, there are many Data generators supplied by UITAF like: Human Name generator, Valid Addresses generator, Date generator, English Vocabulary word and sentence generator, numeric & alphanumeric generator, list of randomized values generator and others.

In case of dynamic data which needs to be provided at test execution run-time, automation developer can use expression language and dynamic aliases mechanisms supported by data facilities which are built into UITAF.

"Domain Object" design pattern is a design pattern introduced and supported by UITAF, it's very similar to "Page Object" design pattern but instead of being Page oriented the "Domain Object" is strictly business oriented. Domain Object is used when you have business logic which is spanning across multiple web pages (or Page Objects). Fields of Domain Object classes are of PageObject types and they expose business methods related to business processes. In our example "Domain Object 1" Domain Object consists of two Page Objects which are needed to complete hypothetical "Submit Request" business method.

Using all aforementioned UITAF mechanisms and design patterns automation developer can write real business oriented automation test cases which are readable and understandable by any technical or business oriented stakeholder for any existing and future projects.

  • Maven Dependency

This open source project is distributed through maven central repository. Here is a Maven dependency for UITAF project.

<dependency>
  <groupId>com.googlecode.page-component</groupId>
  <artifactId>ui_auto_core</artifactId>
  <version>2.5.16</version>
</dependency>

Versions

Version
2.4.2
2.3.1
2.3.0
2.0.0
1.2.0
1.1.45
1.1.19
1.0.2