Introduction to UI Test Automation

Official Content

UI testing of Web Apps on GXtest v4 is now available using native GeneXus programming, by using a specific object in GeneXus IDE: the UI Test object 

image_2018102911345_1_png

This test case (KB Object) is a special GeneXus Procedure with the ability of controlling the browser, by using different commands like opening the browser, clicking or typing over different controls, checking text on panels and values over controls (variables/ attributes), etc. 

So, a typical test case will look something like this: 

image_20181029113458_1_png

The variable named &driver is autogenerated and provides automation capabilities over the desired browser using the WebDriver External Object.

image_20181029113653_1_png

This External Object (UITest) is responsible for implementing the adaptation layer over Web Driver Protocol. Each GXtest command is designed to work on top of the protocol, using native .NET and Java Web Driver implementations, to be able to run a test over any Selenium Server. This implementation enables GeneXus language to take advantage of this standard inside the knowledge base. 

Creating Tests

Creating a test case command by command could take a lot of time and the user will need to know how to target HTML elements. To enable this, GXtest provides recording capabilities using GXtest Chrome Extension Recorder.

With this extension installed on your Chrome, you are able to navigate through the web app you want to test while capturing the test steps and validations: 

image_2018882441_1_png

Once you finished your recording, you will be able to test your flow directly on the browser, before you import it to your Knowledge Base to edit it. 

image_201912414538_1_png

Typical editing actions after recordings include:

- To add Assertions.

- To add test iterations to use different data inputs and outputs.

- To add/retrieve stored data validations using for-each statements or data providers. 

- Debugging test case on different remote browsers (docker/cloud). 

- To schedule test executions on Jenkins or other CI servers.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.