Category

Scripts management

When creating a test, it is often necessary to manage and organize your scripts efficiently to guarantee a smooth workflow and simplified maintenance.

Agilitest offers 4 different levels of scripting:

  • Subscripts
  • Scripts
  • Suites
  • Jobs (Jenkins)

Script levels provide an essential structure for programming and automation, allowing you to manage varied and complex tasks with organization and efficiency.

Scripts

How to create a script

There are two ways to create a script:

  1. In the project explorer click on the “Create an ATS script” button

              2. At the top left of the editor, by clicking on “New component

new component

Enter the name of your script. This will open an editing window with graphical interpretations of the actions to be performed on your script. The ATS format is a textual format that will describe all its actions.

script edition

Subscripts

Sub-scripts allow you to factorize common test functions, such as test data creation, logins, regularly used operations, etc...

You can also pass values as parameters to your sub-scripts, making them scalable and generic. It's also a good way of making your test scripts readable and easy to maintain.

How to create a sub-script

A sub-script and a script have the same configuration in Agilitest.

To create a sub-script, you need to create a sub-script call action in your script.

There are two ways to do this:

  1. Either by entering the name of the sub-script in the action

To do this, click on the call sub-script action in the actions menu.

subscript action

Click on “Call the script [ ]” to enter information

call script action

Then, select the name of the script you want to call as a subscript

enter the name of the script

            2. Either by drag and dropping a script in your test

From the Project Explorer, click on a script you wish to use as a sub-script and drag it into your script.

drag-drop

This will create a “Call the script” action

Agilitest also lets you pass values as parameters to your sub-scripts, making them evolutive and generic.

A sub-script created from a script will always perform the actions of which it is composed with the same parameters. It is also possible to modify the values of the sub-script to use it in several possible configurations.

For more information, you can consult the documentation on passing parameters to a sub-script.

Execution Suites

A suite is very useful for defining test selection criteria. These suites can be made up of tests that differ from one another, or they can be grouped by identical areas: functional, importance and priority when rereading, typing, execution environments, etc...

Executed suites can also be filtered by groups.

To find out more about how groups work, see the Group Management documentation.

How to create a Suite

Open your project menu, then click on "Execution management" to open the Project builder.

executions management

From this page, you can create “Executions”.

executions

Click on the “Add” button to create a new execution Suite,

add button

Then, click on “Import scripts” in the "Scripts" part to add scripts to your execution,

import scripts

You can also directly drag and drop scripts from your project explorer to the "Script" part of your Suite.

💡 Tip

Even if your script is made up of sub-scripts, to create a suite simply add your script, no need to add the sub-scripts since they're used in your script.

Configure Suites

You can also add parameters to your script execution.

To do this, click on the button that appears on the suite line to open the parameters window.

pencil button

You can choose your log level, activate your suite's reports and you can also add a description.

🔸 Warning

Make sure you're on the right Suite when you want to make changes to it. This is verified when the Suite line is highlighted.

suite selected

The green tick means only that the Suite has been selected for execution. There may be several Suites selected, which will then be executed one after the other.

Once you've created your suites, you can select the ones you want and then click on "Generate" → "Compile" → "Execute" to execute them in Java mode.

compile builder

To know more, you can consult our TestNG executions documentation

Jenkins Jobs

A job corresponds to the execution of your Suites. It is used to schedule recurring executions to ensure that all your tested functions are OK or not.

These Jobs, which will automatically launch your tests on your Web, Desktop, API or Mobile solutions, will be displayed on a highly graphic monitor. This can help you ensure the quality of your solutions on a daily basis.

To create a job, click on the "Jenkins integration" button,

jenkins integration

Click on the Jenkins icon to connect to Jenkins

jenkins icon

Then, click on "New Job",

new job button

This will open the window to create a Job

Create job window

You'll be able to enter your Job name, add any parameters you wish, and activate reports and notifications.

To add Suites to your Job, click on the "Add" button in the Suites list.

Suites list

To execute your Job from Agilitest, tick the box on the Job line to select it, then click "Execute".

execute

The status of your execution will be displayed in the Jenkins window.

If you'd like to run your suites without having to use Jenkins, this is also possible, as described above. Simply tick the suites you wish to run directly from the project builder.

To know more, you can consult our Jenkins integration documentation

Still require support?
Contact support

Java Script

Agilitest is known for its broad coverage of various recent technologies in software development, and generally allows you to automate just about anything with a few clicks and graphically.

In some cases, however, it is useful to call external code to perform an environment-specific operation.

Agilitest can call a piece of Java code, passing in input variables and retrieving output parameters.

Of course, we recommend all the usual precautions when using Java external code, because while it can do everything, it can also have an unwanted impact on the SUT (System Under Test).

In terms of portability, the .ats code produced by Agilitest is transformed into Java for execution. You can therefore assume that the Java code you write will be portable to the various platforms supported by ATS.

Create a Java script

To begin with, you will generate the stub of your java code in Agilitest.

To do that, change the view to “Java ATS scripts” in the project explorer,

java script view

Click on the button to “Create a Java ATS script”.

create java script button

You can also create a Java script by clicking on “New component”, at the top left of the editor.

new component button

The editor opens a popup asking for the script name. Enter your script name and click "OK".

naming Java script

The editor opens a Java code editing window and, after the necessary and useful declarations, displays the function to be called: testMain().

Java source code

GetParameter

It is possible to pass parameters by value to your Java script.

To do this, click on the "Call script" action in your script.

call script action

Then, click on "Add parameter”.

add parameter button

Next, you can enter the values you want to pass to your script, and you can use all the possibilities offered by the Agilitest editor: use of variables, "hard" values, iterations on a .csv file…

To retrieve them from the Java code, you have the getParameter(int) function, which takes an integer corresponding to the index of the variable in the script call: getParameter(0) will return the first value passed in the parameters.

GetValue

Results are retrieved symmetrically to the script call.

This requires the declaration of variables in the Agilitest editor, which will be of a type that cannot be modified (by the user).

To declare return variables, proceed as follows:

Declare a new variable in the variable management menu on the left of the editor.

create variable

Name the variable and drop it directly in the call script action.

name the variable

Agilitest will change the type of the variable to make it non-modifiable by the user (indicated by the orange coloured variable) and mark it as a “Returned variable” for the called Java script.

returned values

The variable can be used in your script for future operations.

To define a return value on the Java side, you have the returnValues() function, which takes all the values you wish to return:

returnValues("value1", "retvalue2", param1) ;

Obviously, the number of values returned must correspond to the number of variables declared in the Agilitest editor.

Code execution

If your test includes a Java script, it will be necessary to compile it before running the test. During compilation, any syntax errors will be highlighted.

Once your project has been compiled, you can run your test and Java actions as if they were standard Agilitest actions: step by step (action by action) and with the same execution mode, each Java action being executed in one go.

🔸 Warning

Before running your test, once the Java compilation has been completed, you must close all open channels to reload the compiled Java modifications.

If your Java code is a little complex, and you want to debug it, you can use step-by-step debugging provided you have assigned a Java debugging port in Agilitest and have an IDE such as eclipse or intelliJ.

Still require support?
Contact support

Docker

Docker is an open source platform for creating, deploying and running applications in isolated environments called "containers".

Containers are light, self-contained software units that encapsulate all the elements needed to run an application, such as code, libraries, dependencies and configurations.

Tests designed on Agilitest can be executed with Docker and its containers composed of images. Create and maintain your tests with Agilitest then execute them with Docker to take advantage of graphical interface-free background executions that will result in detailed reports.

What is Docker?

Docker uses images to create containers. A Docker container is a running instance of a Docker image. Images are created from files called Dockerfiles, which describe the steps involved in building the image.

The container provides an isolated environment to execute an application in a consistent and repeatable way, independent of the host environment. Each container is isolated from the others and uses system resources efficiently.

Unlike a virtual machine, which requires a complete operating system, each Docker container shares the same operating kernel with the host, making more efficient use of hardware resources.

To know more on how to use Docker you can consult the Docker documentation: https://docs.docker.com/

Docker and ATS

ActionTestScript is a structured, readable test language used to create reliable, high-performance GUI automated test campaigns.

Test scripts are defined by a sequence of actions executed on a web or desktop application. Scripts written in ATS are converted into Java classes and then executed using the Selenium and TestNG frameworks.

With ATS, test designers focus solely on the functional actions to be performed and do not have to worry about technical considerations.

By combining Docker with ActionTestScript, you now have the ability to run test suites in predefined environments, under Linux or Windows. These environments are equipped with the latest versions of browsers and web drivers.

To use Docker images, copy the DockerPull command line of the image,

Docker pull command

Then, execute the command in your script created in Agilitest through your Terminal in your computer.

💡 Tip

To update your environment, simply perform a Docker pull before each test launch to obtain the latest version of Docker images based on browser updates, web drivers, etc.

This combination offers great flexibility and enables a high level of control to be maintained over test conditions, guaranteeing accurate and reliable results.

No specific configuration is required on the machine running the tests, with the exception of installing the Docker application.

To install Docker, click on the download link directly on the Docker website: https://www.docker.com/

Use a Docker image

To discover available Docker images of ActionTestScript, you can consult the Docker Hup web page: https://hub.docker.com.

Enter "actiontestscript" in the search bar to show all the corresponding images.

DockerHUB

This platform allows you to consult the details of each image, such as its version, metadata and instructions for use.

Docker Hub details

Docker Hub makes child's play of using ready-to-use Docker images, such as those from ActionTestScript.

🔸Warning

The first time you download the Dockerhub it will be around 3GB, however, with each update it will only download portions of images since the base will already be downloaded. The images are cut into 'slices' with a GUID. They are generally 150-200MB files.

ATS images

With Docker you have image repositories based on Linux and Windows operating systems (OS) at your disposal.

Linux images can be exectude on:

  • Windows host via Hyper-V or via Windows Subsystem for Linux (WSL)
  • Linux windows
  • MacOs

As for Windows images, they can only be run on a Windows host using Hyper-V and only with a "pro" version of Windows (10 or 11).

Linux OS-based images

linux : Ready to be used to execute tests with ActionTestScript, either with AtsLauncher or Maven.

linux-base : Contains the Java Jdk, Maven and tools such as Git, Zip, Unzip and Bzip2.

linux-browsers : Contains the latest web browsers. The browsers included are : Brave, Firefox, Google Chrome, Microsoft Edge and Opera.

Tests with Docker

In Linux and Windows Docker images, only tests on web browsers and all API tests can be executed. It's also quite easy to run tests with Jenkins or others on non-graphical servers with just a few command lines.

Prerequisites :

  1. On a Windows host

Once it is installed, you need to execute Docker Desktop on the host to use Docker containers.

        2. On a Linux host

Consult the following page: https://docs.docker.com/engine/install/ubuntu/

Next, you need to retrieve the Docker image:

  • On a Windows host : In a PowerShell console: Docker pull actiontestscript/linux
  • On a Linux host : In a bash console or shell: Docker pull actiontestscript/linux
  • Repository Git

🔸 Warning

It is important to note that tests involving system actions will not work.

Once the tests have been executed, you can generate reports that include images, just like a normal test. The report can include screenshots, even though there is basically no screen. Everything is stored in memory thanks to the web browser. This means that the tests can run on servers that do not have graphical interfaces.

Still require support?
Contact support

Agilitest Standalone

You can execute Agilitest as a Standalone version which means a version with all ATS tools that does not require Internet access to work.

Download Agilitest in Standalone

To have a Standalone version of Agilitest, you need to follow these steps:

  1. To have an Agilitest password

Your Agilitest password is made during the creation of your licence.

If you don’t have one, go to the URL: api-agilitest.com/devices/login.php

Ener your user ID and a password will be sent to your mail address.

         2. Connect

Go to the URL: api-agilitest.com/private/index.php

Enter your username and your password and then click on “LOGIN

login

           3. Download Agilitest Standalone version

Three Standalone versions are available:

  • The simple Agilitest version
  • The Agilitest version with Jenkins
  • The Agilitest version with Jenkins and the SAP driver

You have two possibilities to download the Standalone:

  • By clicking on the “Download” button next to the version you want.
  • By copying the link of the version and paste it in the browser’ search bar. This link will not change and can be used again during automation, without having to authentify.l

🔸 Warning

Please note that you will be downloading a customized Agilitest Editor version with your Agilitest account ID, so do not distribute this archive outside your organization.

Once the Standalone folder is downloaded, you will need to unzip your archive.

standalone archive

You'll find yourself with the version of Agilitest and its tools that can be used independently.

Finally, launch Agilitest from your unzipped Standalone folder.

Customize the Standalone version

You can also customize the versions of your Webdrivers on your Standalone version.

To do this, go to the downloaded Standalone folder: tools/ats-tools/<ats_version>/drivers

Then change the Webdriver versions as you wish.

You can also automate recovery by scripting using the Wget and Curl commands:

  • wget "<Recovered_Token>" -o standalone.zip
  • curl -o standalone.zip "<Recovered_Token>"

For Linux commands:

  • wget -c -O standalone.zip  '<Recovered_Token>'
  • curl -L -C - -o standalone.zip  '<Recovered_Token>'
Still require support?
Contact support

Licences management

The purpose of the licence management application is to access your personal information.

To access the licences interface, go to the Agilitest "Help" page, at the top right.

help button

Then click on the dedicated button to open licence management web page.

used licences button

The web page will open to a front page.

licences page

Click on Access page” and enter your login details

enter login page

There are three possible outcomes:

  1. If the ID does not exist, you will be blocked.

        2. If the ID exist but does not have a password, you will be informed that a e-mail has been sent to you with a new password.

Once you have entered your username, enter the corresponding password

enter password

If you do not have a password, a message will inform you that one will be created and sent to you by e-mail.

messsage about new password received by email

       3. If there is no issue with the ID, enter your password. If it is valid you will be taken to the information page

licence information page

On the information page, you can find information about licences and related equipment.

You can also request the deactivation of a licence. This is done via a clickable button that displays a confirmation request. You will then receive a pop-up notification.

In the table of active devices, you can ask for a device to be deactivated.

To do this, click on the "Deactivate" button in the licence line.

deactivate button

Then click on "Send request" so that it can be processed by the Agilitest team.

device deactivation

Once the deactivation request has been accepted by the Agilitest team, the device will appear in the table of deactivated devices.

deactived devices panel

Still require support?
Contact support

Subscript executions

▶️ You can also watch our tutorial on how to execute subscripts on our Youtube channel.

When a script is long enough, you can reduce it by creating a subscript.

Using subscripts will allow you to factorise the common functions of your tests, such as test data creation, login, regularly used operations, etc.

An additional advantage is that you can pass values as parameters to your subscripts, making your sub-scripts scalable and generic.

Finally, if you manage the granularity of your scripts and subscripts correctly, this will also enable you to have test scripts that are not too long, that are readable and easy to maintain.

Create a subscript

The subscript action has been designed to be scalable.

To create a subscript, select all the actions in your script that interest you. You can do so by pressing the CTRL key.

select actions

Then, drag and drop your actions on your “Subscripts” folder in your explorer.

subscript folder

Your subscript will appear in your project explorer.

subscript in explorer

It will also appear in the form of a subscript call action in the script from which the actions were extracted if you cross the “Insert subscript action” box

insert subscript action

Open a subscript

There are different ways of opening subscripts, even if they have different typologies such as multiple iterations, blocked, random, etc…

When you want to open the child script with the link to the parent, click on the "Execute action" button to open your subscript and execute it.

execute button

If your subscript contains parameters, they will appear in a small window displaying these parameters for a few moments during the execution.

parameters showing

To make these parameters reappear, click on the "\x" button at the bottom right of the screen.

button to show parameters

A subscript with only one iteration

In a subscript with a single iteration, if you click on the "Execute return values" button, it will return to the parent script.

execute return values button

The elements will no longer appear in your subscript but the parameters will remain in the subscript.

It is also possible to stop the link to the parent, so as not to return to the parent once the subscript has finished executing and to continue executing the script.

If you don't want this to happen, and simply run the subscript, simply click on the cross icon to cancel the return action.

cancel button

A subscript with several iterations

In a subscript with several iterations, the number of iterations will appear on the subscript call action line

subscript called 3 times

As well as at the bottom right of the execution of your subscript.

iterations count

If you click on the arrow once, it will move on to the next iteration with its parameters, and so on if you click on the arrow again.

arrow button

At the end of these iterations, as in the previous case, this button will be used to return to the parent.

You can also execute your iterations one after the other.

To do this, click on your editor's "Play" button in the channel management menu instead of executing the actions one after the other.

play button

This corresponds more to a mode of execution, compared with previous cases which corresponded more to creation or maintenance.

Still require support?
Contact support

Project's parameters

Project parameters are used to manage and configure a project, whose parameters will be applied to all the scripts in the same project. Each project has its own parameters.

To access the project parameters, you have to click on the context menu for the project in question in the Agilitest Project Explorer.

From the projects explorer, click on “Project properties” to access the project parameters.

project properties

That will open the project’s parameter window.

project's parameter window

Project’s information modifications

project's information

From this screen, you can access your project from the Window explorer and change the project name and description.

You will also be able to version the project, which means that you can stabilise the use of a specific version of ATS by referencing the ATS library you want.

🔸 Warning

We do not recommend changing the version of the project as the changes in the editor and ATS  are closely linked. However this feature is available in case it might be of interest to certain profiles.

Apache Maven

Apache maven

By checking the first option, you will have an “Auto-update of ATS version” activated.

The second option is to allow the use of Maven with Agilitest. Maven is a package manager and allows you to retrieve the latest versions of librairies and integrate your own librairies into your projects.

Project’s passwords

project's passwords

You can create and manage passwords, which are reusable in encrypted form in your scripts, with the keyword “$pass”.

Agilitest lets you record variables which are then encrypted in ATS files.

To create a password, click on Add

add password button

Then, enter the name you want to give to your password and its value that will be encrypted next.

password creation

Encrypted variables mean that they do not appear as plain text in the files, or in the test editing interface.

How to manage encrypted passwords

Passwords can also be managed using the shortcut in the special keys when entering text.

passwords in the special value menu

The value can then be retrieved in ATS as a normal variable using the $pass(variable) keyword.

Here are the differences with normal variable management:

  • Passwords are not printed in the editor's user interface other than in its edit menu.
  • They are not visible in ATS files, not even their declarations.
  • They do not appear in ATSV files.
  • They do not appear in the logs generated by Agilitest and ATS.
  • Each variable declared using $pass() variables is treated in the same way.

When to use encrypted passwords

We recommend using encrypted passwords when you have no other options.

We do not recommend that you carry out your tests with real user accounts by encrypting passwords. The solution we recommend is to create users dedicated to the tests and with their own privileges, limited if possible.

💡 Tip

If you can’t do otherwise, like when you want to test the admin account, we advise you to do this on environments similar to production, but secured differently (for example, physically on your premises).

If you are carrying out tests on systems in the cloud, you will not be able to do otherwise. In this case we advise you to supplement this mechanism, for example by using secure transfer protocols such as https or by using one-time passwords issued by a secure server.

Project’s reports templates

project's reports templates

Project report templates are used to customise execution reports.

To customise your reports, click on the edit button.

customize button

Then, click on the stylesheet file edition button.

edit custom button

Still require support?
Contact support

Groups management

The purpose of group management is to better manage the executions. Scripts are arranged in named groups to customize the organization. This allows you to include or exclude groups of scripts from an execution.

Today, groups are only used to filter run suites or organize ATS scripts. Each execution suite has its own filter configuration. There are two ways to manage groups, either through the group management window or directly through the properties of a script.

Group management window

You can access the group management window from the Project Explorer menu.

Project explorer > menu > Group management

groups management

The edition and maintenance of these groups can be done in the "Group management" page of a project.

group management window

The Group Management window allows users to create and manage the contents of script groups.

A group is characterized, on the one hand, by a name and, on the other hand, by the scripts it contains. These groups have the particularity of being able to be used in several contexts, in particular to include or exclude scripts in an execution.

For each group you can:

  • Add scripts
  • Remove scripts
  • Modify the tag (color + ID)
  • Duplicate the group
  • Delete the group

Create a group

Click on “Create group” in the groups management window

Add group button

That will open a group creation pop-up

create group popup

In this menu you can create the name of the group as well as choose a color and an ID that will represent the TAG of your group.

Once the group is created it is possible to duplicate it by clicking on the "..." button.

duplicate group button

You have the possibility to change the tag of the duplicated group to better organize your groups

duplicate group popup

Group tag

Each group has a tag that is characterized by a color and 3 characters. Seven colors are proposed and the ID can correspond to any 3 characters you want.

You can edit the tag of a group at any time from the group management window.

To do this, click on "Modify group tag" from the "..." button of an already created group

edit group tag button

Then, edit the group tag as you wish

edit group tag popup

If the tag entered already exists, a message appears after clicking on "Confirm".

Existing tag message

How to filter groups?

Groups can be used to filter a number of specific scripts. Today, it is possible to filter the content of an execution suite by excluding, i.e not execute, all the scripts from one or multiple groups.

Filters are applicable from the script insert of the executions management window but can also be managed directly from the properties of a script placed in a group.

From the executions management

From the Project explorer, click on the menu > Executions management

Executions management

From the bottom left pane, it is possible to select, add and remove filters.

filter panel

Each project has its own group management and each execution suite has its own filters configuration.

To exclude a group allows you to prevent the execution of the scripts it is composed of.

Example :

If, in the “Routine” suite, you decide to exclude the “Bug” group,

Routine suite with the Bug group

Then, if you change suite, you will not find the Bug group since it is only part of the Routine suite.

Test suite without groups

📙 To know more
Scheme of groups and filters system
When scripts are placed in groups, that means that they can be filtered during an execution. If you decide to exclude groups then during the execution, the scripts that belong to excluded groups won’t be exectuted. Groups also allow you to classify your scripts and organize them according to your needs.
(You can find an animation of this scheme here: https://youtu.be/L3PmZmDdaGg)

From the properties of a script

It is also possible to manage groups and their composition directly through the script properties. The script properties allow to:

  • Know which groups a script belongs to
  • Assign or remove a script in existing groups

To do this, right click on an ATS script in the file explorer and click on "Edit properties".

Edit properties

This will open a window indicating in which group(s) the selected script belongs.

properties of a script

Still require support?
Contact support

Tools configuration

Agilitest can be completed with various tools to optimize the create and maintenance of tests. You can find these tools in the “Tools” menu, situated at the top right of the editor. It is advised to download them all right when you have installed Agilitest in order to have them at your disposition during the use of Agilitest.

You can open the Agilites tools page by clicking on the “Tools” button at the top right of the editor.

tools button

This will open the page with all the tools that can be added to the Agilitest functionnement.

tools page

You can download these tools directly from Agilitest by clicking on the links next to each tools.

download button

Jasper report

jasper report

Jasper reports are used to generate tests reports in pdf format available from the html reports.

pdf report

Apache Maven project management

apache maven project management

This menu allows you to directly manage the ATS dependencies with Maven. It is reserved for expert use for those who wish to use a specific version of ATS while allowing to recover all its dependencies.

Maven corresponds to an utility that enables a project’s construction and the management of its dependencies.  If a library is under a certain version, with Maven it is possible to cohabit several versions and to choose which version will be processed after having compiled its project.

FlaUInspect

flauinspect

FlaUinspect is a Windows tool that is used to identify the components under Windows. It corresponds to what Windows can “see” when there are open applications.

Click on the execute button to open the FlaUInspect window

execute button

The tool starts from the desktop and will show all the windows that are open and the various components they are composed of.

flauinspect window

This corresponds to the Windows interpretation of  Web component, so the level is not as high as the capture tool that is dedicated to the Web. But, it can be interesting to use on native windows application clients. This shows the path you can recreate manually with a locator when the capture tool does not work correctly.

This tool is notably used to debug or debunk particular cases.

Jenkins server

jenkins server

The Jenkins server is a continuous integration tool.  This tool can be deployed in two ways:

  • Embed server: This corresponds to a local use. It is a pre-configurated system made to function locally with basic plugins and settings pushed by Agilitest to run on computers.
  • Remote server: This corresponds to an online server, on the company’s cloud or a dematerialized zone (DMZ).

Once you are connected you will have access to these three buttons:

jenkins buttons
  • Disconnect
  • Stop Jenkins
  • Open page

All these tools are not mandatory for Agilitest to work, however, they provide a complementary service and help to improve the user experience.

Example :

With the continuous integration, it is possible to run tests in a scheduled way: during the night, the morning or at whatever hour of the day. This is possible through Jenkins, not Agilitest.

Still require support?
Contact support

SAP

SAP: a functional tool

What is SAP?

SAP (Systems, Applications and Products) is one of the world's leading producers of software for business process management, by developing solutions that facilitate the efficient processing of data and the flow of information in organizations.

SAP is used as a data manager. It is an independent tool from Agilitest allowing to create programs through modules.

You can consult the SAP documentation directly on the SAP website.

SAP integration with Agilitest allows you to create and maintain complex tests with a functional approach. SAP GUI tests can be used to manage the modification or development of business rules, or the updating of ERP system functionality.

📙 To know more
architecture beteen ats and sap scheme
SAP is an independent tool from Agilitest. To establish a connection with this tool, a system driver is used to send the elements to the SAP driver. Once the link is established, a connection to the SAP server will be made through the SAP GUI protocol.

How to connect to a SAP server?

▶️ You can find a tutorial on how to connect to a SAP server on our Youtube channel

To use SAP you need to install a client: the SAP Logon. This client will allow you to interact with the SAP server. A connection is declared in this client with the elements transmitted by the SAP administrator, notably the target server.

SAP logon

To connect to an SAP server, the operation is the same as for any other application tested on Agilitest.

So start by a “Start channel” action

start channel action

Then select the SAP shortcut to set the channel from the drop-down menu in the input bar.

application shortcuts menu

Enter the details of the SAP server, present in the SAP log on, i.e. the name of the connection, the customer number (i.e. the associated mandate number) and possibly the language (EN/FR/...).

Then click on "Activate 'Basic authorization" to enter your login details: username + password.

SAP shortcut

💡 Tip

To prevent your password from appearing in the test, consider creating an encrypted password from the project properties menu.

To start the connection in English, in the logon part you can change the language by adding "/EN" at the end of the id.

SAP english connection

During the execution the connection is done automatically. Once connected, the driver takes over the open SAP window on the SAP home page.

Session saved in the ATS properties

As a reminder it is also possible to configure commonly used applications to appear directly in the applications panel in the channel opening action. This is also possible for the sessions you have access to, including SAP sessions.

This shortcut allows you to avoid sharing information related to the connection to an SAP server (id, passwords) if you want to work on an SAP test on several workstations.

To use this shortcut, you need to modify the ATS properties.

To access the ATS properties, go to the "Settings" menu in Agilitest.

Settings button

Then click on “Edit configuration” in the ATS settings

Edit configuration button

This will open the ATS properties page where you can configure various elements.

ats properties

Below is an example of a possible configuration for an SAP session:

📙 SAP Configuration

<sap>

<timeOut>200</timeOut>

<sessions>

<session>

<name>MySAP</name>

<client>800</client>

<connection>(Logon_id)</connection>

<authentication>(Code_source_ATS)</authentication>

</session>

Authentication can be found in the ATS code of your script with an SAP connection.

To access it, open your script and click on the “Script header data.

Script header data button

Then click on “Code ATS”

code ats button

This displays all the actions of the script in code form.

To fill in the connection information in the properties, recover the code string data corresponding to the SAP server connection from the "start a channel" action.

ats code info

Copy the connection information in the ATS properties.

ats properties

Once you have entered the information, save your file and return to the Agilitest applications menu where you will find the session you have entered.

SAP application

SAP interface

Once SAP is open, just like a test on the Web, you can capture the elements with the capture tool to be able to test them.

capture in SAP

The SAP home screen displays the modules, or transactions, available to users.

sap modules

These modules correspond to programs that allow you to manage different business aspects, such as inventory management or HR information.

You will be able to choose among various possible interfaces according to the screens that were made available to you when you created your account.

SAP screens

The accessibility of these screens is decided according to the role occupied in the company and its needs in data management.

The SAP modules allow for the management of numerous business aspects such as finance, sales, production, logistics, distribution, accounting and human resources. Since SAP manages an information system that by its very nature is subject to change, it is important to regularly perform functional unit tests in your QA process to ensure that all these processes continually deliver the expected results.

Example: SAP offers an HRIS solution that automates business HR operations, but also provides experiences that drive employee engagement and productivity. SAP's HRIS core focuses include employee experience management, core HR and payroll functions, talent management and HR analytics.

Tests on SAP

Switching windows

In some cases, the module opens in a new SAP window. To manage this notion of window, you will have to change the window from Agilitest.

To do this, click on the window action.

Window action

Then switch to the window with index 1 (the main window is index 0).

indexes in switch window action

Actions on a table

Once you have your table open in the SAP interface, open your capture tool to perform actions on it.

When capturing you will need to define a Locator, which is a set of attributes that identify the captured item.

Among the parent branches of the element you will generally find: the object (Example: "TableControl", "GridControl", "TreeControl"), the Rows, the Columns.

Captured element's parents

Several table cases are possible:

  • Searching for an element of a table that appears directly on the interface

Example : A table with few lines.

When we capture an element on the screen, the search of the element with the locator will be less accurate.

The search can be done according to the "Text" attribute of the captured element and the ElementId of the "TableControl" branch.

Table elements

Once the attributes are selected, drag the element into the Agilitest editor to create an action.

click action

This type of search will not search for a row but will simply stay on the same screen.

  • Searching for a table element in a long list

When you want to capture an element from a long list that requires Agilitest to browse the elements, then you must specify it with attributes.

This time you have to tell it that the element is in a "Row

Table elements

Drag the element into an action

Click action

A search in a row is done according to the text in it. Agilitest will browse the rows of the table to find the row with the text entered as an attribute.

💡 Tip

To simplify the operations it is recommended to change the text into a regular expression.

Actions on Grids

It is possible to switch a table to Grid by pressing the F8 key and specifying the number of lines you want to appear in the "Maximum number of hits" box.

change table to grids

With the grids it will display more information that can be read vertically and horizontally.

grids

The capture of an element takes place in the same way as for tables, only the display of the parents of the captured elements will specify that they are grids.

Grids elements

Grids are a set of data organized in rows and columns.

It is also possible to search for the presence of an element in various rows using "Row".

To do this, you need to create a sub-script with runtime log comments to display the items found.

subscript action

Example: If we search for the text "MIERZWA" in all rows using the text property of the "GridRow" branch, then your subscript will display the rows that include this text.

In this example, 5 iterations are displayed, so MIERZWA appears 5 times in the rows. The parameters will indicate the exact location, such as the line "1014". (see screenshot below)

subscript execution parameters

With this action each row is passed to the script and each column represents a parameter.

ats code parameters

Actions on data trees

The data tree is sometimes composed in a simple configuration with a single column that includes several levels and other times in a more complex way, with several columns in the same tree. The execution of tests on trees is similar to those on grids and tables.

The search elements of a component are similar to those of grids and tables.

trees elements

The "TreeNode" branch will represent the nodes of the tree, i.e. the different levels that appear.

Each node has zero or n children that can be deployed.

Tree nodes

Example: The "Basic Data" element has 3 children, while its children have none.

When a tree is complex, a node can have several columns.

As with grids, the tree is configured with rows that will concatenate all columns in the row.

This means that the search for elements of a tree structure is mainly done through the "Row" branch.

Tree row branch

VBscript

SAP recorder in SAP

One of the features offered by SAP is the use of a recorder. Once activated, this function records the actions performed on SAP and then translates them into vbscript.

To launch the capture directly in SAP, go to the options from the drop-down menu: Plus > SAP GUI Options and Actions > Record and Playback Script

sap recorder

This will show you a launch pop-up.

recorder pop-up

Click on the "record" button to start the recording

record button

Once this is done, perform your manipulations and then click on the "stop" button to end the recording.

stop button

Once the capture is finished, a page with all your actions in vbscript format will open automatically.

vbscript

To replay this script, click on the "play" button.

This will open your Windows Explorer and the folder containing your script.

script in windows explorer

By clicking on the script it will perform again the actions that were executed directly on SAP.

To use the vbscript data in Agilitest you have to look at the last lines of your script.

vbscript actions

Scripting action in Agilitest

From Agilitest, you can also create actions in vbscript format and interact with SAP.

Two ways are possible:

  1. Either by using the script lines of the vbscript.

To do this, copt a script line from your vbscript that you want to transform into an action.

line in vbscript

Then click on the “Scripting” action

scripting action

There is no need to specify an interface element.

no element

Click directly on the "Scripting" action and paste the script line

enter text in scripting action

         2. Either by manually creating vbscript actions using the properties

Click on the "Scripting" action.

scripting action

Add an interface element and enter a value that will act on this element

interface element in scripting action

Example : Above, the interface element corresponds to an element in which text can be entered, with the "text" property of this element set to "MIGO".

When the action is executed, this translates into the text MIGO in the text entry on SAP.

"migo" entered in text bar

The difference between these two manipulations is that by passing through a line of code of the vbscirpt the access to the object is done by its id, while by passing through an Agilitest action, the access to the object is done by its properties.

SAP Recorder with Agilitest

Agilitest lets you use a Recorder for your SAP actions.

Once the SAP channel has been started, you can activate the Recorder.

Click on the button in the channel management menu to launch the Recorder.

record button, red

The button is red when deactivated, and green when activated.

Then perform your actions directly on SAP: text entry, clicks, etc... All of this will be translated into action in the Agilitest editor.

By default, the object selection criterion is "ElementId". To maintain Agilitest's flexibility, you can modify the attributes assigned to each action to suit your needs.

🔸 Warning

All text input actions must be validated by pressing the "ENTER" key at the end of the input.

You can also generate verification actions.

For this purpose, a keyboard command has been set up to create verification actions in the Agilitest editor:

  • Press ALT+F1 to create a property verification action
  • Press ALT+F2 to create an occurrence verification action
  • Press ALT+F3 to perform a property action

These three commands are independent of the Recorder, and can be performed without it being activated while doing a SAP test.

To stop the recorder button, click again in the channel management menu.

record button, green

Still require support?
Contact support

Special values

When you can enter text in an Agilitest action, it is possible to click on a button that will allow you to insert special values.

button to open special values

This will show you all the special values organized in a dedicated menu.

Special value menu

Among these special values are:

Environment variable

environment variable

Environment variable are linked to the current execution.

They are found in the execution variables in the project builder.

To access it, click on "Executions management" in the project explorer.

executions management

This will open the project builder page where you can find the environment variables in the special values box.

execution variables

You can find the same information about environment variables in the special values menu.

values of environment variable

Script variable

script variable

The script variables correspond to the variables declared in a script.

In the editor, they can be found in the part dedicated to variables under the project explorer.

script's variables

You can find the same information about script variables in the special values menu.

values of the script variables

Script parameter

script parameter

Script parameters are the parameters that are passed in a sub-script call.

They are found inside of the sub-script call action, in the added parameters.

parameters passed in subscript call action

You can find the same information about script parameters in the special values menu.

values of the script parameters

Assets file

Assets file

The assets file corresponds to the path of all the files that are in the assets (Example: data, resources, etc...). This corresponds to the relative path taken by these files.

The values can be found in the project explorer, in the "Data files" view.

Data files view

You can find the same information about assets file in the special values menu.

assets file values

Passwords

Passwords

The passwords correspond to all the passwords entered in a project.

They can be found in the project properties page.

To access the properties, click on “Project properties” in the project explorer

project properties

In the properties you have access to the created passwords.

project's password in the project's properties

You can find the same information about passwords in the special values menu.

passwords values

Channel values

Channel values

These values correspond to the values returned by a running channel.

Example:

In a script that opens a "Chrome" channel,

If we ask to retrieve the value of the “Application name” in the special values,

Channel values in special values

Then the name of the application opened by the channel will appear.

🔸 Warning

If the channel is not started, then the value cannot be retrieved.

Channel not started message

ATS script values

ATS script vaues

ATS script values are values that are only valued in a Java execution. They only appear when they are taken from the Top script in a Java execution.

ats script values in special values

Calculated values

calculated values

The calculated values are summarized in a drop-down menu.

These values are: Now, Today, Unique ID, Random string, Current iteration, Iterations count

calculated values in special values

Still require support?
Contact support

ATS Mobile Station

Mobile Station allows to perform tests on mobile (USB and Wifi) and on tablet (USB) through ATS or directly through Agilitest.

🔸Warning

Before continuing this documentation on the use of Mobile Station with Agilitest, make sure you have installed all the prerequisites by consulting the Mobile Station documentation on Gitlab: https://gitlab.com/actiontestscript/mobile/mobile-station#android-testing

Configure a Mobile Station server

How to configure a MobileStation in order for Agilitest to discuss directly with MobileStation?

Find a video showing the steps to connect a Mobile Station server to Agilitest by watching this tutorial: https://youtu.be/-SE1kN03LMw (configure a Mobile Station server)

Connection to a server

To connect to a server, you must go to the Agilitest settings by clicking on "Settings" at the top right of the screen.

Access to settings in Agilitest
Agilitest settings

In the "ATS Mobile Station server" box, you can add a server that you will connect to Agilitest by clicking on the "Add" button

ATS Mobile Station server box in the settings
ATS Mobile Station server box

You will be asked to enter the IP address and port, which will be retrieved directly from the Mobile Station interface.

ATS Mobile Station server information box
IP address and port information

Press the "Enter" button to confirm your selection and the server will appear in a new line within the Mobile Station insert.

Click on the server to display the details and to be able to change the IP address and port.

Server information

Connect Agilitest to a mobile

There is a connection between Mobile Station and Agilitest, which allows Agilitest to know which devices (including IOS/Android tablets) are connected to Mobile Station.

Once the Mobile Station server is configured, open a new channel.

Start channel action line in Ailitest

Then, select "Mobile application" in the choice of applications (phone icon in the upper right corner)

Mobile application selection button

Agilitest will open a pop-up to enter the phone's IP address and port. You can enter this manually, or select a server connected to Mobile Station, like the one shown above.

Enter the phone's IP address or select a server.

Mobile explorer

Click on the "Discover" button to open the mobile window and its applications.

Discover button in the mobile explorer

This will display the applications installed in the phone as well as a set of information accompanied by a visual of a phone that is not necessarily representative of its real appearance but is intended to differentiate an Android from an iOS.

From the list of applications on the phone, select the one you want to test, then click "Ok".

Once you have done this, you will be able to see that the channel has been modified with the new information, then click on the run button to open the application.

Start channel action open a mobile app

Requirements to connect an Android

For Android, you need to set up your mobile in developer mode.

Check the Gitlab documentation to configure your device beforehand:

https://gitlab.com/actiontestscript/mobile/mobile-station#android-testing

Go to the "Help" menu, at the top right of the editor

help menu

Click on the “ATSMobileStation” link corresponding to your OS (Windows or MacOS)

download links

Execute the downloaded package to install this mobile device detection module locally.

Mobile Station unique use

On the MobileStation side, you will see a lock appear next to the mobile in which actions are executed. That means that this mobile is linked to this computer using Agilitest, so if another person who is using Agilitest on another computer wants to use this mobile a error message will appear to inform that the phone is already used.

To free the phone et stop its utilisation in Agilitest, you simply have to close the channel of your script.

Mobile Station execution

Mobile Station allows you to run tests on mobile devices and tablets through ATS or directly through Agilitest. The tests can be done on Windows, where only Android can be executed, or on MAC where it is possible to execute both Android and iOS. There are two ways to connect to mobile devices:

  • By Wifi connection, except for iOS devices and tablets.
  • By USB connection

Here is a scheme showing the execution system with Mobile Station:

Open a mobile application

Here is an example of a mobile test executed on a MAC. Agilitest is open with an already filled in script and Mobilestation is working with a plugged in Iphone.

The test procedure follows the same principles as a Web test.

Firts, open a channel,

Channel start action

When you want to use the capture tool, a visual rendering of your phone will open on your screen.

calculator app opened with the start channel action

Capture of an element

To capture an element, the system is the same as for other forms of testing (web, desktop, etc...).

Then press the CTRL key on your keyboard to open the parent window of the captured element and the attributes.

capture of an element in the calculator app

With the capture open, it is also possible to interact directly on the elements of the application by pressing the Shift key on your keyboard.

Special buttons in Mobile Station

Mobile tests are very similar to tests done on other applications.  However, two buttons are specific to Mobilestation:

  • Home” button

It appears in the center at the bottom of the phone’s visual. It serves as the home button you find on physical phones. By clicking on it the home page of the phone will appear.

Home button on the device

  • Refresh” button

It appears at the top of the phone’s visual. This button is to reset the capture if it encounters any problems. It is used to reinforce the update.

Refresh button on the device

Save parameters

You can save a setting to launch the mobile application you want in your ATS settings.

Click on the "Settings" button in the top right-hand corner.

settings button

Click on the "Edit configuration" button to open the .atsProperties file in your default text editor.

edit configuration button

Then you can add your parameters in the configuration file by naming the application and adding the URL of the concerned application.

Example :

<mobiles><mobile><name>Betclic</name>

<url>mobile://192.168.0.39:8080/sport.android.betclic.fr</url>

<waitAction>100</waitAction></mobile></mobiles>

example

Mobile Station and continuous integration

Continuous integration allows the deployment of a mobile application developed externally to Mobile Station through an API Rest.

Scheme of continuous integration with mobile station

The application is sent to Mobile Station using a Rest API. Mobile Station then installs it on the devices so that the application can be run and tested with an ATS script through USB or WiFi.

There are three different strategies for implementing continuous integration:

Strategies for implementing continuous integration

  1. The tester's continuous integration launches the application developer's continuous integration
tester's CI launches the developer's CI

With its continuous integration, the test designer triggers the continuous integration of the application developer who will generate an application from the source code. This application will be sent to Mobile Station who will install it on the devices to make it available for testing. (Link to the video of the animated scheme: https://youtu.be/ISN874CZxxI)

       2. The continuous integration of the application developer launches the continuous integration of the tester

Developer's CI launches the tester's CI

The application developer's continuous integration will generate the application from the source code. Then it will be sent to Mobile Station and installed on the devices. With the intervention of the test developer's continuous integration, the tests will be generated via the source code which will allow the execution of tests from Mobile Station. (Link to the video of the animated scheme: https://youtu.be/5ui7ZPKnOKQ)

       3. The application developer and the tester work asynchronously

asynchronous work between the developer and the tester

The application developer and the test designer can run their tests asynchronously. With its continuous integration the application developer will install its application on its devices via Mobile Station. With the test designer's continuous integration, the application installed on Mobile Station and its devices can be tested. (Link to the video of the animated scheme: https://youtu.be/CyMW2N2tjiE)

Still require support?
Contact support

Create a Bitbucket-hosted Git repository

This article introduces the management of Agilitest projects with a Git repository hosted on Bitbucket.

What is Bitbucket?  

Bitbucket is a service offered by the Atlassian company, which allows the hosting and versioning of files using Git. It is well known in the corporate world, easy to use, and allows a perfect integration with Jira, a bug tracking system developed by the same parent company.  
The management of Git repositories is done from the web interface of the SaaS service, but a desktop software is available to perform files staging and commit operations. It is called Sourcetree.  
For the purposes of this article, the Sourcetree software has been configured in English for greater clarity on the original Git terms: Stage, Commit, Pull, Push, Fetch, Branch, Merge, Stash. Moreover, not all the terms of the application are translated from English.  

For the purpose of this article, it is therefore necessary to have a Bitbucket user account, and the Sourcetree software in connected mode. The connection of Sourcetree with the Bitbucket account can be done through the login credentials, or through API tokens that are created on the Bitbucket back office in Personal settings > App passwords > Create app passwords.  
SourceTree has been configured to use the "system" installation of Git and not the embedded version which can sometimes cause authentication problems for repository clones.

Setting up an Agilitest project managed with Git  

The first step is to create a Git repository from the Bitbucket web interface or from the Sourcetree software in connected mode.

Creating an empty repository  

From the software, go to the Local tab, click on the Create button.  
Enter the path of an empty folder to contain the repository on the local hard disk, as well as the name of the repository (here repository-test). Tick Create Repository On Account and select the Bitbucket account on which to synchronise the repository (Account, Owner, Description). Tick "Is Private" to avoid publishing your content in open-source in full view of everyone.  

Figure 1: Creating a repository in Sourcetree

Setting up an Agilitest project in the repository  

In local operation, without Git, Agilitest allows you to create new projects. These projects are populated automatically with a default tree structure that includes libs, src, target, etc.  

But in this case we started by creating the empty project folder (to make it a repository). So we need to copy the elements of an empty project into our Git repository folder (here, repository-test). One way to do this is to create the repository-rest-2 project in Agilitest and copy and paste its contents into repository-test. Be careful however to update the README.md, .atsProjectProperties, and pom.xml files to adapt the correct project name.

Another way is to create the Agilitest project first, move its content elsewhere, initialize the Git repository, put back its content, then Stage and Commit the repository.

First commit  

At this step, we are at level zero of the project and ready to start. It's time to Commit.  

To do this, go to Sourcetree: Unstaged files > Stage all, then click on the Commit button at the bottom right. Be careful not to confuse this with the Commit button at the top left.

Figure 2: Staged files for Commit and Push

The project is thus "snapshot" in its initial state and, in the future, it will be possible to return to this state. To synchronise the repository and its commits on the Bitbucket server, click on the "Push" icon.  

A question that often comes up is how often to commit. To answer this question, let's take a look at the notion of atomic commits, which it is advisable to respect:  

  • A commit concerns only one task: a test maintenance, an evolution of an ATS test, a new ATS scenario, etc.  
  • A commit does not break the consistency of the repository by preventing the execution of the tests or the campaign.  
  • A commit must be associated with a concise and explicit message.

Possibilities offered by this configuration  

The possibilities offered by this Git Bitbucket repository are the same as for any Git repository:  

  • Versioning of Agilitest projects and in particular of .ats files.  
  • Collaborative work between several automation profiles on the same project, and in particular the notion of Merge.  
  • Synchronisation of project folders between the Git repository, the automation roles, and the execution server. Git is thus a pillar of the CI/CD chain.  

Note that report retention is usually handled by Jenkins, with the retention of artefacts from each job launch (#1, #2 etc), rather than by versioning of runtime report files.

Still require support?
Contact support

Git repository for Jenkins builds

How to use a project from a Git repository as an Agilitest project source for running Jenkins jobs

In this guide, we will explain how to use a project from a Git repository as an Agilitest project source for running Jenkins jobs. With each build, Jenkins will first perform the Clone of the Git repository, and then proceed to run the ATS scripts configured in the test suite, and then generate any reports.  

Preparing the Agilitest project  

For the purpose of this guide, the Git repository is hosted at Bitbucket and has been initialized with a new empty Agilitest project by following the steps in the documentation Setting up a Bitbucket-hosted Git repository for Agilitest projects.  

Then, the Agilitest project (here, repository-test) lived on through commits, with the accumulation of ATS scripts, test suites, and data files.  

Creating the Jenkins job  

The Jenkins server must be started and connected to Agilitest from the Tools menu. It can be a local Jenkins server installed by Agilitest, or a remote server managed by your administrator.  

It is then time to create a new Jenkins job from the Agilitest run menu (by clicking on the "Manage project's execution suites" button in the "Projects explorer" accordion zone).

Figure 1: "Manage project's execution suites" button in the form of a cogwheel

Then switch to "Jenkins integration" mode and click on "Create a new task". Note that Agilitest has already recognized the presence of a Git repository in the project folder with its hidden .git subfolder. In our example we leave the */master branch by default. Then we drag and drop the desired test suite into the "Suites List" area.

Figure 2: Creating a new Jenkins job from Agilitest with a project initiated with Git

After validation, the new Jenkins job appears in Agilitest like this.

Before launching the build, it is essential to prepare the Agilitest project to support the Push and Fetch operations that will be performed by the Git client and the Jenkins server respectively. Git's default operation is not to synchronise empty folders, yet some of them are essential to Agilitest. A workaround is to drop an empty .gitkeep file in each empty folder of the Agilitest project. These files will force Git to synchronise the (empty) folders that contain them.

  • ./target/ats-output/.gitkeep
  • ./target/classes/assets/resources/lang/.gitkeep
  • ./target/classes/assets/resources/certs/.gitkeep
  • ./target/classes/assets/resources/images/.gitkeep
  • ./target/classes/assets/data/.gitkeep
  • ./target/report/.gitkeep
  • ./libs/.gitkeep
  • ./src/main/java/.gitkeep
  • ./src/main/scripts/.gitkeep
  • ./src/main/ats/subscripts/.gitkeep
  • ./src/assets/data/.gitkeep
  • ./src/assets/resources/lang/.gitkeep
  • ./src/assets/resources/certs/.gitkeep
  • ./src/assets/resources/images/.gitkeep

Configuring Jenkins  

First, the machine running Jenkins must have Git installed. The Jenkins server must have the Git plugin. Then the git.exe executable must be configured in the Jenkins Manage Jenkins > Global Tool Configuration > Git > Path to Git executable. In this case we have set C:\Program Files\Git\bin\git.exe.

Figure 3: Global configuration of tools (here, Git) in Jenkins

Let's take a look at what the newly created Jenkins job in the test repository project looks like from the web back office.

Figure 4: Configuration of a job from the Jenkins back office

The URL to the Git repository is recognized. It is important to configure authentication to the Git repository in Jenkins. Here we used a Bitbucket account (paul-chevalier) and an API token created from the "App passwords" menu in the Bitbucket administration interface.

One can initialize the Git repository in SourceTree with the syntax https://paul-chevalier:my-app-password@bitbucket.org/paul-chevalier/repository-test.git. The app password figures into the URL so in this case, configuring the Credentials in Jenkins is not required. To do that, SourceTree may require to address the System git.exe instead of Embedded gitlib.

Launching a build  

When launching a build on the Jenkins job thus configured, you can follow the Clone operation of the Git repository orchestrated by Jenkins in the standard output (Console Output icon). The name of the last commit appears here.

Building in workspace
C:\Users\paulc\.agilitest\work\jenkins\workspace\job\com.functional.repository-test\newJobJenkins
[…]
Fetching changes from the remote Git repository
>C:\Program Files\Git\bin\git.exe config remote.origin.url https://paul-chevalier@bitbucket.org/paul-chevalier/repository-test.git # timeout=10
Fetching upstream changes from
https://paul-chevalier@bitbucket.org/paul-chevalier/repository-test.git
[…]
>C:\Program Files\Git\bin\git.exe fetch --tags --force --progress --
https://paul-chevalier@bitbucket.org/paul-chevalier/repository-test.git +refs/heads/*:refs/remotes/origin/* # timeout=10
>C:\Program Files\Git\bin\git.exe rev-parse"refs/remotes/origin/master^{commit}" # timeout=10
Checking out Revision f167510d99abb5af2674db52227860cf423869fa(refs/remotes/origin/master)
>C:\Program Files\Git\bin\git.exe config core.sparsecheckout #timeout=10
>C:\Program Files\Git\bin\git.exe checkout -ff167510d99abb5af2674db52227860cf423869fa # timeout=10
Commit message: "Ajout de fichiers .copy manquants"
[…]

In addition, a new Git menu appears on the Jenkins page for the build (here #5).  

Through this article and its pre-requisites, we have used Git to link the test automation engineer's workstations that use Agilitest and the Jenkins server. Our continuous integration chain is ready!

Still require support?
Contact support

Setup a 2016 Windows Server

In this guide, we will present a step-by-step method to execute massive Agilitest tests.

In this guide, we will present a step-by-step method to execute massive Agilitest tests.

Global context  

The Windows server  

For the purpose of this guide, we installed a 2016 Windows Server. This is a common enterprise version, but the 2019 version works as well, as both share the same kernel as Windows 10.

This server is a virtualized VM with Linux KVM, and the hypervisor server itself is hosted in a datacenter. All configuration operations are done via Remote Desktop with the RDP protocol.  

During the setup, you need to check the "Windows Server 2016 Standard (User Experience)" version with a graphical environment. Firstly to facilitate administration operations, but mainly because most of the ATS tests generated with Agilitest require a desktop environment.

Two user accounts were created: worker1 and worker2.  

Installing Agilitest  

Agilitest was installed on the server from the Administrator session in C:\Program Files (x86\Agilitest. This installation is global for all users, and everyone will find an Agilitest shortcut on their desktop.  
On the other hand, the dependencies and configuration files are specific to each user concerning the two folders below:  

  • C:\Users\Administrator\.actiontestscript  
  • C:\Users\Administrator\.agilitest  

The same folders will be created for the worker1 and worker2 users automatically, during the first Jenkins build.  It is thus possible to have a particular configuration of the software for each user. For example, it is possible to modify the version of the Chrome or Firefox browser that will be used by the worker1 user by modifying the file C:\Users\worker1\.actiontestscript\.atsProperties.

You can find more information on the official actiontestscript page on GitHub.  

Installation of Jenkins  

Service or user command line  

Here Jenkins has been installed from the .msi installer for Windows. This installer offers to set up an independent Windows service, which we did (Login type: run service as local or domain user) with the user Administrator.

It is interesting to note that the Java package jenkins.war can later be run as a service or as a command line from a user session with desktop environment.

It is also important to mention that the way Jenkins is launched will have implications on the ATS builds that are executed. In service mode, running a test (e.g. Chrome web browser channel) will not generate any visible windows on the user session, which can be closed or locked, but the ATSV screenshots will be blank. In command line mode from a user session with a desktop environment, the test will generate visible windows on the user session, and the ATSV screenshots will work.

Anyway, it is recommended to run Jenkins as a service, and to run test suites with Jenkins Agents into user sessions with desktop environments. Jenkins agent can be stated at the opening of the session with shell:startup.

A tutorial in English on allowing a user account to run an executable as a service is available here. The steps to follow are as follows: Administrative Tools > Local Security Policy > Local Policies > User Rights Assignment > Logon as a Service (NT SERVICE\ALL SERVICES). The Administrator user has been added here.


The path to the Java JDK is requested by the installer. Java 52 (Java 8) or 55 (Java 11) are recommended by default but it is possible to use Java JDK 15 by adding the argument - enable-future-java in the Jenkins.xml configuration file.

The first connection to the Jenkins web back office requires entering a password contained in a text file. We then installed the recommended plugins.

At this point, the Windows Services Manager should allow the Jenkins service to be started and stopped. The auto-start type allows the service to start as soon as the server is started, even before a user logs on.  

The Jenkins installation was configured with the following points:  

  • Installation of the Locale extension to force the language "en" regardless of the language requested by the browser.  
  • Installation of the following Jenkins extensions:  TestNG Results Plugin & Test Results Analyzer  
  • Configure the path to git.exe (see article Using a Git repository as an Agilitest project source for Jenkins builds)
  • Add the label ats-executor in the menu Manage Jenkins > Manage Nodes and Clouds > Built-In Node > Configure.  

In this type of configuration, be careful to perform a Commit and then a Push of your Agilitest project so that Jenkins can execute your updates.


Still require support?
Contact support

Launching tests from an Azure DevOps pipeline

There are many ways to run ATS tests on Azure DevOps, here's a short overview of the solution we have implemented, which might give you some tips and tricks to implement yours.

To operate, Azure Pipeline relies on two types of agents:

1. Setting up the environment

You can install the Azure Pipeline agent on a Linux, MacOS, Windows or Docker machine. In this article we will detail the steps to use an agent on a Windows 10 machine. You can refer to the Microsoft documentation for the specifics of other platforms.

How to download and install the agent

To start, log in to Azure DevOps and click on ”User settings and then on ”Personal access tokens:

Follow the next steps:

  • Create a new token by selecting the Agent Pools (read, manage) permission
  • Return to the Azure DevOps home page and click on Organization settings at the bottom left.
  • Click on Agent Pools and select the Default pool or create a new Self hosted one.
  • Click on New Agent and follow the instructions on the page to upload your agent.
  • Unzip the downloaded archive on the machine where you want to install the agent and run config.cmd.
  • Follow the script to set up your agent, including the token created earlier. When you have the choice between an interactive mode or as a service, choose the interactive mode otherwise you will not be able to launch the ATS tests.
  • Once your agent is configured, run run.cmd to start it.
  • For more information about how to download and install an Azure Pipeline agent: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops

Machine setup

Once the agent is installed, several elements are necessary for the proper functioning of the ATS tests:

  • The .actiontestscript folder: this folder must be present at the root of the user's folder that will run the agent. It is created automatically and updated when Agilitest is launched. If you do not wish to install Agilitest on the machine where the agent is installed, you can copy and paste this folder from another computer where Agilitest is installed. In the future it will be possible to update this folder via npm and to automated it in the pipeline.
  • The JDK must be installed. Currently Agilitest needs JDK version 11 or higher.
  • Maven must also be installed, you can download it here: https://maven.apache.org/download.cgi

2. Creating a new pipeline on Azure DevOps

On Azure DevOps click on the “Pipelines” menu

Then click on "New pipeline" and indicate where your Agilitest project code is located

Follow the instructions to connect the Azure pipeline.

You can choose to use a preconfigured pipeline for Maven.

The selection of a maven project will allow AzuredevOps to directly manage the dependencies and external required libraries.

  • You can also start from an empty pipeline and add a Maven task.
  • In the pool section, change the "vmImage" type to "name" and enter the name of the pool you created earlier.

Modify the Maven task:

  • Change the value of "goals" to "clean test"
  • Change the value of "javaHomeOption" to "Path"
  • Add a "jdkDirectory" property and specify the path to the JDK on your machineo Remove the "jdkVersionOption" and "jdkArchitectureOption" properties
  • Add a "mavenVersionOption" property with the value "Path"
  • Add a "mavenDirectory" property and specify the path of Maven on your machine
  • Add a "mavenSetM2Home" property with the value "true"

Your YAML file should look like this:

For more information on the Maven task: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops

If you click on Save and run, the YAML file will be added to your source code and your tests will be run according to the configuration in your pom.xml file.

Still require support?
Contact support

Welcome to the Agilitest Support Center

Here is the full documentation about Agilitest and its features.

From setting up Agilitest to using its most advanced features, our documentation covers the broadest range of topics.

Should you not find answers to your questions about Agilitest here, please feel free to contact our Support team.

Still require support?
Contact support

Hardware and software requirements

Agilitest is an heavy-client application running on Windows operating systems.

Agilitest handles test projects that are accessible on the workstation, over network access, or any other file system accessible from the workstation's Windows Explorer.

You can create test projects, create tests, test campaigns and replay them from his Agilitest client.

The tests are generated in an open-source language ATS or ActionTestScript. This standard is compatible with the Maven and TestNg standards which allow broader deployment of continuous integration test environments.

For more information on ATS: www.agilitest.com/documentation/what-is-ats-actiontestscript-and-its-link-to-agilitest

Prerequisites for using Agilitest

Software requirements

Supported systems

Installation of the Agilitest client requires access to a recent Windows system, at least:

  • Windows Server 2016
  • Windows 10 or 11

Installation of Agilitest

‍Agilitest is provided in the form of a .zip file to be unzipped into a directory.

It is necessary to have read-write access to this directory, and that the decompression operation does not alter the structure of the files necessary for the operation of Agilitest.

It is important to check the access rights to the target directory, as well as the behavior of antivirus software, Windows Defender or other anti-malware which could impact the smooth running of operations.

Launch of Agilitest and verification of correct behavior

The following softwaresare necessary for the Agilitest solution to function properly:

  • Installation of Java JDK 17 at least (Jdk 20 recommended). You can can decide to configure your own JDK or simply ask Agilitest to provide them with a functional version (we use OpenJDK in version 21)
  • Installation of .NET Framework 4.8

To check that Agilitest is working correctly, you must launch the Agilitest.exe application located at the root of the installation directory. During the first launch, Agilitest offers to install or configure a JDK, as well as to download the latest version of the ATS libraries that it uses for its operation.

After this operation, you will be able to create test projects and automate tests from their workstation.

To know more about the installation and settings of Agilitest: www.agilitest.com/documentation/quick-start-with-agilitest

🔸 Warning

The positioning of environment variables by certain tools can impact the proper functioning of Agilitest (for example:JAVA_TOOLS_OPTIONS)

Access to the SUT

Depending on the technologies on which you wish to carry out tests, you will need to deploy a certain number of software complementary to Agilitest.

Web Technologies

The Agilitest editor supports almost all browsers running Windows in relatively recent versions for which there is a Web driver:

  • Chrome
  • Firefox
  • Microsoft MSEdge
  • Opera
  • Brave
  • Chromium / JXBrowser (Need Agilitest technical support)

By default the last version is supported. If you need to perform some tests on a specific version, you can consult this documentation or contact the support team: www.agilitest.com/documentation/version-management

WebServices

Agilitest has its own internal and graphical browser allowing you to automate web services. There is no need to install anything for this to work.

Android

Agilitest supports recent versions of Android > 5.0.

Support for physical mobiles.

Support for emulators (Android Studio, Genymotion...)

The operation of Agilitest under Android requires the installation of ATSMobileStation which allows the link between mobiles and an ATS process which controls them.

More information on: https://www.agilitest.com/documentation/mobile-station

iOS

Agilitest supports recent versions of iOS > v12.

Support for physical mobiles.

Emulator support.

Depending on the version of iOS tested, Xcode will need to be in a certain version. To find out more, you can consult this summary table: https://developer.apple.com/support/xcode/

‍The operation of Agilitest under iOS requires the installation of ATSMobileStation which allows the link between mobiles and an ATS process which controls them.

More information on: https://www.agilitest.com/documentation/mobile-station

SAP

Support for SAP technologies requires a specific version of Agilitest. Please contact us if this is not the case.

Support for SAP web frameworks, such as FIORI, Neptune or based on SAPUI5, is offered natively using a web connection with a browser.

For technology testingSAP Guide: The computer on which the tests are recorded or replayed must have SAPLogon access.

Furthermore, it is necessary to activate automation on both the SAP server and SAP Gui client side.

Hardware requirements

Here are the hardware requirements to run Agilitest.

Supported systems

Running the Agilitest client requires a Personnal Computer under Windows Operating System.

Personal computer

The minimum recommended hardware for using Agilitest on your client computer is the same as for the .NET Framework 4.8.

  • Processor: 2 GHz at least
  • Memory: 8 GB mini, 16 GB for comfort.
  • Java JDK: 300 Mo
  • Apache Maven : 10 Mo
  • Selenium + ATS Libraries: 40 Mo
  • Website and system drivers: 26 Mo

The overall installation if everything is installed isapproximately 500 MB of disk space.

Screen

Agilitest is intended for professionals in the creation and maintenance of automated functional tests. A minimum of two screens is essential for the conditions to be good.

A good screen resolution is required, at least 1280x1024, in order to view the application without scrolling, or with limited scrolling and Agilitest in the same screen.

💡 Tip

For ease of use, we recommend using two screens. However, a single large enough screen may be enough. Agilitest is 1500 px wide and 1000 px high, so you need to take this into account, as well as the size of the application you want to test, so that both can be displayed readably on the screen.

Mobile devices

For mobile testing, all the recent configurations of iOS and Android systems are supported.

Network and complementary applications

Network access

In order to regularly update your version of Agilitest, you will need to have full network access to these sites:

https://api-agilitest.com

https://actiontestscript.com

The update operation takes place when Agilitest is launched and is fully automatic.

If your system does not have access to the internet, we have solutions allowing Agilitest to operate in standalone mode which does not access any external system.

To know more: www.agilitest.com/documentation/agilitest-standalone

ATS executions

Agilitest and ATS are two different things.

Both of them can interface with a whole set of open-source tools, CI/CD, DEV/OPS, allowing you to manage test campaigns or replay tests.

We provide a whole set of preconfigured tools to easily deploy ATS technology (launchers, docker environments, etc.).

ATS can be executed on Windows, MacOS and Linux 2018+.

You will find more information on:  www.actiontestscript.com

Still require support?
Contact support

Genymotion emulators

Agilitestet and ATS, through free software ATSMobilestation, downloadable here let you use Android emulators from Genymotion Desktop.

Download and install the Genymotion solution

The prerequisite to be able to do this is to have downloaded and installed the Genymotion solution and installed an emulator.

By default, the Genymotion Desktop solution will allow you to launch emulators for your personal use. This can allow you to carry out tests before opting for a paid version.

The advantage of using this solution is that it is perfectly integrated with Agilitest and ATS, and that you will be able to very easily launch a wide variety of Android emulators:

  • Different formats (phone, small tablet, large tablet)
  • Android version
  • Screen density
  • Screen size in pixels
  • Source

Genymotion Desktop

Then you just need to launch an emulator:


Start a Samsung Galasy S7 emulator in Genymotion
Emulateur Galaxy S7 Genymotion

Then, you must launch ATSMobilestation, which indicates the terminals which are connected, you have several possibilities:

In our case, the Genymotion Desktop emulator appears directly in the list of terminals connected to the PC:

ATS mobilestation - Agilitest

You just have to use it to perform a mobile test.

In the image below, you will be able to identify: the Genymotion Desktop solution having launched an Android emulator, Agilitest and ATSMobilestation launched and carrying out a capture operation on a key on the calculator.


Still require support?
Contact support

Genymotion cloud

Agilitestet and ATS, through free software ATSMobilestation, downloadable here allow you to use Android emulators in the Genymotion cloud.

The prerequisite to do so is to have a Genymotion cloud account.

At launch, ATSMobilestation shows the connected devices :

In our case, we have a OnePlus physical mobile connected by USB and controlled by the Wifi network.

A physical mobile is connected by Wifi

Setting up your Genymotion account

ATSMobilestation will manage your Genymotion account, launch emulators and perform tests on them using Python scripting language gmsaas .

Click on the "gear" icon to open the settings menu:

Menu paramètres d'ATSMobilestation

You need to install Python, then enter its path in the "Python folder" field.

Click on "Install components", ATSMobilestation will install the gmsaas components:

Installation of gmsaas

Enter your Genymotion credentials:

Renseignez vos identifiants

The installation is finished!

Click on "Finish"

Launch a Genymotion emulator in the cloud

ATSMobilestation then displays a new tab, with the list of Genymotion terminals to which you can have access:

Liste des devices Genymotion dans ATSMobilestation  

Click on the green + to launch an emulator in the cloud, the emulator is then installing...

Install a Galaxy S7

... and is displayed in the list of available emulators. The "chain" icon indicates that the emulator is linked to your instance of ATSMobilestation. The emulators available on the same Genymotion account but on other PCs/Servers do not have a chain.

The device is installed

You can also count them in the Genymotion cloud tab:

3 Genymotion devices are launched

The new terminal is available in the list of connected terminals:

Connected and ready to run

Use the Genymotion

You can use it in Agilitest to write or launch tests:

Opening a channel on a Genymobile terminal in the cloud
Performing a test on a Genymobile device


Still require support?
Contact support

Android emulators

First, you must be familiar with the use of ATSMobilestation, which centralizes all of the mobile terminals that are accessible from a given PC / server.

ATSMobilestation can connect to your physical terminals, with mobile terminals in the cloud (via the Genymotion solution, which is also available on the desktop), but also perform tests on emulated Android terminals installed on your machine.

There are several, and we do not have an exhaustive list of the terminals supported by ATSMobilestation, in general, an access to adb is enough for us to support them.

For the demonstration, we will use an emulator provided by Google with the suite Android Studio

Install Android Studio and launch an emulator

By clicking on the previous link, you will be able to download and install Android Studio. There is no particular difficulty, just make sure that the installation of "Android Virtual Device" is taken into account.


Installing Android Studio

At the end of the installation, launch Android Studio and select the menu  "Tools" and  "AVD Manager":

Launch of AVD Manager

Click on "Create virtual device".

Then select a device type, the version of Android on which you want it to work and download the system image.


Selecting an Android configuration

Then complete the download and configuration of your device, you should then see it appear in your list of available terminals:

 List of installed Android devices

Then just click on the "Play" button on the right, and wait for the system to launch.

Launch ATSMobileStation

Then launch ATSMobilestation which will automatically spot the launched Android emulators, and you should see your emulator appear in the list:


The Android emulator spotted by ATSMobilestation

The right button allows you to launch the emulator, stop it, etc.

Once launched, it appears in the list of "Connected devices", in the image below you will see an emulator launched on your PC, and a phone connected to your PC: both are accessible by ATS and Agilitest.

Liste of connected devices

Launch Agilitest

Then, you just have to launch Agilitest and you should see your emulator appear in the list of accessible terminals to perform a test:

Selection of a device in Agilitest

Then you just have to select an application to test


Selecting an application to test


Agilitest in Capture mode on the Android Studio emulator
Still require support?
Contact support

Automation of HTTP Archives

Agilitest allows you to automate the creation of HTTP Archive (HAR) files which will be useful for analyzing network flows during the execution of a test.

HAR format

The HAR format makes it possible to record the details of the Urls  visited and the chronology of their loading made during an HTTP request.

It records the information related to all of the pages, files and images that are downloaded by a browser when you visit a URL.

You can then use a .HAR file viewing software that will allow you to display this query graphically.

You can obtain this result :

More information on the HAR format: https://en.wikipedia.org/wiki/HAR_(file_format)

How it works in Agilitest

The HAR format recorded by Agilitest involves more than visiting a  single URL, it can record all of the performance of a software test and  all of the URLs that were visited by the test, and it can do it action  per share.


We have an ATS actions specific to this integration, you can put URL filters, start and stop recording as well.

Activating performance mode


The performance mode is not activated by default in Agilitest.

To do this you will need to modify your .atsProperties file and insert an XML element <performance> inside <execute>:

<?xml version="1.0" encoding="utf-8">
<execute>
  ...
<performance>
<idle>4</idle>
<blacklist>
<url>https:\/\/www.google.com.*</url>
<url>https:\/\/accounts.google.com.*</url>
</blacklist>
</performance>
  ...
</execute>
...

The performance tag allows you to integrate other configuration elements.

Example:

Integration with Octoperf will allow you to transmit your HAR files directly into Octoperf projects to carry out load tests.

The parameters are the following:

  • idle : Allows you to change the default network timeout. See the "Configure Network Capture" action below.
  • blacklist: allows you to specify URLs whose browsing information you do not want exported to the HAR file. This allows you to remove advertisements, for example.

Once this configuration is done, if you restart Agilitest, you will see a Performance action  appear on the right of the actions menu:

The Performance menu is drop-down and displays the following sub-menus:

Open a channel in HAR recording mode

You must create or modify your channel opening action to indicate to Agilitest that you wish to activate the network recording and control functions.

Click on the third icon to the right.

performance button

The channel opening action will make the "Performances" icon appear.

channel with performance action


Add recording functions

Settings

This action will allow you to configure the network capture

You can modify the behavior of Agilitest when recording the replay of the test allowing to provide a .HAR:

  • Latency:  This allows you to add latency in seconds to all requests sent and received by the web browser in use by Agilitest.
  • Traffic idle:  Maximum time in seconds before considering network traffic to have ended after the last recorded network activity (default: 3 seconds).
  • Upload: Limits the uplink bandwidth in bytes / second.
  • Download:  Limits downlink bandwidth in bytes / second.
  • Add URL filter: This allows you to filter the URLs that will be counted and saved in the corresponding HAR file. You can add as many filters as you want.

You have the option of adding unauthorized URL filters, which will therefore not be saved in your HAR file. As this is more of a general configuration topic, this is done directly in the configuration of your .atsProperties file.

Record

This action is a switch on/off which tells to Agilitest when you want to start recording network traffic.

You can stop and resume recording at will depending on the actions that are performed by Agilitest.

Recover HAR file

When your test is performed, if the channel has been opened in Performance mode, the channel closing action will generate the .HAR file.

You just have to recover it in the following directory:

target/performance/generateHAR.

Still require support?
Contact support

Automation of Octoperf scenarios

What is Octoperf?

Octoperf is a SaaS and On-Premise Load Testing solution.

Agilitest allows you to automate the generation of scenarios and to import them directly into your Octoperf account.

The two solutions are therefore very complementary since you will be able to transform any functional test carried out with Agilitest into a load test in Octoperf.

This is how it works:

  • You record a functional test scenario with Agilitest
  • You add the ATS actions necessary for its instrumentation with Octoperf
  • You replay this scenario so that Agilitest will generate a .HAR file and transmit it directly to your Octoperf account, in the worspace and the project you want.
  • You can then use in Octoperf the data that has been imported by Agilitest to carry out load tests, and analyze the results.

This makes it possible to benefit from the Agilitest capability of recording and replay a scenario to transform any functional scenario into a load test.

We have an ATS action specific to this Octoperf integration called “Perfomance”.

Activation of the Octoperf mode

First of all, you must activate the Performance mode, to allow the generation of HAR files.

It is also necessary to activate the Octoperf mode by modifying your .atsProperties configuration file and insert a <performance> tag inside the <execute> tag.

The following code activates the two necessary modes:

<?xml version="1.0" encoding="utf-8"?><execute>  ...<performance><octoperf><host>https://api.octoperf.com</host><apiKey>1b3b3b85-bbb5-219b-936b-61bb521b23ed</apiKey><workspaceName>AgilitestWorkspace</workspaceName><projectName>AgilitestCaptureProject</projectName></octoperf><idle>4</idle><blacklist><url>https:\/\/www.google.com.</url><url>https:\/\/accounts.google.com.</url></blacklist></performance>  ...</execute>...

The parameters are as follows:

  • host : corresponds to the address of the Octoperf server, in general leave it by default.
  • apiKey : corresponds to your API key which you can obtain on your Octoperf account by clicking on the "Profile" section of your account

Profil Octoperf

It is then displayed at the bottom right, you just have to make it visible and copy it by clicking on the "eye" icon.

  • workspaceName : Corresponds to the name of the Octoperf workspace in which your project is located
  • projectName : The name of your Octoperf project

Once this configuration is done, if you restart Agilitest, you will see a Performance menu appear on the right of your screen:

The Performance menu is scrollable and displays the following submenus:

Open a channel in Octoperf recording mode

You must create or modify your channel opening action to indicate to Agilitest that you wish to activate the network recording and control functions.

Click on the third icon to the right.

The channel opening action brings up an icon identical to the "Performances" menu

Add integration functions with Octoperf

Settings

This action will allow you to configure the network capture.

You can modify the behavior of Agilitest when recording the replay of the test to provide a .HAR:

  • Latency: This allows you to add latency in seconds to all requests sent and received by the web browser in use by Agilitest.
  • Traffic idle: Maximum time in seconds before considering network traffic to have ended after the last recorded network activity (default: 3 seconds). The default value of this parameter can be modified with the <idle> tag in your .atsProperties file.
  • Upload: Limits the uplink bandwidth in bytes / second.
  • Download:  Limits downlink bandwidth in bytes / second.
  • Add URL filter: This allows you to filter the URLs that will be counted and saved in the corresponding HAR file. You can add as many filters as you want.

You have the option of adding unauthorized URL filters, which will therefore not be saved in your HAR file. As this is more of a general configuration topic, this is done directly in the configuration of your .atsProperties file.

Record

This action in switch on / off mode allows you to tell Agilitest when you want to start recording network traffic.


You can stop and resume recording at will depending on the actions that are performed by Agilitest.

Save VU

This action completes the registration, finalizes the generation of the .HAR file and sends it directly to your Octoperf account according to the methods defined in the configuration parameters of your .atsProperties file.

You have the possibility to act on the following information:


  • Modify the description of the VU that will be sent to Octoperf
  • Change the name of the virtual user
  • Add a list of tags, separated by commas which will be used in Octoperf.
  • Select the possibility of appending the actions:

               - Append: the HAR actions accumulate in your Octoperf project

                - Don't append : the HAR previously saved in your project are erased before sending the HAR file.

Still require support?
Contact support

Making software tests more robust

There are a number of tips to know when doing software test automation in general, and with Agilitest in particular to make your tests more robust.

Indeed, when it comes to automated software testing, there is an automation tool, and there is also the SUT (system under test) which has its own behavior, its response times and its peculiarities that will have to be taken into account.

This post covers a set of tips that we recommend you use to make your tests more robust.

About the use of Max / Wait for in a test

Your server is slow to respond : never mind, we will wait 5 more seconds !

We do not recommend doing that, this post will explain why and how to deal with the subject. The proposed technique will allow you to manage all the solutions where a certain latency between the software and Agilitest can occur : waiting for a server response, complex calculation on a Desktop solution...

Object identifiers

Some component frameworks generate identifiers that may only be valid for a given browser session, and relying on these identifiers to perform tests is risky, since it is highly likely that during execution The identifiers have been changed.

In some cases this can still be done using regular expressions.

It is enough to recognize the part of the value of the attribute of the component to be recognized that is always fixed, for example a prefix or suffix, in the following case :

"select_

"id = select_4657

To treat this case, the following regular expression applied to the attribute "id" should do :

select_( d{4})

So the number of four digits can vary depending on the executions, but we will always find in a very robust way the component with an id beginning with "select_".


The design of ATS

During the design of Agilitest and the ATS language, we have benefited from several years of experience in market automation solutions, and we aim to overcome a number of shortcomings and/or defects. This involves the implementation of configurations specific to runtime environments: by default, ATS is designed to work correctly in most cases, But it is still possible to change its configuration.

Double property checks

When recovering a value on a composter, Agilitest will double-check the value to ensure that it retrieves accurate and stable information. This ensures that the values we want to control are definitive and those provided by the test, while adding stability and reliability.

The configuration by robot execution

The reliability of a test also depends on its speed or its slowness of execution. Indeed, networks and machine performance can put tests into chess.ATS takes into account the possibility that machine performance impacts the execution of tests. Thus, when it is launched, ATS will recover a configuration file .atsProperties specific to the job it is running on.

This makes it possible to fine-tune runtime environments to the desired context, for example a development software version or a production version may not respond in the same way: With this system there are many more guarantees to always have a regular replay.

Configuration by navigator

The behavior of the test and therefore the result of its execution may also vary depending on the browsers. It is therefore also possible to configure the execution environment according to the browsers used.

Robustness at the center of the issues of our development product

Robustness and maintainability of the tests are at the center of our concerns because we want that the testers focus on what is really important to them. In Agile/Lean jargon, we seek to remove "muda" (waste of time/waste) as soon as we have the opportunity.

Still require support?
Contact support

Automating dialog box validation

How to automate a dialog box validation

It will happen often that you will need to validate a dialog box on supported web browsers in order to confirm or cancel an action.

However, it is impossible to capture a dialog box with the capture tool.

To automate the validation with Agilitest, you will need to select the dialog box from the root application available in an action.

When you create an action without inteface element, it will show the root application.

Click on the “Mouse” action in the actions menu

mouse action

Then, select "Mouse click"

mouse click action

Click on the “Root application" to select the interface type

root application

A new menu will appear with the following possibilities:

root app menu
  • Add an interface element
  • Modify the system element
  • Manage a dialog box
  • Screen record

To know more on the other elements types, you can consult ou documentation about Editing actions.

To automate a dialog box, click on the “Dialog box” button

dialo box button

There are three actions possible on a dialog box

Confirm the dialog box

From the root application, select “Dialog box” to show its options

dialog box options

Select the validation type you need for the dialog box:

  • Accept
  • Dismiss
accept box

Example :

A dialog box that needs to be accepted or dismissed

example dialog box

Click action

It is also possible to simply use the click action on a dialog box if only one button appears.

click on dialog box

Example :

An “Ok” button that is used to make the dialog box disappear

ok button on dialog box

Property action

On each of the proposed actions it is possible to perform a property action which will enter the information entered in the dialog box.

Example :

To do that, click on the “Property” action situated in the action menu

property action

Then, select “Dialog box” from the root application.

dialog box button

This will return the text shown in the dialog box,

dialog box text

As a value in your property action.

value in a propert

Still require support?
Contact support

Encrypted passwords management

Agilitest allows the recording of variables which are then encrypted in ATS files.

How to manage encrypted passwords

This allows them not to appear in plain text in the files, nor in the test editing interface.

You can access the use of an encrypted password through the shortcut located in the special keys when entering text.

encrypted-password-shortcut

They can also be managed in the "Edit project properties" menu.

Edit project properties

Click on "Add" and enter a variable duplicate, value.

Thereafter, the value can be retrieved in ATS as a normal variable using the keyword $pass(variable).

What differs from the normal management of variables:

  • Passwords are not printed in the editor user interface anywhere other than in their edit menu.
  • They are not visible in ATS files, not even their declarations.
  • They do not appear in ATSV files.
  • They do not appear in the logs and logs generated by Agilitest and ATS.
  • Each variable declared using $pass() variables is handled in the same way.
Print a password in Agilitest

When to use encrypted passwords

We recommend that you use encrypted passwords when you cannot do otherwise.

For example, we do not recommend that you perform your tests with real user accounts that are in your teams by encrypting passwords. The solution that we recommend to you is to create users dedicated to tests and having their own privileges, if possible limited.

If you cannot do otherwise, for example if you must test the administrator account, we advise you to do so on environments similar to production that are secured differently (for example physically on your premises).

Finally, if you are testing on systems that are in the cloud, you will not be able to do otherwise, and in this case, we advise you to complete this mechanism, for example by going through secure transfer protocols like https or using one-time passwords issued by a secure server.

Still require support?
Contact support

Quick start

You have just obtained your license or a trial version and with the help of this documentation your first steps on Agilitest will be guided. Here is an article to help you install Agilitest and then start performing your first tests.

▶️ You can find a tutorial on how to install Agilitest on our Youtube channel.

1. Download Agilitest

Agilitest is installed on a computer running the Windows operating system. Before starting your installation, it is preferable to take note of the technical prerequisites listed in a dedicated documentation.

If you don’t have access to the Agilitest archive, go to the page : https://www.agilitest.com/free-trial.

Enter your personnal information and we will come back to you for a short demonstration before the installation.

Our support team will give you a link to download the archive.

Once you have a link to download Agilitest, and you are sur to have an active license or a demo version, you can install Agilitest on your computer.

To do that, open your download repository in your Windows explorer to recover your .zip folder.

The .zip folder contain all the necessary files to make Agilitest work.

You can extract this folder with by clicking on the “Extract all” command

extract agilitest.zip folder

Then, place your folder in the repository of your choice in which you can create a sub-depository named “Agilitest” in order to better organize your files.

🔸 Warning

Make sure that you place your Agilitest folder in a directory where you have access rights. If this is not the case, it may cause problems when creating scripts. The "Document" directory is recommended.

Click on “Ok” to confirm the location of your archive and the files it is composed of.

Open your Agilitest folder then double click on your .exe file to launch Agilitest.

2. Launch Agilitest

The ChangeLog window will appear at the opening of Agilitest when it is your first time opening Agilitest or when modifications have been made since the last time you have opened the software.

ChangeLog

The ChangeLog is there to inform you about the last current Agilitest version and about the modifications that have been made on the software (sometimes with a short explicative video to better understand).

For your first opening of Agilitest, the terms and conditions of use will be presented to you.

Read them and click on the “Accept” button.

terms and conditions

Once this is done, the first ATS components updates will start automatically.

ATS components update

An update is made about every week, notably to support the browsers and webdrivers evolutions.

Agilitest works with the JDK (Java Development Kit). Java will be used during the whole compilation and execution phase of automated projects. By default you will need a JDK in your environment.

To parameter youor JDK you can do it from the settings menu in Agilitest.

Settings button

It is possible to link to an existing JDK on your computer or you can directly download it from Agilitest as indicated by clicking on the "Download" button. This will download the open JDK which is a selfported version of the JDK.

Java (JDK) settings

The two prerequisites to use ATS are the ATS package and the JDK which will make the editor functional.

You need at least a version 11 of the JDK. Agilitest will download the latest version.

💡 Tip

If you have UFT installed with a JDK in the environment variables, then you can make Agilitest cohabit with this existing Open JDK.

You can return to the editor interface by closing the open window.

The license is located at the very top of your editor. By clicking on it a license pop up will appear with a number of information such as id, system ID etc…

Agilitest activation

You can also create or change your ID by entering another ID in the input bar and then clicking on the "Create Account" or "Change ID" buttons.

You can also find information about your license in the "Help" section.

Help button
Help and informations - license

In the "Help" menu you will also find various links that complement the use of Agilitest.

Help menu

You will find the link to download Agilitest. Links to download Mobile Station on Windows or MacOs and a link to download the ATSV player.

In the right hand sidebar are various resources with links to Agilitest documentation, website, tutorials, web drivers and a list of integrations you can use with Agilitest.

In the tools menu you will find additional tools that can enhance the use of Agilitest.

Tools menu

By default, Agilitest will display an error icon if they are not downloaded. It is recommended to download all of them during the installation to have them accessible.

Tools installation

The editor can be divided into several parts. The project management part with buttons to create a project or components.

Project management section

The section of settings and configurations with the category Help, Tools, etc…

Settings and configurations section

The project explorer where the different scripts and their components are placed.

project explorer

The channel management part which is used to manage the execution of the scripts.

Channels management

Then the part dedicated to the variables below.

Script's variables

A documentation is at your disposal for more details concerning the Agilitest interface.

3. Create a new project

▶️ You can find a tutorial on how to create a new project on our Youtube channel.

To create a new project, click on the action “New project”.

New project button

You can rename your project and change its domain if you want to divide your project into different domains.

New project window

When you create a new project, it will create a project directory "AgilitestProjects" where all your projects will be automatically placed.

The path to your project in Windows Explorer will be indicated. You can also add a description to your project.

Once the project is created, it will be placed in the project tree in the project explorer.

Note: Agilitest scripts are ActionTestScript files (.ats). You can create sub-directories to better categorize your projects. You can also create sub-scripts, which have no differentiation with scripts, both are ats files, only one is called by the other.

There are two ways to create a script:

  1. By clicking on the “Create an ATS script” button
create ATS script button

       

          2. By clicking on the “New component” button.

new component

           And by selecting “Create ATS script

New component window - create ats script

Enter the name of your script. This will open a window corresponding to the graphic interpretations of the actions that will be performed on your script. The ATS format is a textual format that will describe all its actions.

script view

To do the link between Agilitest and the tested application you need to open a channel.

To do that, click on the “Channels” menu and select the action “Start channel

start channel action

It is possible to do multi-channel by creating several open channel actions. The name of these channels will automatically adapt to the number of open channels. It is possible to rename them.

🔸 Warning

It is possible to make only one instance with web browsers, which means that for the same browser opened in several channels it will correspond to several tabs or channels that open different browsers in parallel.

Once you have created the channel action, click on the execution button to launch the action

execute action button

This will open the channel opening window with various information about the browser and the operating system.

channel opening

On the Agilitest interface, the opening of the channel will be indicated by its presence in the channels management area with a line that appears with the name given to the channel.

Channels management

In a web test, to access a URL you must click on the "Navigation" action and select "Browser URL".

browser URL action

Click on the action to open the input bar and indicate the url you want to launch.

input

Once the site is open you can perform various actions using the elements that compose it. To do this you must capture the elements with the capture tool.

Click on the “Capture” button in the channels management

capture button

The capture tool will open by placing a filter on the channel and bringing up the capture window. With your mouse you can hover over the DOM elements that will be highlighted by a blue box.

capture tool open

To capture an item, press the CTRL key on your keyboard to open the parent window of the captured item.

captured element's parents

This window displays the tree structure of the element from the root to the targeted component. Each branch of the tree has properties that can be selected as attributes. The properties can be taken from the various branches of the tree for further clarification.

🔸 Warning

Pay attention to the properties that are going to change and that cannot be recognized in the script afterwards (Example: text, class, etc).

Click on an attribute to open the property value. This can be changed in the form of a regular expression.

regex

Once the attributes are selected, click on the statistics button to confirm the uniqueness of the element found.

statistics button

If several elements match these attributes, you can select others by moving up in the branches.

Once this is done you can drag and drop your element into the script which will create an action.

Select the action you want to use.

Action selection of the captured element

Once the capture is complete, you can close the capture from the channel management menu in Agilitest.

close capture tool button

Or you can click the "Close" button from the capture window to stop the capture tool.

close button in captured window

Your actions will be added to your script. It is possible to move them manually.

action presentation
  1. Each action has an index that is automatically added and adapts to its position in the script.
  2. In the action is the nature of the action which can be configured.

Example : For the text input you can enter the text you want to appear in your test.

       3. Finally, you will see the component that has been captured. You can click on it to have access to its value which you can change. You can add parents and children to your element and change the nature of the component.

children and parent's element

Once your script is completed, you can launch the execution by clicking on the “Play” button in the channels management menu.

Execute test button

🔸 Warning

In access remote, make sure that your sessions are kept open during the executions.

When you want to close your channel, you can create an action “Close channel”.

Close channel action

You can also close your current channel from the channels management menu.

To do that, click on the “Close” button

Close button in channels management

Or you can click on the “Stop” sign in the channel line

Stop button

🔸 Warning

You should not close your channel manually directly from the application. Agilitest is not intrusive (no plugin), it has no way of knowing that you have closed an application directly by the actions of the operating system (Example: by clicking on the cross of the application window).


Still require support?
Contact support

Calls for conditional sub-scripts with Agilitest

Agilitest allows you to call so-called "conditional" subscripts, meaning that evaluating a condition leads to the subscript being called or not.

How to call conditional subscripts?

To perform this operation, you must first create a sub-script call action.

Then, click on the script call action and "Add condition".

add condition button

Then, select a variable on which a condition is based.

variable selection

This variable can be defined as “equal” or “different”.

Only one condition can be selected.

You can delete a defined condition by clicking on "Remove condition" from the script call action.

remove condition button

The other parameters for calling the subscript remain the same: you can pass input variables or a CSV file.

During the execution, Agilitest will evaluate the condition and, depending on the result, call or not call the sub-script using the defined parameters.

Agilitest will show you in the editor the result of the current state of the subscript call:

  • Green arrow: Subscript will be called
  • Stop sign: sub-script will not be called up
conditions passed or failed

🔸 Warning

For creation and maintenance, we recommend not using conditional subscript call functionality, to keep test campaigns as predictive as possible.

The cases in which we recommend using conditions are as follows:

  • Making a call based on the value of a global variable: this allows you to perform set-up operations based on the presence or absence of a variable in the continuous integration call parameters, for example.
  • In a subscript with a CSV file: call a script according to a CSV file parameter passed as a subscript call. This requires a second level of subscript, but allows you to manage dedicated controls.

Still require support?
Contact support

Activation of Agilitest

You have just ordered an Agilitest license and you should have received your customer ID. If this is not the case, please contact our sales department who will provide it to you. (mail : contact@agilitest.com )

How to activate your Agilitest licence

Here is all the information necessary to obtain the activation of your licenses on your workstations, this operation must be done for each license and for each workstation:

  • Connect to the computer on which you want to activate the license.
  • Launch Agilitest and click on the license activation banner at the top
 License activation banner  
  • Display of the license activation popup
  • Enter your account identifier in the "Create or modify your account identifier" field
  • Click on "Change Account"
  • If the number of activated licenses is less than the number of licenses you have ordered, activation should be effective:
Agilitest activated
  • If you click Help at the top right, you should see the activation information appear (machine name, user name, system id, customer id, email, company and expiration date).
Activation information

If the activation is not done, please contact our sales department or send a request to: contact@agilitest.com

You can also contact us if you have activated a license on the wrong extension or if you want to change the extension.

Still require support?
Contact support

iFrames automation

Some HTML pages include iFrames (inline frames) in their design, especially to insert elements from another server into the page.

How to identify iFrames elements

To find elements on these HTML pages, you will have to select each iFrame in the page's DOM otherwise you won't be able to find the children of this IFRAME on the page.

Example below :

  • Select the iFrame attribute that allows you to recognize it:
  • Select the attributes of the children you want to automatically find in this iFrame:

The object is then recognized without any problem.

Note :

If the iFrame is not identified, the result will be negative to detect its children as accurate as the selection of attributes.

Still require support?
Contact support

Test reports

Agilitest is able to generate an XML file containing all the important information about the test process, as well as the successive images of the different actions performed. We have chosen to rely on an open format (.xml) and a document generation engine under free license (FOP).

These .xml files can be used to produce all types of reports:

  1. Execution reports:

              · Execution report: for a global reading of tests execution

              · Detailed execution report (with or without screenshot): to analyse the reasons for failed tests

                 ◦ Summary report (pdf): for a global reading of test success in a specialized format

                 ◦ ATSV report: Execution images compiled in a video format (played via the ATSV player)

        2. Validation report: to document and to archive the implemented executions

Below is a scheme on how to use the reports according to the needs ot the teams and the way the organisation of the information can be used (plus, an animation video of the scheme https://youtu.be/2UdsYINPk_s)

Scheme about test reports organisation

Configurations

Reports generation

It is possible to configure the information that you want to see appear in your reports (execution or validation) from the project constructor by checking the “Generate report” case or from your Jenkins integration. You will be able to choose to generate execution reports or a validation report.

From the execution interface

There are two possible ways to generate reports:

  1. From the drop-down menu of your project, by clicking on “Executions management
Executions management

Then by clicking on the case “Generate report” in the project’s builder. This will give you access to the “Report detail level” drop-down menu as well as the possibilty to check the “Generate validation report” case.

project's builder

       2. From the “Channel management” menu, by selecting the “Parameters” > “Generate XML report

parameters button in channels

From your Jenkins integration

The configuration of reports can also be done from the Jenkins integration when creating a Jenkins Job.

You can set the execution report level or generate a validation report from a dedicated box in the Jenkins Job creation window.

Jenkins Job creation

Reports storage

At the end of the execution, the reports will be stored in one of these default files:

Report generated via Agilitest;

  • Java : <Agilitest_project_file>\<project_name>\target\ats-output
  • Maven : <Agilitest_project_file>\<project_name>\target\surefire-reports
  • Or placed according to the user choice

Report generated via Jenkins integration:

  • Jenkins : <jenkins_job_folder>\builds\<numero_de_build>\htmlreports\<nom_du_publisher>\

Execution reports

The level of information in the execution reports can be chosen in Agilitest by using the drop-down menu "Report detail level".

The execution reports provide three level of information from the project’s builder in the Agilitest editor.

Report detail level menuu

Each report level has the following headers:

  • A global summary of the executed Suite with a description, the added parameters and the execution result.
  • A summary of the Suite that have the number of tests executed
  • A summay by script with the number of actions, the hour and the date of the script execution, the author, a link to the video report and the execution result.
report's headers

Execution report

The execution report provides a global reading of tests execution. It indicates:

  • Actions
  • External links
  • Execution time
  • The status of the action’s execution
Execution report

Detailed execution report (with or without screenshots)

The detailed execution report provides a better understanding of the tests design and of potential bugs. It indicates:

  • Actions
  • External links
  • Execution time
  • The status of the action’s execution
  • Information about the action
  • A clickable screenshot that can be zoomed in (for the report with screenshot)

All the information about the actions specifiy what type of action and the elements of the action. Example: ActionMouseKey, Type : Click.

A purple insert corresponding to the action will appear in the image when an executed action corresponds to an user interaction (example : Mouse actions, text input, etc…).

When an action is failed or is not validated but does not prevent the test’ success, a explanation of the error will appear in the information part of the action.

Image of a detailed report
Example of detailed execution report without screenshot
Image of a detailed report with screenshot
Example of detailed execution report with screenshot

The video report: ATSV

The ATSV file can be accessed directly from the execution reports and corresponds to a video format of the report presented as a set of compiled images accompanied by animations of the executed actions. For now, the file format is only usable via Agilitest and its internal player (Soon: the reader will open on a web page)

Link to ATSV report
Link to the ATSV report from the execution report

The ATSV file can also be accessed from the execution parameters by clicking on “Visual report”.

visual report button

Summary report

The summary report is generated directly from the execution report in a PDF format. It requires the use of the Jasper tool to be generated. It is consulted by managers and the teams project to have a report of the executed tests’ success in a specialized format. It corresponds to a summary by execution Suite and by test in order to have a global status of the software quality assurance.

Directly from the Execution report, click on the Summary link to generate the PDF file (at the top right of the Execution report)

Link to Summary report
Link to the Summary report from the execution report

The display of your summary reports can be customized with project report templates.

To access it, open your project properties by clicking on menu located in the Project Explorer

Project properties

Then choose the template you want to use in the dedicated box.

Proect's reports templates

The validation report

The validation report is generated by checking the box "Generate validation report" in the project’s builder:

Generate a validation report

The validation report is designed to be a proof of execution to be saved or archived.

It includes the same information as the detailed execution report with clickable screenshot, except that:

  • It has no link,
  • There are all actions (execution time, action execution status) except these: no ActionChannel as well as ActionProperty and ActionComment,
  • In the information part, there is no "error" part and in the "element" part, we find the Tag and Criteria but we do not find the number of elements found, the search time, the location, the click position.
Validation report
Example of a validation report

The execution status of the action

For all execution reports and for the validation report, there are three execution statuses:

Failed action

Failed action: When an action is in error for various reasons (bugs, wrong input, etc...) the error icon will appear on the action’s line.

Successful action

Successful action: When an action is successful, the validity icon will appear on the action’s line.

Failed but passing action

Failed but passing action: When an action is in error but does not prevent further execution of the test, the passing error icon will appear on the action's line.

The verification status of the action

For the detailed execution reports and the validation report, in the "information" box, the elements of a validated action are indicated in green.

Validated action
Validated action

For the detailed execution reports and the validation report, in the "information" box, the elements that put an action in error are indicated in red.

Action in error
Action in error

Still require support?
Contact support

Activation of the automation module

Agilitest support the tests automation on Android devices.

Prerequisites on the Android terminal

  • Enable the smartphone's developer mode to allow "USB Debugging"
  1. Go to the settings.
  2. At the very bottom, go to "About the device" (or in "System - About the device", on some models).
  3. Press the Build Number box several times (seven times) until a message appears "You are now a developer". You have just activated the developer mode on Android.
  4. Return to the main settings menu, you will then see a new sub-menu: "Options for developers" or "Development options" depending on the manufacturer customization.
  5.  In the developer options, enable "USB Debugging".
  6. Disable all the automatic screen locking functions.
  7. Connect the Android terminal on USB.
  8. Connect the Android terminal to the same WiFi network as the one to which you are connecting Agilitest.
  • On Windows 7, install the developer driver provided by your phone manufacturer. For example, here is the driver for Samsung Devices. After installing the driver, an "Android ADB Interface" line appears in the Windows Device Manager by connecting the phone via USB.

Prerequisites on Agilitest

  • In the "Help" menu, click on the link dedicated to downloading "AtsMobileStation" in agreement with your OS (Windows or Mac OS)
  • Run the downloaded package "AtsMobileStation.exe or .dmg" to install this mobile device detection module locally

Start of test automation

Launch ATS Mobile Station. The first screen displays that there are no devices found, but the system starts scanning the USB ports. If this screen persists, make sure that you have connected your Android device to the USB port on your PC and that it is in developer mode..

ATS Mobile Station has just discovered a connected Android device and is configuring the connection.

Finally, the terminal is found, configured and ready for use. Get the IP address of the connected terminal to enter it in Agilitest.

In Agilitest, create the ATS script that suits you and insert the "Start channel" action and select "Mobile".

Start a channel on mobile devices

Enter the IP address of the connected terminal, click on "Discover" and then select the installed application you want to launch automatically:
 Click on "Ok" to finalize the pairing.

Enter your Android device's IP adress

The opening action of the mobile application is configured in Agilitest.

The action "Start channel" on an Android device

The activation of the capture in Agilitest opens an remote display of the screen of the controlled terminal in order to automate directly above the desired actions.

Saving the settings for launching a mobile application

You can save this setting for launching the desired application in your ATS settings as follows:

Click on the "Settings" button on the top right.

Click on the "Edit configuration" button (this opens the.atsProperties file in your default text editor)

Fill in the configuration file by naming the application and filling in the URL previously defined

<mobiles>
<mobile>
<name>Betclic</name>
<url>mobile://192.168.0.39:8080/sport.android.betclic.fr</url>
<waitAction>100</waitAction>
</mobile>
</mobiles>

Still require support?
Contact support

Configuring ATS

When using Agilitest for the first time or during its use, you can configure the software to optimize its use. Agilitest works mainly with the ATS and Java (JDK) packages that will be used to create, maintain and execute automated projects.

At the top right of the editor there are various support menus including the "Settings" menu.

settings button

Click on the “Settings” button to open the window in the editor

settings page

Agilitest settings

Error reporting

You can enable error reports (or logs) by checking the "Error reporting" box.

error reporting

Three log options are available:

  • The Startup logs, in case Agilitest crashes at launch

Then the test execution logs which will display technical errors (related to a driver, not functional errors):

  • To open the current logs, empty by default, which display the last created logs
  • To open the logs directory in your Windows explorer and have access to the logs history

Languages

In this configuration menu, you can also change the language to English or French.

agilitest languages

Mandatory tools

There are two prerequisites for the proper functioning of Agilitest: the ATS package and the JDK.

ATS settings

Agilitest requires an up-to-date ATS library to operate.

ats settings

From these configurations you can :

  • Create a configuration: This will create a global configuration of ATS in the system. By clicking on it you can modify the configuration.
  • Download ATS components
  • Download ATS-OpenCv
  • Create a Neoload configuration
  • Open a Maven directory
  • Open an ATS directory

How to set up ATS?

It is also possible to configure some of the functions of the Agilitest editor via the .atsProperties configuration file.

To access the ATS properties, click on the "edit configuration" button of the ATS settings

edit configuration button

The currently allowed parameters are as follows:

  • Default number of executions of each action in the editor before deciding on a failure. By default they are set to 10.
atsproperties maxtry

  • Positioning of windows opened automatically by the editor. By default, the coordinates of the upper left corner are set to x=20 and y=20.
  • Sizing of the windows opened automatically by the editor: width and height set by default to 1500 x 960
atsproperties sizing

  • Management of the "timeOut” on the execution of the scripts and the loading of the web pages. By default, it is set to 60ms and 120ms
atsproperties timeout

  • Management of access paths to different browsers and specific waiting times for each of them:
atsproperties path

  • Management of access paths to the various Windows desktop applications installed on the computer. A shortcut will be automatically created from the "Applications" menu in the startup action of a channel.
atsproperties path windows app

You will find the application registered in the properties directly in the applications when you open a channel

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/6091037db25653a59aa30cfc_image-51.png

🔸 Warning

The access paths will have to be adapted according to your configuration.

Java (JDK) settings

Java allows to load, compile and execute ATS projects.

From the configuration menu it is possible to download the JDK or to enter the path to a JDK already existing in your computer.

Java JDK settings

🔸 Warning

You need at least a version 11 of the JDK for Agilitest to work.

It is also possible from this interface to add Java execution arguments for the launch of tests by clicking on the "Add argument" button.

add arguments button

External connections

ATS Mobile Station servers

It is possible to set up an ATS Mobile Station server to automatically connect the set up server during your mobile tests.

By clicking "Add" button, you will be asked to enter the IP address and port, which will be retrieved directly from Mobile Station interface.

You can check our documentation on mobiles tests.

GIT accounts

The Git account in Agilitest allows you to clone an existing Git account and thus use a Git project.

Click on the “Add” button to add an account

add git accounts

Then, enter your Git account information.

git account info

Still require support?
Contact support

Script comments and log

▶️ You can watch our tutorial on how to use script comments and logs on our Youtube channel.

Agilitest lets you use advanced comment formatting directly from the editor. HTML format is used to design your comments as you wish.

You can use script variables to make comments with actual script data.

There are four types of comment:

  • Script comment
  • Functional step
  • Execution log
  • Report summary

Script comment

The script comment is the one that will be applied by default when you click on the "Comment" action.

comment action

This commentary explains the operations performed by the script, for the benefit of those who will need to consult it in order to maintain it.

"Functional step" comment

functional step button

This type of comment will appear in the final execution report.

"Execution log" comment

execution log butto

This type of comment appears in the test execution logs.

“Report summary” comment

report summary button

This type of comment appears in the test execution summary in the execution report.

Insert a special value

It is also possible to insert a special value for all types of comments.

special value button

Example of formatting

Below are a few examples of the HTML string formats allowed in Agilitest:

  • Bold characters:

<b> Bold characters </b>

bold characters

  • Underlined characters:

<u> Underlined characters </u>

underlined characters

  • Italic characters:

<i> Italic characters </i>

italic characters

  • Using bullets:

<UL> <LI> Using bullets  N°1</LI><LI>Using bullets  N°2</LI></UL>

using bullets

  • Prioritized into numbered paragraphs:

<OL><LI>Number 1</LI><LI>Number 2</LI></OL>

numbered paragraphs

  • Insert an active clickable link:

<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431248">Bug 1431248</a>

clickable link

  • Insert and display a link to a screenshot:

<img src="https://bugzilla.mozilla.org/attachment.cgi?id=8943437" width="300" height="110"/>

screenshot

  • Colored text

<font color="red">text</font>

Still require support?
Contact support

Passing parameters to a subscript (JSON/CSV or manually)

One of the features of Agilitest is the ability to use subscripts. This will allow you to factorize the common functions of your tests. Agilitest also allows you to pass values as parameters to your subscripts and thus make your subscripts scalable and generic.

A subscript created from a script will always perform the actions it is composed of with the same parameters.

It is also possible to modify the values of the subscript to use it in several possible configurations.

There are different ways to pass parameters to a subscript:

  1. Manually, by entering the parameters in the script
  2. or with a dataset, using a CSV/JSON file

▶️ You can find a 3 part tutorial about passing parameters to a subscript on our Youtube channel : Part 1, Part 2, Part 3

Add parameters to a susbcript

If you don't have a subscript call action in your script, you can create one in two ways:

  1. Either by entering the name of the subscript in the action

To do that, click on the “subscript” action in the action menu

susbscript action in action menu

Click on the action “Call the script [ ]” to enter information

call script action

Then, enter the name of the script you want to call as a subscript.

entering script name

      2. Either by dragging a script into your test

From the project explorer, click on a script you want to use as a subscript and drag it into your script.

dragging script

This will create a “Call the script” action with the dragged script.

Call he script action

1. Parameters entered manually

It is possible to pass parameters manually.

Once you have created the sub-script call action in your script, you can pass parameters manually to your sub-script, directly from your script.

To do this, click on the call sub-script action, "Call the script [scirpt_name]

call script action

Then click on “add parameter

add parameter button

For information, the first parameter will always be named "Parameter 0", then the second parameter will correspond to "Parameter 1", the third parameter to "Parameter 2", etc…

parameter entered manually in call script action

Once you have entered the parameters in the script, you need to add them in the subscript.

To do this, open your subscript from the project explorer.

subscript in the explorer

From your subscript, click on the action that will execute the settings and then open the special values view.

special value menu

Select "Script parameter" from the special values and choose the parameter you are interested in.

Select the script parameter

When the action of calling a subscript is executed, it will execute the specified parameters.

📙 To know more
With the call script action, a script will call a subscript. When the script has parameters defined, the subscript will retrieve them and pass them to $param(x) (see the scheme above "Passing parameters to a subscript from a script”)

During the execution, the parameters will be shown in a pop-up at the bottom to the right on the editor.

parameters shown during execution

For your information, to make the pop-up indicating the settings reappear, you can click on the "\x" button.

\x button

When the parameters are entered manually, the execution of your parameters will be done only once. To multiply the iterations, you will have to create as many subscript call actions as the number of iterations you want. In other words, you will have to repeat the previous steps for each new iteration.

💡 Tip

Add comments to your parameters to track data and to tag the parameters. Those comments will be visible in the execution report.

2. Parameters entered from a JSON/CSV file

Create a JSON/CSV file

It is also possible to pass parameters from a JSON/CSV file. A JSON/CSV file corresponds to a dataset. The dataset will allow to create iterations. The behavior of the subscript on a dataset will be to loop the number of iterations contained in the dataset.

Unlike a manual input, where you would have had to create the subscript call action several times and enter parameters each time, for the dataset, the parameters will be organized in a table that will be used by a single subscript call action.

There are two ways to create a JSON/CSV file:

  1. Click on “New component” situated at the top ion the left of the Agilitest editor
new component button

Then select “Create a CSV file” or “Create a JSON file

          2. In the project explorer, open the “data files” view

data files view

Finally, click on a button tocreate a JSON or CSV file

create JSON or CSV buttons

Once the CSV/JSON file is created, it can be used from the call script action.

To associate your JSON/CSV file to your script, click on the call script action “Call the script [name_of_script]

call the script action

Select “CSV/JSON” file

CSV/JSON button

There are two ways to add your CSV/JSON file in the action:

  1. Directly from the project explorer

Drag your CSV/JSON file from the project explorer to the call the script action.

        2. By selecting the file from Windows explorer

Click on the file icon to search your file from Windows explorer

open file button

Once the CSV/JSON file is added to the subscript call action, it will automatically open during the execution of your test.

CSV/JSON files are in the form of a table.

table from a csv file

They are both used in the same way with the only difference that it is possible to rename the column hearders in a JSON file.

table with titled headers in json file

In the table, you can add columns that correspond to the parameters, as well as rows that correspond to the iterations by clicking on the assigned buttons.

buttons to add iterations and rows or remove

With a CSV/JSON file, the subscript is executed as many times as there are iterations.

Once your file is completed, you can recover the variable of your subscript by using the $param(…) function and by passing the value of the parameter column you are interested in.

Example :

Enter $param(0) in the action to return the value of the first column in your CSV/JSON file.

param(0) in an action

📙 To know more
The parameters of the subscript are defined from a CSV (comma-separated values) file consisting of an array with rows and columns. Depending on the number of rows, this determines the number of times the file will be called, this is called iterations. (See the scheme above "Passing parameters to a subscript with a csv file")
The same goes for the parameters of the subscript defined from a JSON (JavaScript Object Notation) file composed of an array with rows and columns. Depending on the number of rows, this determines the number of times the file will be called, this is called iterations. (see the scheme above "Passing parameters to a subscript with a json file")
For a complex JSON file, it is composed of an array with rows and columns like a classical JSON file. Only, the iterations are done according to the number of values in a line. The number of values in a line corresponds to the number of parameters (See the scheme above "Passing parameters to a subscript with a complex json file").
Parameters can be created from an http file or a database from a web page. The principle is the same as for a JSON/CSV file, the iterations correspond to the number of lines and the parameters to the number of columns (see the scheme above "Passing parameters to a subscript with a http file").

CSV/JSON file execution options

Once the dataset is created, you can add options on the execution of your CSV/JSON files. By default, the iterations are done according to the order presented in the table, but it is possible to ask Agilitest to make the execution of your iterations random.

To do that, click on your element and check the box “Use random row

use random row button

You can also give a "Range of indexes", which allows you to limit the number of iterations among the total iterations that make up the JSON or CSV file.

range of indexes button

If you want, with this option you can also execute only one precise row by indicating its number.

Example: If your JSON file consists of 150 iterations, you can specify 0-50 in the index range to limit the execution to the first 50 iterations.

Finally you have the option "Execute as suite" so that the execution continues until the end even if an iteration is in error.

execute as suite button

When you encounter an error in one of the iterations, this will cause your test to be in error, and thus stop the test considering it as KO. This option allows you to consider each iteration as an independent test.

Example: On an execution of 50 iterations, if the 48th iteration encounters an error, it will be indicated as being in error but will not prevent going to the 49th and so on.

🔸 Warning

Actions created after the call script action is executed as a suite are not saved and will not appear in reports.

3. Parameters from an interface element

It is possible to make only one element of your parameters appear. In a complete subscript, if one of the actions does not have an element then the param(0) will be used by default. To fill in the param(0) that will be used, you can add a "Element’s text" to the action that calls the subscript.

From the call script action, click on "Element’s text".

element's text button

Then add an element selected with the capture tool.

add recognition criteria interface

When you execute your subscript, it will display the element you have captured.

This is especially useful when you are looking for data in your table among a set of rows. Agilitest will allow you to iterate until you arrive at the line you were looking for and allows you to take a specific action on this line.

Example: You have a table that contains 5 different rows. By giving the component "table" as input to the subscript, Agilitest will loop through the rows of the table in the subscript.

📙 To know more
Parameters can also be taken from elements. For a list of elements (DIV), each element corresponds to an iteration and each separate value of a text property "\n" corresponds to a parameter. (See the scheme above "Passing parameters to a subscript with a list of elements (div)”)
For a complex list of elements (Rows), each row corresponds to an iteration and each separate value of a divided text "\t" corresponds to a parameter. (see the scheme above "Passing parameters to a subscript with a list of complex elements (rows)”)
For a list of special elements, each of its elements has sub-elements which themselves have values. The number of iterations is determined by the number of sub-elements and the number of parameters is determined by the separate text property values that make up these sub-elements. (See the scheme above "Passing parameters to a subscript with a list of special elements”)

Parameter execution options

Iterations

Adding iterations will allow your script to be executed multiple times. This is handy when you have a function that can be used successively and will allow you to check your UI behaviors.

Example: The "go back" function to return to previous pages of a web page that can often be repeated several times.

To add iterations to a subscript composed of parameters, click on your subscript call and increase the number of iterations.

subscript iterations

Example: If you add 3 iterations, the subscript and its parameters will be executed 3 times.

Adding iterations allows you to avoid flaky tests, i.e. actions that are executed several times and that will sometimes produce an error for no particular reason.

Iterations, conditions and variables are not always usable depending on the case :

  • Executing the subscript from the parameters added from your script will give you access to all available options: iterations, variables and conditions.
  • Executing the subscript from a JSON or CSV file will not allow you to use variables or iterations but will allow you to add conditions.
  • Executing the subscript with adding the text of an element will allow you to add iterations and conditions but will not give you access to variables.

Return value

It is possible to get data from a subscript. This will create a dynamic (non-modifiable) variable since the return variable will automatically value the variable of the main script.

There are two ways to obtain a returned value:

1. Create a variable

At the very bottom of the subscript is a small yellow arrow allowing you to add a return value.

add return value button

Once the return variable has been created, it must be retrieved from the script call action.

To do this, click on the "Variables" button to tag it in the main script with an equivalent variable opposite.

variables button

2. Property variable

Create a property action to get data from the interface.

To do that, click on “Property” in the action menu

property action

The property action will target an interface element.

For that, click on the “Load” button in the property action

load button

It will load all the properties that are associated with this element.

Click on the property you are interested in to have it loaded during the execution.

properties' list

These properties correspond to the attributes of the element that are found in the "Captured Element's Parents" window when the element is captured.

ATS properties also appear in the list of properties as well as formatting elements (CSS).

When a property is selected, it will be placed in a variable that will take the value of the selected property.

property var

Example: If you select the property "text" with the value "Hello world - Wikipedia" in the list of captured properties.

text property from the captured properties

Once the value is created from the property, you can return it.

Click on the "Add a return value" button

add return value button

Then, open the special values menu and select in the script variables the one that corresponds to the property variable

property var from script variable

Click on the sub-script call action, then on "Variables" to specify that a value is returned from the subscript.

variables button

Select the variable that will store this return value from one already created or you can also create a new one.

newvar returned value

This means that the return value of the sub-script will be retrieved from the variables of the main script.

This allows to pass data between a script and its sub-scripts.

📙 To know more
The main script calls a subscript that contains values. It is possible to pass parameters to this subscript and it is also possible to return the values from the sub-script to the main script. With the return value action, you can call a number of values that will be returned based on the values in the subscript. Sometimes the information sent (parameters or return values) is not expected and therefore not processed.


Still require support?
Contact support

Channel management

▶️ You can find a tutorial on how to manage channels on our Youtube channel.

Tests performed with Agilitest are created from scripts that open channels to communicate with the application under test. Agilitest allows you to open multiple channels on multiple devices.

In an Agilitest-generated ATS script, there is always one active channel at any given time, and all actions are directed to that channel.

In Agilitest there is a distinction between actions to manage channels in ATS scripts and the channel management menu in the editor to perform graphical element capture operations.

Start a channel

All tests must start with a channel start action.

To do this, click on the channel action in the action menu

channels action

Then, click on "Start channel".

start channel action

Next, it is best to rename the channel you have opened so that it can be referenced in the following actions.

To do this, click directly on the “Start channel” action

start channel action in editor

Then enter the name you want to give to your channel.

channel name

The "Start channel" action allows you to select the application that Agilitest will launch for you, you have several possibilities:

application panel
  • Open a browser among those proposed (MsEdge, Chrome, Firefox, Brave, Opera, Internet Explorer)
  • Open a Windows Explorer
  • Open a desktop application defined in your configuration
  • Open a mobile application (Android or iOS)
  • Open any .exe application.
  • Open a Webservice

It is possible to open multiple channels in a same script.

Switch channel

switch channel

The "Switch channel" action allows you to switch from one channel to another opened channel identified by its name.

switch channel action in editior

From this action, all the following actions will be directed to the specified channel in the "Switch channel" action.

🔸 Warning

Starting a new channel means that it will activates it directly.

You can also use the channel management menu to change the active channe.

To do this, click on the blue check mark next to the channel name to make the channel active

channels management

However, switching channel in the channel management menu will not figure as an action in your script.

Close channel

close channel action

Closing a channel tells Agilitest that this channel will no longer be used during this test, and will close the application.

You can also close the current channel from the run management panel in the Agilitest editor.

To do that, click on the “Close” button

close channel action in channels management

Or the “Stop” sign on the channel line

stop channel button

🔸 Warning

You should not close your channel manually directly from the application. Agilitest is not intrusive (no plugin), it has no way of knowing that you have closed an application directly by the actions of the operating system (Example: by clicking on the cross of the application window).

Connec a channel to an application already launched

It is also possible to channel to a process already existing in your operating system.

To do this, you can use the command process:// supplemented with a regular expression to find your process in the list of already started processes.

Example :

process://.notepad\+\+\.exe

process

Channels management menu

The channel management menu allows you to manage the different input channels of the actions when debugging tests.

The channel management menu is located on the left, under the project explorer.

channels management menu

It has several icons with the following functions:

Capture button

capture button

This action is only available if you have already opened a channel. It allows you to enter the capture mode and select the elements on which to perform actions.

Close button

close button in channels management menu

This action allows you to cleanly close an open channel, i.e. close the application and tell Agilitest that it is closed.

Play button

play button

This action starts a complete execution from the current action. If you are not sure about an action to start a test, you will get the following message:

agilitest error

In Agilitest, all scripts can be sub-scripts of other scripts. In the editor, it is impossible for Agilitest to determine the start of a test, so you must indicate which action you want to start your test with in the editing and debugging phases.

Next button

next button

This action executes the selected action and moves to the next action. You can therefore execute your test in sequence, step by step. This action is equivalent to the execution action of each action displayed to the right of the current action in the editor.

Parameters button

parameters button

This action displays a sub-menu for selecting the current execution parameters in the editor.

executions management parameters
  • Animate: This allows you to replay the test by animating the actions performed.

Example: mouse movement, clicks, text entry, etc...

  • Visual report: The visual report has the same result as the animation, but in the form of a video report: an ATSV file (ATS Video) is generated in the /target/reports directory. It is not necessary to put the replay in animation mode to get the visual report.
  • XML Report: Agilitest will produce a test execution report in XML format (actions.xml), as well as a set of images corresponding to the screens that were visited by the test. These elements are stored in the directory /target/report/>test_name>. They can then be manipulated to produce three levels of execution reports as well as a pdf report using JASPER. The production of an XML report activates the generation of a visual report.
  • Run in reduced mode: This allows you to hide the Agilitest editor during the test execution, and thus better see the application under test.
agilitest execution in reduced mode

💡 Tip

The reduced mode is very useful if you use Agilitest on a single screen.

Potential problems

Channel opening failures

What to do if the Agilitest editor won't open a test and capture a channel?

If this is a JDK problem, then :

  • Verify that Java has been installed and that its version is compatible with Agilitest (version 14+)

It can be installed directly from the Agilitest "Configurations" menu in the top right-hand corner of the editor.

settings button

Click on the "Download" button to download the latest version of Java directly from Agilitest

download button

If the problem is with the drivers and/or libraries:

This means that a file is blocked by the firewall or antivirus software. In this case there are two possible solutions:

  1. Regenerate drivers and libs files
  • Repeat the operation, making sure that the blocking does not recur (temporary neutralisation of the antivirus).
  • Close Agilitest
  • Go to your computer's user folder to manually delete the "drivers" and "libs" folders.
drivers and libs folders
  • Open Agilitest again to force a regeneration of the files with the latest versions available in SAAS
Components update

        

         2. Download packages manually to deploy them yourself

  • Via the "Settings" menu, download the zipped Drivers and Libraries package
Download ats components button
  • The "ats.zip" archive will be automatically downloaded via your default browser.
  • Unzip this "ats.zip" archive containing the "drivers" and "libs" folders into your own user folder.
  • C:\User\”Your_Account”\.actiontestscript

If the problem persists, you can contact our support team at support@agilitest.com or directly via Slack.

Open a channel with plugins

When you start a browser channel with Agilitest, the channel will be without plugins, without history, accounts, etc…

This simulates the use of a real user visiting your application for the first time. This is why a channel started by Agilitest does not load extensions by default.

There are several ways of achieving the behaviour you want, the simplest being to create a user profile and define this user profile when the channel is started.

Or, there is also the option of adding elements to your ats.properties file.

See the official documentation: www.actiontestscript.com


Still require support?
Contact support

Window management

▶️ You can find a tutorial on how to manage windows on our Youtube channel.

‍The window management action allows you to manage the Windows operating system, Windows desktop modal applications and browser tabs.

It does not allow to manage internal windows of some Web applications, which are floating HTML elements, directly accessible with the Web automations.

A specific menu is also available to manage dialog boxes without adding unnecessary complexity.

In other words, the window action does not only concern various windows but also tabs on the same page and pop-ups.

When an application opens a window, Agilitest cannot determine whether the capture should take place on that window or whether it should remain on the current window. This depends on how the application designers intended to do it, whether the window is modal, non-modal, etc.

To access the window action options, click on the "Window" button in the action menu

window action

The window action has a sub-menu with three possible actions:

window actions menu
  • Size and location: This moves the window by specifying its new Cartesian coordinates or change its size (height and width)
  • Window visual state: This allows you to send an event from the operating system about the current window
  • Switch window: This changes the current window by indicating the number of the window to be changed

Size and location

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/60910360b49e959fc8bc06f2_image-211.png

This action allows you to move the window by specifying its new Cartesian coordinates, or to change its size: height and width.

Simply activate the parameters you wish to change by clicking on the yellow stars, then enter the desired values.

This action will affect the current window.

Window visual state

This action will allow you to send an operating system event to the current window.

It works in the same way as if you had clicked on one of the icons of your application (top right for Windows).

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/60910360e8e6f57b55aa7ddd_image-19.png

The possible actions are as follows:

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/60910360d3595f5b5552df4a_image-212.png
  • Close: To close the current window
  • Maximize: To enlarge the current window to the maximum
  • Reduce: To reduce the window

Switch window

When there is only one window in the application, all actions that are performed are sent to this window. When an application has several windows, a current window must be defined.

This is very similar to the current channel: all actions that are performed are on the current window.

The windows involved are true OS windows: you can have a very complex web application that handles multiple windows in a browser without having to switch windows.

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/609103601d2478e49db557ee_image-210.png

This function allows you to change the current window by indicating the number of the window concerned. In general, the number 0 corresponds to the main window of the application, and the following numbers are in the order of appearance of the windows (or tabs in a browser).

Problematic interventions

All these actions will allow you to precisely influence the configuration of your application's windows.

In some cases, this can cause problems:

Forced positioning

If you always place your application windows in the same position, you may not see any bugs, in which case we recommend letting the applications use the screen space as they wish, and possibly testing on different screen sizes.

Obviously, in some cases, it is useful to force a specific configuration, if you use graphical recognition for example, because contrary to an approach related to the application structure (DOM, Desktop), graphical recognition will act on the elements actually visible on the screen.

Direct intervention on the application

Closing the current window gets rid of a cluttered pop-up window.

But we do not recommend closing the main application window (unless you want to control an alert window).

To do this properly in Agilitest, use the action to close the channel.


Still require support?
Contact support

Text input

▶️ You can also watch our tutorial on how to use text input on our Youtube channel.

Create a text input

The "Enter text" action can be accessed directly from the actions menu,

enter text action

or by dropping a locator in the editor

enter text with a created action

The enter text action looks like this:

enter text action in the editor

To enter the required text, click on the "Enter text [ ]" action.

text input

A set of additional keys are available to simulate the keys on a keyboard.

additional keys

You can also enter special values when entering text.

special values menu

Of course, in order for your text to appear in the application being tested, the interface element on which you are performing this action must accept text input from the keyboard.

However, Agilitest will not prevent you from doing this on a wrong element, as the final operation will always depend on the reaction of your application.

enter text action succeeded


Still require support?
Contact support

Mouse actions

▶️ You can also watch our tutorial on Mouse actions on our Youtube channel.

‍During your tests, the mouse actions proposed by the Agilitest editor are used to simulate the mouse actions made when using the application under test.

Mouse actions can be used for all applications, including mobile applications (the click corresponds to a tap on the screen).

Create a mouse action

There are two ways to create a mouse action:

  1. From the actions menu

In the Agilitest editor, click on the mouse action

mouse action in action menu

Then, select the mouse action type you want to execute

types of mouse actions

         2. By creating an action with a locator

Once you have captured an element with the capture tool, drop it into the editor to create an action.

create action with the locator

Hover over the mouse action to open a sub-menu and click on the type of mouse action you want to execute.

Types of mouse actions

🔸 Warning

When you drag and drop an element to create an action, do not click on “Mouse” action. You only need to hover to open the sub menu (cf. image above)

Types of mouse actions

Mouse click

click action

The mouse click action is used to do a click on the tested application or to simulate finger pressure on a mobile test.

You can edit and specify the type of mouse click you want to do by clicking on the Mouse action in the editor.

mouse click options

You will have access to a sub-menu that allows you to select the type of click you want to generate: left click, wheel click, right click or double click.

By default, the click is at the center of the element. However, you may want to click on an offset zone or on another element whose Cartesian coordinates you know based from the captured element.

To do that, you can select a corner or side of the element from which you are going to specify a Cartesian offset.

coordinates of the mouse click action

Positives coordinates will always define a point inside the element.

Example :

If you select the top right corner with a 10x and 10y offest, then click will be pointed 10 pixels at the top right inside your element’s box

You can also add the press of the “CTRL” or “Shift” key to your click action.

key press with mouse action

Over

The hover action lets you indicate that you want to hover over a specific area of the screen. This is particularly useful for unfolding the drop-down menus in your applications.

Over action

As with other mouse actions, you can also redefine the mouse position using Cartesian coordinates.

cartesian coordinates of mouse actions

Drag, drop, swipe

Drag and drop actions simulate a mouse movement during which the left mouse button is held down.

This action is very often used to perform drag-and-drop operations between several windows in one or more applications.

drag, drop, swipe actions

The actions must be carried out in this order:

  • Start with a drag action by defining the element from which you want the left click to start and then hold.
  • (Optional) Insert zero or more swipe actions: these correspond to swipe zones that are visited by the mouse with the mouse button held down.
  • Then add a drop action by defining the element on which the mouse button is released.

The swipe action can also be carried out independently from the drag and drop.

Once you have entered the element on which your swipe action will be performed, you can specify the action.

To do that, click on the swipe action

swipe action in the editor

A swipe 20 pixel to the right is set by default.

This will open the actions parameters menu

swipe parameters

You can change the orientation of the swipe by clicking on the directional arrows as well as define the number of pixels vertically or horizontally.

As with other mouse actions, you can also redefine the mouse position using Cartesian coordinates.

Scroll

The scroll action simulates a rotation of the mouse wheel, causing the displayed page to scroll.

In the case of a mobile application, scrolling means swiping the screen.

In both cases, Agilitest is used to indicate the number of pixels for scrolling up or down. This number is positive if you want to scroll down.

To be effective, the selected interface element must respond to a scrolling action. You can perform this action on the main application window by not selecting an interface element.

The action can be used on sub-windows (DIV) which have scrolling options, by selecting the element including the desired window.

When the scrolling action is created, it will be performed as automatic scrolling by default.

However, it is possible to set the scrolling you wish to execute.

To do that, click on the scroll action

auto scroll action

In the action parameters, you can define the pixel value to be scrolled.

scroll parameters

This can be done by manually entering the value, or by placing your mouse over the square provided and scrolling your mouse wheel up or down.


Still require support?
Contact support

Automation of Neoload scenarios

Agilitest automates scenario generation in Neoload

This allows you to benefit from Agilitest's ability to record and replay a scenario.

Activating Neoload mode

Neoload is not activated by default in Agilitest. To do this you will have to modify your file .atsProperties and add the following lines:

<neoload>
<recorder>
<host>192.168.0.28</host>
<port>8090</port>
</recorder>
<design>
<api>Design/v1/Service.svc</api>
<port>7400</port>
</design>
</neoload>

The parameters are as follows:

  • recorder / host: corresponds to the IP address of the machine running Neoload and which records the scenarios.
  • recorder / port: the Neoload listening port on this machine. The default is 8090.
  • design / api: Listening service of the Design api allowing you to listen to and modify the current Neoload project.
  • design / port: Port du Servie. The default value is 7400.

Once this configuration is done, if you restart Agilitest, you will see a Neoload action appear on the right of the actions menu:

 

The Neoload menu is scrollable and displays the following submenus:

Start

This action allows you to tell Neoload to start a user scenario.

The UserPath value is not mandatory but will allow you to register a user in your scenario.

Stop

This tells Neoload to stop the current user journey.

There are two options available:

  • Find framework parameters: This option allows you to define replacement parameters in Neoload in the framework in order to be able to use them during variabilisation.
  • Search for generic parameters: This option allows you to define generic parameters in Neoload in order to be able to use them during variabilisation.

Container

This action creates a container in Neoload and names it.

Recording

This action activates and deactivates the recording in Neoload.

You can pause and resume the recording during the script.

Still require support?
Contact support

Desktop and Windows applications automation

=With Agilitest, it is possible to automate software solutions developed and compiled under Windows. It is also possible to do test directly on your system through a desktop channel, supported by a specific desktop driver

Running tests that are not on the Web

Open a native Windows application

To open a native Windows application, start a channel, then click on the icon to select a .EXE file.

Agilitest then opens a file explorer allowing you to select your executable file.

Then, everything works like on web technologies: switch to capture mode to select the components:

capture window

Press the CTRL key on your keyboard to select a component and open the “captured element’s parents” window

captured element's parents

In this case, the components that are displayed are not DOM elements as on web browsers, but correspond to the Widgets used to build the graphical interface of the desktop application.

The identification of a locator to uniquely find the component in the page works in the same way. In the case of a desktop application, there may be an "AutomationId" generated by the component framework used to develop the application.

Create an action by dropping the component at the desired location in the editor. The action entered by the desktop is then inserted into the editor.

Desktop application

There is also the Desktop button located directly in the applications when opening a channel.

desktop button

This one will not open a window if you run it, but it will allow you to capture the elements of your desktop and to execute actions on them.

The tests performed on the Desktop are done in the same way as the Web tests.

🔸 Warning

When opening a Desktop channel, you will still need to go through the "Browser URL" action by entering the path of the tested application in Windows Explorer to access your files.

Capture a system element on a web application

The Desktop Driver is always active in Agilitest, even when you are automating web solutions.

This allows you to select specific components of the .EXE application for your browser.

To select a Desktop Locator on a web application, simply press the ALT button in capture mode: Agilitest will switch from the DOM view to the Desktop component display. Press ALT again to return to the DOM selection.

You can also click the "Sys. (Alt)" button at the top of the capture window.

capture window

If you want to test your application on several web technologies and several browsers, we don't recommend using this mode, as you may activate non-DOM components, specific to your browser, and thus cause malfunctioning on other browsers.

This feature is very useful if your web application allows you to upload a local file to a web server: no special effort is needed to automate this action.

Applications management

Configuration of a commonly used application

You can configure a commonly used application by editing the .atsProperties configuration file.

The icon of this application will then be automatically displayed in the action of opening a channel, allowing you to open it directly.

To do that, click on the “Settings” button in the editor

Settings button

Then, click on “Edit configuration” in the ATS settings

edit configuration button

This will open the atsProperties in your notes.

ats properties

Different configurations exist in the properties, including one concerning the applications. To add a frequently used application:

  • Enter the entry tag <application>.
  • Add <nom> and enter the name of your application
  • Add <path> and copy and paste the path to find the application in your window explorer
  • Finally, enter the closing tag </application>

🔸 Warning

Don't forget the entry and exit tags for any new applications that you would like to add to your favorites.

Execute an already open application

With Agilitest it is also possible to open an application that is already running.

To do this, open a new channel, and enter in the command line :process:// followed by the name of the application you want to run.

The application must be written in the language used in the file explorer.

command process

When you perform your action, the open application can now be captured by Agilitest.



Still require support?
Contact support

Using a non-unique locator

Some test configurations require that you can retrieve multiple elements of the same type with a single locator. There are several reasons for this:

Count the elements

It is useful to be able to count all elements of a given type to make sure without going into the details that a page, a table, a list, a search has the right number of elements.

We will take the example of a table that displays the main browsers and their porting on different operating system:

Our sample table: browsers / OS

We will make a first check that verifies that the number of lines is equal to 8.

We are looking at the lines (TR)

We will start by selecting a line, with an attribute that allows us to identify it, and we make sure to also identify one of his parents common to all the elements wi want to count in a unique way (starting with this one).

Select a unique line

Then we drag-drop the element following our script to make an occurrence check equal to 8.

The first check fails

Obviously, the first attempt to launch the test on the fly will fail, since this element is uniquely recognized with its xid = tr5, and thus Agilitest only finds one line occurrence.

We then remove the attribute TR xid = tr5 from the locator

Suppress the unique id specific to a single line

We obtain a non-exclusive locator which allows to find all the occurrences of TR under the element TABLE table-main

Check the number of lines in a TABLE element

When performing the action on the fly, we confirm that Agilitest finds 8 rows in this table.

If you click on the magnifying glass:

The magnifying menu

Agilitest displays all the elements that correspond to the locator used, as well as their order number of appearance in the structure of the tested software.

Search an item by its index

When we have locators that make it possible to find several elements, it is possible to specify by an index which we wish to address.

You wish to put an index on TR : click on TR


You must click in the editor on the item that is multiple

Then to the right of the element, you will see a # and two up / down controls that identify by an index the element defined by your locator.

Define an element by its index

By validating, Agilitest allows you to retrieve specific attributes of an element identified by its index. For example, we retrieve the text in the third line of the table below.


Retrieving the text contained in the 2nd row of the table

To go further

You can use the indexes on several elements of the same locator.

This can allow you for example to go check the contents of a specific cell of a table.

Get the text of a specific cell

This feature of identifying an element by its index can also allow you in some cases to get out of complex situations, if you lack attributes to uniquely select an item in a page.

You can also bring more robustness to your tests, for example if you often change your test data, to not select an item by its content but by its index may be more effective in the long run, but your test will be less deterministic.

Still require support?
Contact support

Version management

Regular updates

Agilitest is a software solution that updates automatically as soon as it is launched. New versions are updated regularly, every one to three weeks.

Agilitest supports the latest browser versions, which is absolutely essential for checking changes and updating dirvers.

ATS and Agilitest editor

At launch, Agilitest begins by updating the ATS open-source library.

ATS is the open-source library that manages all the interfaces with the technologies supported by Agilitest and replays tests written in ATS format.

This update will enable Agilitest to use the latest version of ATS.

The Agilitest editor then updates itself: a welcome screen informs you that a new version is available, and suggests that you update it.

The content of the new version will also be presented in the ChangeLog, which includes the following elements:

changelog

Added: These are new functions that are not linked to existing functions.

Changed: New functions linked to existing functions and function extensions

Fixed: Functional bug fixes, feature corrections, technical improvements, etc.

Refuse the update

Naturally, you can refuse the update, but you should be aware that the impact is fairly limited, since it only concerns the editor and its functions: the ATS update is automatic.

If you decline the proposed update, a button will appear at the top right of the editor allowing you to update to the most recent version of Agilitest.

update button

Use a specific ATS version

It is perfectly possible to stabilise the use of a specific version of ATS by referencing the ATS library you want.

🔸 Warning

We don't recommend this because the changes in the editor and ATS are closely linked, but we do consider that this feature may be of interest to certain profiles. In general, you may not have access to certain recent features developed in the editor.

To specify the desired version of ATS, click on edit “Project properties

project properties

Then enter the version you wish to apply to your project.

project's ats version

If you want to let Agilitest manage the dependencies and automatically download the libraries required for the selected version, you can tick "Use Maven with Agilitest".

use maven button

Otherwise, you'll have to manually move the version to your .actionTestScript directory.

Finally, if the ATS version of the installed components is not the same as that of your project, Agilitest will indicate this by means of information panels in the properties tab and in the project banner of the project explorer.

information

💡 Tip

We recommend that you systematically update your version of the Agilitest editor and the ATS library it uses.

Configuration reset

Here how to reset your configuration:

  1. Uncross "Use Maven" in the project properties.
use maven button

        2. Delete the two directories libs and drivers (in your user directory under the .actionTestScript directory).

        3. Close and restart Agilitest.

        4. Check that the libraries are updated at start-up and downloaded in the "Settings" tab.

settings window

As well as in the “Tools

tools window

If not, click on the "Download" button

download button

How to use a specific Web driver version?

Agilitest supports the latest browser versions, which is absolutely essential for checking changes and updating dirvers.

However, you can change the version of your webdrivers.

To do that, you will need to modify the version of your drivers in the folder in which your Agilitest archive is located, in your Windows explorer.

Follow this path:

tools/ats-tools/<ats_version>/drivers

From there, you can change the version of the drivers with the version you want.

ATS vulnerability verification and management policy

Vulnerabilities in code can lead to a variety of problems, such as system integrity being compromised by an external source, integrated data or confidentiality being compromised, etc…

One of the latest known vulnerabilities is the "Apache Log4j" (December 2021), which affected Agilitest as well as several organisations, including the government.

Agilitest performs maintenance before each delivery to find these vulnerabilities, understand where they come from and fix them.

ATS versions are released approximately every one to three weeks through Maven, and some of these versions may contain vulnerabilities.

Analysis of these vulnerabilities involves two levels of research through the MVN repository and DockerScout.

MVN repository

From the MVN repository, you can view all the ATS dependencies.

mvn repository interface

In detail, for each version of ats, MVN repository can report the presence of vulnerabilities.

Example:

vulnerability in mvn repository

Version 2.9.3 have a vulnerability.

This was implemented just 10 days before moving on to 2.9.4, which corrected the vulnerability in the previous version.

To consult the versions of ATS and the vulnerabilities that may be present: https://mvnrepository.com/artifact/com.actiontestscript/ats-automated-testing

Dockerscout

Docker is an image generation integration. A Docker image contains all the ATS components (ATS library, system drivers, web browsers, etc.) unlike Maven, which only contains the ATS library.

Agilitest uses the Dockerscout tool provided by Docker to analyse potential vulnerabilities.

There are four levels of vulnerabilites with a colour code from red to dark orange, light orange and yellow:

dockerscout interface
  • Critic
  • High
  • Medium
  • Low

Agilitest is committed to not delivering versions with critical vulnerabilities and to avoiding high-level vulnerabilities as much as possible. Nevertheless, the latter may be delivered for some time with a view to being removed in the next few days.

Medium and low vulnerabilities remain under vigilance.

To view Docker images that may contain vulnerabilities: https://hub.docker.com/repositories/actiontestscript

Still require support?
Contact support

Tests executions

Designing tests and maintaining test scripts are two essential aspects of the software testing process. The Agilitest editor enables you to build your tests and modify them directly in the interface during execution in "step by step" mode.

A range of functions are available at action level to configure and modify the execution of your tests.

“Step by step” execution mode

The step-by-step mode is a special mode dedicated to editing and modifying tests.

Agilitest lets you replay actions independently of each other, so you can run them step by step.

To do this, click on the play button that appears on the line of each action you hover.

play button

Agilitest will then immediately perform this action on the software being tested and send you the result.

action executed

This operating mode allows you to run your test step by step, selecting actions one after the other and checking that each action has been carried out.

Execution options

Marking a stopping point during execution

It is possible to add a breakpoint to an action during test execution, for debugging purposes.

To do this, click on the tick below the action index to display the "Stop" icon.

stop icon

When you run your test, it will stop at the stop point you specified.

Manage the number of tries for an action

It is possible to increase or decrease the maximum number of attempts. This tells Agilitest that it must try several times to wait for the feedback of the application before generating a failure.

This contributes greatly to the robustness of the tests when you know that your server may be in a situation where it does not deliver the desired page immediately.

The maximum number of attempts is limited to 50, but the waiting time between each attempt follows an exponential curve: this makes it possible to quickly check the conditions for success when they are met, but also to wait "a certain amount of time" for a long processing to be carried out.

action tries

These tests can also be separated by a time interval. The higher the value, the longer Agilitest will wait between tests.

wait time

Managing waiting times with Java

Another solution is to use a Java code piece, here's how:

In the Agilitest explorer, select the view to “Java ATS scripts

JAVA ATS script view

Click on the button to “Create a Java ATS script”.

create Java script button

You can also create a Java script by clicking on “New component”, at the top left of the editor.

new component

Enter the name of the script you want to use as a standby function

The editor opens a java code editing window. Paste the following code into the testMain function () :

try {    final int ms = Integer.parseInt(prm(0, "1000"));    Thread.sleep(ms);} catch (Exception e) {}

Finally, drag and drop the Java script from the Agilitest explorer to the script where you want to call it in your test.

callscript java

💡 Tip

If you want to be able to specify the waiting time directly from your ATS script in Agilitest, you can declare a parameter passed by value to the script and then use the following code:

try {        final int ms = getParameter(0).toInt();        Thread.sleep(ms);} catch (Exception e) {}

To indicate that an action may fail

You can tell Agilitest that this action can fail without the test failing.

To do this, click on the square at the bottom right.

fail action indicated

This will display a double green arrow indicating that the action may fail.

action marked failed

This feature is necessary to compensate for certain sporadic application behaviour,

Example : A popup that doesn't appear all the time.

Execution in reduced mode

If you wish, you can run your test in reduced mode, which will temporarily close the Agilitest window for the duration of the test.

Click on the parameters in the channel management tab below the project explorer,

parameters button

Then tick the “Execute in reduced mode” box.

execute reduced mode

The Agilitest editor will be scaled down to give you a better view of what's going on in your application, which can be useful if you only have one screen.

execution in reduced mode

Execute in Java mode

ATS has been designed to generate Java code to execute compiled tests, which is particularly well suited to launching continuous integration tests, or running complete test campaigns in Agilitest.

Execution in Java mode is fast and efficient. Unlike execution in step-by-step mode, which allows you to build and modify your script, execution in Java mode allows you to execute end-to-end in a production environment.

There are three ways of running tests in Java mode:

  1. Directly from the script

Instead of running your script step by step from the Agilitest editor, you can choose to run the test in Java mode.

To do this, right-click on the script in your project explorer. and select “Java execution

java execution

This will compile your script and open a Java execution window

java window

             2. Create an execution suite

It is possible to create execution suites. These suites group together a set of scripts that will be compiled and executed with Java.

To do this, open your project menu then click on "Execution management" to open the Project builder.

executions management

From this page, you can create suites in the "Executions" area.

executions

Once you have created your suite, click on "Generate" → "Compile" → "Execute" to execute your script in Java mode.

compile builder

This will open the Java Terminal window

java terminal

               3. Java execution outside Agilitest

You can enter the command line in your terminal to execute the code without using Agilitest.

To retrieve the command line, copy the command line from the project’s builder,

command line

Then copy the command line into your terminal on your computer to execute it without using Agilitest.

Element not found

In test automation, it can happen that an element is no longer recognized during execution due to changes made to the software.

To remedy this, Agilitest lets you adjust tests directly in the editor.

Location and analysis

You can use the video of the failed test execution and/or a report with screenshots to understand and locate the recognition failure. There are two possibilities:

  • The item originally searched for no longer exists in the software under test.
  • The element initially searched for exists but is no longer recognized.

Correct the test

  1. If the required element no longer exists

The test can be modified by deleting this action in the editor.

To do this, right-click and select "Delete".

delete button

Check the previous and following actions that may be related to test execution, if necessary.

            2. If the element you are looking for exists, but is no longer recognized

The test must therefore be modified, in particular by updating the recognition criteria for this element in the Agilitest editor.

To do this, Agilitest indicates precisely which attribute is not found to locate this element.

element not found

Open the capture tool from the editor,

capture tool

Capture the element by pressing the CTRL key while hovering your mouse on the element,

selection of attributes

Adjust detection attributes.

It's possible to use a "regular expression" on each attribute for robustness.

Remember to validate detection uniqueness using the built-in statistical test.

statistics

Drag and drop these new attributes onto the action concerned by this "non-detection" to update it.

element dragged in the editor

Save your modifications.

Still require support?
Contact support

Javascript code calling

Practice case of a Javascript callscript

Agilitest allows you to call javascript code on a component that has been captured.

This differs from a java call which is more akin to a sub-script call.

In both cases, it is possible to modify the elements of the software you are testing, and thus detach yourself from the operation you're supposed to be controlling.

In some cases, this is very practical, if not necessary:

Example:

Let's take a look at the cursor.

The following image shows two cursors of different sizes, each with an initial value of 50.

example with 2 cursors

When manipulating a cursor, it's quite complex to define a precise value using only mouse movement actions.

For example, if we indicate a 100-pixel slide to the right on both cursors, we'll be able to move the cursor to the right.

drag and swipe actions

These will not display the same value, as they do not have the same configuration. (Value 67 for the large and 84 for the small).

2 cursors with a different value
  • What's the problem?

If you run a test based on a 100 pixel displacement, and then the cursor value becomes critical to the success of your test, you become dependent on the cursor implementation.

In this case, Javascript is particularly suitable, as it allows you to set a value directly on the cursor element by modifying the value of its internal variable.

Example :

If you define a 90 value on both cursors,

java action

Both cursors will display the same value despite their different size and movement.

2 cursors with the same value

Visuals control

You can modify the style and therefore the color of the elements you're testing.

To do this, simply modify the style object :

style.backgroundColor="green

java action

This will enable you to display visual checks in ATSV files or XML reports produced by Agilitest.

a cursor in green

A complex control integrated into the page

In some cases where you need to perform a complex check on your page, it is quite possible to code this check in javascript code loaded into the page, then call the javascript function in your test, retrieving the value returned to perform a simple check.

This is not an optimal situation, as you may have to manage development code including this function and production code with the hazards it may cause, but it can lead to complex situations to manage.

To do this, simply declare a global function in a SCRIPT tag on your page:

<SCRIPT>function checkpage() { ....operations... if (condition) { return true; } else { return false; }}</SCRIPT>

Then simply call it from your Agilitest editor, referencing a return variable, on which you will just have to perform a value check.

return variable

Still require support?
Contact support

Using Variables - AI

▶️ You can find a tutorial on how to use variables on our Youtube channel.

Variabilising a script makes maintenance easier, provides easier access to the data consumed and makes the test more dynamic. All these variable operations are managed in a separate tab dedicated to variable management, which is located at the bottom left of the main screen and is called the “Script’s variables” tab.

script's variables

There are two types of variables :

  • Purple variables 🟪 : They are declared by the user and can be modified (called independent variable, declared variable, assignment variable).
  • Orange variables 🟧 : They come from the interface to be tested and the elements of the application under test, and are not modifiable (also called dependent variable, dynamic variable, recovery variable).

The set of variables in a test is therefore an assembly of variable dependency trees. Agilitest and ATS will automatically update variables that are dependent on other variables when they are modified.

This mechanism offers a great deal of flexibility and ease of processing for people who are not used to IT development.

How to create a variable?

There are several ways to create variables in Agilitest:

Modifiable script variable (purple variable)

Modifiable script variables (purple) are also known as independent variables, declared variables and assignment variables.

These variables are created in the "Script’s variables" tab.

Click on the menu and select "Create variable".

create variable button

This will create a purple variable that you can modify. You can then give it a name and a value.

Once the variable has been created, all you have to do is value it (add a value), without having to press the “Enter” key on the keyboard or perform any other additional actions.

As soon as your variable has a value, it appears to the right of its name. This allows you to check the values of the variables in the current script at any time.

If the variable is not declared correctly and Agilitest cannot assign it a value, it displays an error message in addition to the variable name.

error message

To define the value of the variable, you can enter a hard-coded variable of your choice.

You can also use the "Insert a special value" menu to the right of the input field,

insert special value

This gives you access to all the categories of variables that can be used in Agilitest.

Non modifiable script variable (orange variable)

Non-modifiable script variables (orange) are also known as dependent variables, dynamic variables and recovery variables.

There are two ways to create a non modifiable variable:

  1. Property action

These variables are generated from elements of the tested applications, using the "Property" action in the actions menu at the top of the Agilitest editor.

This action takes as input an element of the user interface which is to be captured, as well as the name of the attribute of this element which is of interest to us.

To do that, click on “Property” in the actions menu

property action

The property action will target an interface element

Click on the “Load” button from the Property action

load button

It will load all the properties associated with this element.

Click on the property of interest to load it during the execution

captured properties

These properties correspond to the element attributes found in the "Captured element parents" window when the element is captured.

ATS properties also appear in the list of properties, as do formatting elements (CSS).

When a property is selected, it is placed in a variable which takes the value of the selected property.

property variable

Example :

If you select the "text" property with the value "Hello world - Wikipedia" in the list of captured properties.

text property

When the property action is executed, the value of the selected property will appear in the property variable.

text property action

             2. Return value

Non-modifiable variables can also be retrieved from a script return value to be stored as an independent variable

Variabilising special values

special value menu

These functions can be used to define all the modifiable variables you need, and can be concatenated to generate a more complex value.

Here are the main functions for accessing it:

  • Environment variable: Returns the value of an execution parameter defined in the current execution. Example: $env(parameter)
  • Script variable: Returns the value of a variable. Example: $var(variable)
  • Script parameter: In a subscript, returns the value of a variable passed as a parameter by giving its index. Example: $param(index_param)

You can pull down the menu to access the "calculated values".

calculated values
  • Now: Returns a character string indicating the current time of the computer replaying the test (or of the continuous integration server). Example: $now: 17:38:11
  • Today: Returns a character string indicating the current day of the computer replaying the test (or of the continuous integration server). Example: $today: 30/08/2023
  • Unique identifier: Returns an identifier in Universal Unique Identifier (UUID) format. Example: $uuid: 110e8400-e29b-11d4-a716-446655440000
  • Random characters: Returns a random character string indicating the desired number of characters and its case. Example :

$rndstring(10): Generates a character string of 10 random characters

$rndstring(15, low): Generates a string of 15 lower-case characters

$rndstring(8,upp): Generates a string of 8 uppercase characters

Environment variable

Environment variables are declared in the execution parameters of your project.

To access the execution parameters, click on "Executions management" in the project explorer.

On the main screen, select an execution, then add a new parameter and modify its value.

execution variables

These variables must be declared as character strings and cannot use the modification functions that are available for other variables.

To use them in your scripts, use the $env(parameter_name) function.

Advanced use of variables

Agilitest lets you transform a variable in 5 different ways to make calculations easier.

  • Character strings
  • Regular expressions
  • Date
  • Hourly
  • Numeric

Character strings

By default, all variables are character strings.

A variable can be transformed on creation by clicking on the corresponding button.

5 types of calculation

When a character string is transformed, a page is displayed according to the type used to manage it.

Example:

If you click on “Regular Expr.” button

regular expr button

This will display entries corresponding to the character string of a regular expression

a regular expression

You can concatenate variables in string format with each other and with text.

Example :

If you take two variables:

  • A date variable date: 8/9/2019
  • A hourly variable: 11:34:33
hourly variable

If you create a variable $day, and give it the value $var(date)_$var (time)

Then its literal value will be 8/9/2019_11:34:33

Transformation into regular expressions

Regular expressions are used to divide strings of characters to generate variables corresponding to sub-groups of characters.

The regular expression management menu will ask you for a model which must correspond to your original value.

This model includes brackets that define the subgroups and are used to determine the value of the variable.

By selecting group 1, the variable will have the value that corresponds to the model defined in the first parenthesis.

regular expression

Transformation into date

It is possible to perform date calculations to obtain a later or later date, in a day, a month, etc.

From the value entered, selectors can be used to add or subtract days, months or years.

The original format supported can be m/d/yy or yyy-mm-dd, i.e. an English format..

The date obtained can then be used in regex variables to retrieve the day, month or year.

date variable

Transformation into hourly

It works in the same way as transforming a variable into a date, in which case the selectors allow you to add or remove hours, minutes or seconds at a given time.

The format of the input variable is hh:mm:ss.

hourly variable

Transformation into numeric

Variables transformed into numbers are used to manipulate integers or decimals in the nn.nnnnnnn. format.

The input format can be a decimal number in this format, or a decimal number with a comma as the separator.

numeric variable

Standard operators can be used to perform calculations:

  • +: addition
  • : substraction
  • x : multiplication
  • / : division

The most common mathematical functions are implemented: sin, cos, tan, power, ln, etc.

For very specific cases where you need to perform particular operations, you can call java code by passing certain values as parameters and then retrieving a variable on which you can place a control.

Use of "if" conditions

You can use the “if” condition in variables with numeric transformation.

For a formula made up of 3 groups:

if($var(var1) < $var(var2) ; 1 ; 0)

1st Group = $var(var1) < $var(var2)

2nd Group = 1

3rd Group = 0

If the formula is verified, the first value after the semicolon, will be displayed: i.e. the 2nd group with the value 1

If the formula is not verified, the 3rd group will be displayed: i.e. the value 0.

Example:

example with value and variables

Evaluate : interpret Java and Javascript code

An “evaluate” button allows you to interpret Java and Javascript code.

This feature can be used on both non-editable variables by retrieving the correct property, and editable variables.

When you choose to evaluate a variable, you can choose between 2 languages: Java and Javascript.

You can enter Java or Javascript code as a value.

Interpreting Java and Javascript code can be done with simple code retrieval, but also with complex test results.

It is possible to set conditions in Java and Javascript. This can be done with conditional tests, and the results of these conditional tests can be retrieved.

For these code evaluations, Java or Javascript notation must be used.

Examples :

Simple Java code:

simple java code

Simple Javascript code:

simple javascript code

Interpreting conditionals Javascript functions:

if($var(var1) > 14){"ok";}else{"ko";}

With the variable $var1 which can equal to text or numeric.

If you're not sure what code to enter, you can ask Agilitest's built-in AI.

You can also express your request using voice input.

To do this, press and hold the microphone and express your needs clearly and precisely.

Agilitest and AI

To facilitate the design and maintenance of your tests, Agilitest offers AI integration to improve the day-to-day work of test designers.

The first time you open Agilitest, or following an update, a window will open asking you to accept or reject the integration of artificial intelligence into Agilitest.

AI helper

🔸 Warning

It is important to specify that the integration is not intrusive and has no access to your personal or company data.

You can change the choice of AI use in Agilitest directly from the settings in the editor, top left:

settings button

Tick the box to enable or disable the integration of artificial intelligence.

AI helper settings

To access this function, go to the variables menu and click on the "AI" button.

This will open a dialogue window with AI

dialogue window

This window adapts depending on whether you want to transform a phrase into a regular expression or a date variable

In the regular expression case :

Once you have entered the value of your variable, click on the "AI" button.

Enter the data you wish to extract from the phrase entered as the value

natural language

The AI will generate the regular expression you need to enter into Agilitest to extract the data, along with an explanation of the expression

chatgpt response

This intuitive approach eliminates technical hurdles and allows you to focus on your test work, giving you a higher level of comfort. For example, ask the AI to get :

  • The machine’s name
  • The build version
  • The windows version
  • The machine name after the second dash
  • The date format
  • etc…

Example :

If in the sentence "Microsoft Windows 11 Professional, Machine name: DT-W-PIERREH, build version: 22621" you want to extract the Windows version and the Build version, then write your query in the AI:

query entered in chatgpt

The regular expression proposed by the AI will be automatically entered into the model input in Agilitest

input from AI

🔸 Warning

Even if the integration of artificial intelligence is not intrusive, do not enter personal or company data in the AI search bar. The AI will not process information linked to your Agilitest licence, but it will process all the information you give it in a text input. Do not make it process your passwords, for example.

Return a variable in subscripts

To ensure that a variable created in a script also appears in subscripts, you will need to use the $var(script_path.script_name.variable_name) function to retrieve this value from any subscripts in your runtime.

Example:

If you have a "Phone" directory with a script called "Samsung" and a variable in this script called "Version", then you enter the function $var(Phone.Samsung.Version).

🔸 Warning

If the script is in the root directory, you don't need to specify the script path. So $var(script_name.variable_name) is enough.


Still require support?
Contact support

Table data control

How to control table data

The title is a little complex but corresponds to a case that is often encountered in automated software tests:

You want to control the values ​​of a cell that is located on the same line as another cell that you know.

Relative control of table data

For example, in the table above, we want to control that Chromium is well availiable on Android, ie that there is Yes in the Android column of the Chromium line.

Agilitest allows you to do it simply by a text aggregation trick: if you select the corresponding TR line of the Chromium table, you will be able to retrieve a TEXT attribute which is a concatenation of all the values ​​of the cells of the line.


Visualizing the aggregated attribute of a table line text

The text value of the TR line containing Chromium is as follows:

Chromium Yes Yes Yes Yes Yes No No

The value you want to control is the 5th Yes.

To retrieve the line that matches Chromium without assuming any of the following values, your locator will look like this:

(?i)Chromium\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)

(?i) indicates that the control must be case insensitive

\s corresponds to a space

(.*) corresponds to any type of text, by inserting with \s, it corresponds to text before a space, the "greedy" behavior of regular expressions will then try to match as many characters as possible.

Retrieving the line of text  

Then create a variable that will retrieve the specific value in the Android column.

Use the following regular expression:

(?i)(.*)\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)\s(.*)

The corresponding group is the 6th

Retreiving the value for android

It is then enough to make a control of value:

Final control

Several comments to this trick:

First, you have to master the data of your tests, so it can be dangerous to use this technique when you don't know where is the Chromium line in the table. You can end up with a slightly lax test that does not really know where the data is.

So adapt this technique on a case-by-case basis, for example if your test data is not yet fixed and you do not want to modify your test too often.

It is also possible to use it if you do Data Driven Testing, the controls set up will adapt to the data you have defined in a CSV file. In this case precautions should be taken: for example "Internet Explorer" contains a space that will be used by the regular expression and shift all the data you will want to control.

To finish with this example, you can use a "Check Values" action to control the entire Chromium line at once. You control all of a sudden but you will not know in case of failure what value was not in conformity.

One-time verification of the complete line


Still require support?
Contact support

Checks

The purpose of the software tests, besides compliance with the execution procedures, is to be able to control that the software complies with the expected behavior.

We will see what are the functions of Agilitest that allow to perform controls or assertions in your software tests.

Everything goes through the "Check" function.

check action

This action comes in three sub-functions:

  • Check properties
  • Check occurrences
  • Check values

"Check properties" and "Check values" will work the same way. The only difference is that in one case we will check the properties of one UI element and in the other the values of a variable.

Check occurrences” will control the number of items counted in the displayed page of the tested software.

Check properties

This function takes as input an interface element that will have to be captured.

Example :

check property action

In the example above, a SPAN is selected with an "id" equal to "cwos".

Its "text" property is verified to make sure it is equal to 4.

The verification function will perform the comparison considering both parameters as strings; and accepts regular expressions.

Check values

The operation is identical to the "Check properties" action described above. However, this function takes as input a variable which may or may not be modifiable.

Check occurrences

The occurrence check checks the number of elements found on the current page using an Agilitest locator, i.e. a targeted element.

In some cases, it may be useful to define "locators" that can correspond to several elements. This can be used, for example, to control the number of rows or columns in a table.

The "Check occurrences"  action is also very useful to add robustness to your tests.

check occurences

Check occurences and graphic recognition

Occurrence checking also works with graphical elements.

You will be able to check that an image is present a number of times in the displayed page.

This differs from a check based on the software structure, for example the DOM, for which even non-displayed items will be counted.

You can also combine occurences checking and graphical recognition to determine when you will be able to continue your test.

Still require support?
Contact support

Regular expressions

▶️ You can find our tutorial on regular expressions on our Youtube channel.

Regular expressions are very useful for performing operations on data, extracting subsets or recognizing patterns.

Using regular expressions will enable you to surgically target the various elements of your tests: components, variables, values, as well as add a great deal of robustness to their execution.

For those unfamiliar with them, once you get past the initial errors and the surprise of discovery, this technology is actually quite simple to use and allows you to do a lot without writing a single line of code.

Agilitest has also integrated AI within its software, if you agree to integrate it, enabling you to create regular expressions for yourself and according to your requests.

💡 Tips

Regular expressions you need to know:.

* = Random character that repeat itself zero or many times

a? = Has a zero or an a

a+ = Has one or multiple a

(?s) = Insensitive to line break and space character formatting (single line)

(?i) = Case insensitive

[abc] = A simple character in between a,b or c

[a-z]{3} = 3 letters between the a to z interval

\d = Decimal number

[A-z0-9]{2,5} = Any alphanumeric character repeating between two and five times

^[A] = Starts with A

$[A] = Ends with A

Component recognition

When you are in capture mode, accessible from the Agilitest editor, it is possible to pass components in regular expressions.

You can open the capture tool by clicking on the corresponding button in the channel management menu.

capture button

Then, select the component you wish to capture by pressing the CTRL key on your keyboard,

Captured element

It's when you select the attribute that you'll be able to change the values in regular expressions..

Once the attribute has been selected, click on it to open a text entry window.

text entry

Cross the “Regular expression” case for the value to be automatically changed

regular expression button

Thanks to the regular expression, the UUID value can be modified, but as long as it remains an UUID Agilitest will recognize it.

This trick makes it possible to recognize elements whose attribute values are highly volatile, but which retain a constant structure over time: an identical prefix or suffix, an incremented number, etc.

Verification

Regular expressions can be used to verify component properties or variable values. This action allows you to check whether the rule written in the regular expression corresponds to the value of the variable.

Example:

If your value is to have only numbers and letters, then the regular expression must match this rule and show only numbers and letters.

In the case below, the regular expression is used to check that the format of the cd_frame_id_ property is indeed that of an UUID.

regular expression in verification

Variables manipulation

Finally, regular expressions can be used to perform operations on variables, in order to retrieve certain sub-parts of them.

The complete regular expression is broken down into sub-expressions surrounded by parentheses.

It is then possible to retrieve the part of the variable of interest by its group number, which corresponds to the number of parentheses in the global regular expression.

Example:

In the example below, we've retrieved a complete text that includes a price we'd like to check.

regex in variable

By using the following regular expression:

(\d*),(\d*)\ €(.*)

You can successively recover:

  • The price in Euro corresponding to Group 1
  • Cents after the coma corresponding to Group 2
  • The additional text corresponding to Group 3
regex groups in variable

ChatGPT : A useful tool to help

Increase the comfort of using Agilitest and the reliability of your scripts with regular expressions generated by ChatGPT in Agilitest.

When you create a variable, it is sometimes difficult to know which regular expressions to write or which date format to enter.

By using the ChatGPT function to create your variables, you can solve these problems and also describe the tester's needs in natural language so that you can carry out the only slightly technical operations in Agilitest.

To access this function, go to the variables menu and click on the "ChatGPT" button.

chatgpt button

This will open a dialogue window with ChatGPT

chatgpt box

This window adapts depending on whether you want to transform a phrase into a regular expression,

regex button

Or create a variable date.

date variable

Taking regular expressions as an example:

Once you have entered the value of your variable, click on the "ChatGPT" button.

chatgpt button

Enter the data you wish to extract from the phrase entered as the value

data in chatgpt

ChatGPT will generate the regular expression you need to enter into Agilitest to extract the data, along with an explanation of the expression

chatgpt response

This intuitive approach eliminates technical hurdles and allows you to focus on your test work, giving you a higher level of comfort. For example, ask ChatGPT to get :

  • The machine’s name
  • The build version
  • The windows version
  • The machine name after the second dash
  • The date format
  • etc…

Example :

If in the sentence "Microsoft Windows 11 Professional, Machine name: DT-W-PIERREH, build version: 22621" you want to extract the Windows version and the Build version, then write your query in ChatGPT :

chatgpt chat box

The regular expression proposed by ChatGPT will be automatically entered into the model input in Agilitest

chatgpt's regex in Agilitest

🔸 Warning

Even if the integration of artificial intelligence is not intrusive, do not enter personal or company data in the AI search bar. The AI will not process information linked to your Agilitest licence, but it will process all the information you give it in a text input. Do not make it process your passwords, for example.

Still require support?
Contact support

Graphic recognition

Graphic zone recognition

Agilitest uses graphic zone recognition in two ways:

  • To perform actions such as clicking, text entry, etc. on recognized zones.
  • To carry out graphic recognition checks on elements with the verification action.

Graphic recognition is performed when the "Capture" mode is open.

To do this, click on the "Capture" button below the project explorer.

capture button

Once the capture window is open, you can capture a graphic element using your mouse selection.

Hold down the left click of your mouse and define an area you want to capture,

capture of a graphic element

Drop your element in the editor to the show captured element.

graphic element in the editor

Three options are available:

  • Open the element tree to generate a "Locator", i.e. a targeted element.
  • Copy the image to your clipboard
  • Save the image to your computer
3 options

Elements tree

When you click on "Element tree", Agilitest will display the software structure, or DOM, down to the smallest element that completely contains the selected image.

captured image elements tree

This operation will ensure unique identification of your image, which may be printed in several places in your software.

💡 Tip

It's best to select one or more attributes from the element tree. Otherwise, you may end up with an image present in several places in your application, as demonstrated by the "Statistics" tool.

attribute selection

When the parent elements and attributes of your graphic object are selected, an additional "Locator" is generated. Simply drag and drop your element into a new action in the Agilitest editor.

After dropping your element into the editor, a new action is generated and displayed.

action with graphic element

This action contains a link to an image saved in your project's resources, which can be accessed from the Explorer's "Resource files" view.

resources files view

Image recognition menu

image recognition menu

The image recognition menu you get by clicking on the image in the editor allows you to add the following information:

  • Use of a locator that is not unique to identify occurrences, selecting the image by an index in a unique way.
  • You can influence the graphic recognition tolerance and the algorithm used. For the moment, only the ATS algorithm is available, and we recommend that you retain the default tolerance (0.5%).

Graphic affirmations

Occurrence checks will enable you to add checks on the presence of graphic elements in your applications, count them, generate timeouts, etc, by simply dropping the graphic element into an "Occurrence check" action.

To perform them, simply drop the graphic element into an "Occurrence check" action.

occurences action

However, Agilitest will control images that are actually displayed on the page (unlike a DOM approach, which can potentially trace non-displayed objects).

In this case, you have to ensure that the window is correctly sized and displayed to allow full recognition of the elements.

Still require support?
Contact support

Web drivers

ATS will retrieve the correct driver version based on the browser version retrieved from the test. Based on the browser version, ATS will automatically download the correct driver version. There's no need to configure versions manually.

Why does Agilitest needs Web drivers?

Agilitest is a software solution installed on your computer and regularly updated at launch.

In fact, without any additional configuration, Agilitest currently supports 5 browsers:

  • Chrome
  • Firefox
  • MSEdge
  • Brave

Agilitest’s philosophy is to provide support as quickly as possible for the latest browser versions, and that's why web drivers are used to communicate with browsers. It can allows a very fast support as soon as the Selenium drivers we rely on are updated to these latest versions.

As a result, the Agilitest update will bring with it the latest driver version and drive the latest browser version, and generally you don't have to do anything because :

  • If you update your browser, this should have no impact on the operation.
  • If you don't update it, well, it's often possible for the latest driver to provide backward compatibility with previous browser versions, and in most cases this works out fine.

Configure a specific version of a Driver

Adding new browser versions to Agilitest requires editor configuration in .atsProperties file

To configure a new browser, insert the following lines in your .atsProperties file:

<browser>
<name>chromium</name>
<driver>chromiumdriver</driver>
<path>D:\tools\chromium\chrome.exe</path>
</browser>

The name badge lets you name the browser as it will be printed in Agilitest. A certain number of names are reserved as we adapt to the specificities of each browser: chrome, firefox, etc... You will therefore only be able to modify the driver and executable path for a browser already known to Agilitest.

The driver tag tells Agilitest the name of the .exe driver to load, which is located in the directory user/.actiontestscript/drivers/directory.

You can access all web driver versions by system via this link: https://actiontestscript.com/releases/ats-drivers/

The path tag indicates the path to the browser executable.

For example, if you want to use Firefox 60 ESR, the procedure is as follows:

  • Download and install Firefox 60 ESR in a different directory from your Firefox installation.
  • Complete the following lines in your .atsProperties file:
<browser>
<name>firefox</name>
<path>D:\tools\firefox60ESR\firefox.exe</path>
</browser>

In the case of Firefox, the driver used should be compatible with the latest version and the ESR version, so there's no need to add a driver change.

To specify the MSEdge path, you can use the following lines:

<browser>
<name>msedge</name>
<path>C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe</path>
</browser>

Related error message:

error message

To correct this error, you simply have to configure the ATS configuration file manually.

This can be accessed directly from the editor via the "Settings" menu in the top right-hand corner of the editor.

settings button

Then click on the "Edit configuration" button

edit configuration button

The file will be automatically opened with your default file editor:

file editor

All you need to do is define the path specifically set up on your system to access the executions files of the target browsers.

Still require support?
Contact support

File selection by browsers

When performing business scenarios involving web solutions, there is a case that occurs frequently: the interactions with the operating system, and in particular the selection of files to download them to the web server ( we are talking about upload).

This feature is indeed implemented by all tools managing business data: ERP, GED, PLM, CRM...

The upload function is implemented natively in all browsers because they must respect the HTTP standard that specifies how this file transfer takes place.

All browsers have therefore implemented a file selection menu on the computer or on a network access, and then transmit it to the server. This usually involves using a modal file selection window whose implementation depends on the desktop environment, but each browser can have its own implementation.

Problems caused by tests automation

This causes two types of problems while automating this procedure in a test

  • Problem 1: The test software must be able to interface with the "desktop" part of the browser. In this case, to rely on the HTML page and the DOM is not enough, it is necessary either to recover and to recognize the internal structure of the components and controls of the navigators, or to use the graphic recognition.

  • Problem 2: The "file selection" can vary greatly from one browser to another, which requires adaptations depending on the browser used.

Solution to Problem 1

Agilitest is a multichannel solution

Agilitest is an integrated testing solution that supports the use of different application technologies (web, desktop...) within the same test.

Agilitest's capture tool enables toggling between DOM and Desktop.

  • Problem 1 is easily solved by Agilitest:

In your test execution, go to the download stage.

When the file selection window opens, open the capture tool.

To do this, click on the capture tool in the editor.

capture tool

Then press the "ALT" key on your keyboard or click on the corresponding button to switch from DOM component recognition mode to desktop component recognition mode.

system mode

Then, you will be able to navigate through your file selection window.

💡 Tip

For greater robustness, we advise you to place a file in an easily accessible tree structure of your file system that you can reproduce everywhere, for example in "quick access" under Windows Explorer.

Solution to Problem 2

Agilitest knows how to handle specific behavior of browsers

Problem 2 can be solved with data files (CSV) called as sub-scripts in Agilitest:

Sub-scripts established via a data file (CSV) must follow the following combination:

  1. Call a first sub-script fed by the "browser" parameter in the CSV file column.
  2. Retrieve the browser names to iterate the launch of the same test on several browsers.
  3. Call subsequent sub-scripts whose script name is composed from the "browser" parameter of the first sub-script.

Example:

Use the name of the browser to customize the name of the executed script: script_chrome.ats, script_firefox.ats, etc…

The proposed solution allows you to manage differences in browser behavior. However, we do not recommend using it for the following operations, which are handled directly by Agilitest for all browsers:

  • Navigating to a URL, to the previous page, to the next page, to the home page...
  • Close window
  • Switching tabs

This would render your tests non-generic, which is undesirable.


Still require support?
Contact support

Executions management - TestNG

It is possible to use a Java compiled execution mode outside the specific execution and editing mode of the Agilitest editor. This Java compiled execution mode is faster and intended to be used for a test or a group of tests in a project.

This construction mode can be found on the Executions management page.

Manage project executions

Access to executions management is via the project explorer.

Click on the menu then select "Executions management".

executions management

Agilitest will open a tab with different parts:

executions management page
  • Project Builder (1): Allows you to configure, generate, execute and optionally produce and open reports corresponding to executions.
  • Command lines (2): You can use the command line to launch ATS execution from a Windows command. This command must be exectued at the root of the ATS project. You can copy these elements into a .bat or .ps1 file to launch all the executions you have configured without going through Agilitest.
  • Executions (3): This is the menu for configuring TestNG runs, their variables and scripts.

What is a TestNG execution

All ATS executions designed by Agilitest are executed under Java. TestNG is a framework that has been created to enable these tests to be executed in Java.

TestNG executions, also known as "Suites ", are executions created in Agilitest from a set of scripts and parameters. These executions can be executed by Agilitest, but they are also exportable to TestNG-compatible environments that can replay the tests without requiring complex configurations, such as Jenkins and its Jobs.

How to create an execution

An execution corresponds to the definition of a sub-set of project tests, i.e. scripts, which you can replay in a single execution.

To define an execution, click on the "Add" button in the executions tab.

add button

As mentioned above, a Suite must be made up of several scripts.

To add scripts, select your Suite then click on "Import scripts" in the dedicated box.

import scripts button

You can also drag and drop scripts from the project explorer.

Select packages

The "Packages" tab shows all the directories in your project and lets you define, for each directory, whether the ATS files it contains should be included or excluded from the selection.

Indicate which directories are to be used to retrieve scripts, and which are not.

add packages page

Files do not need to have been added to the script tab.

Execution parameters

Once your execution has been created, you can assign it execution parameters which affect the level of detail of the reports generated.

To configure these parameters, click on the blue "Pencil" on your execution's line.

pencil button

A set of options lets you define the quality of the reports produced when the execution is launched:

Logs level

logs level

The different logs level are as follows:

  • Silent
  • Error
  • Info
  • Warning
  • All

They are sorted from less detailed to more detailed.

Generate reports

Tick the “Generate reports” to generate them at the end of the execution.

enable reports

  • Visual report

For the visual report, you'll need to specify the quality of the ATSV video reports you are going to generate.

The different options are:

visual report
  • Size: To optimize ATSV file size
  • Speed: To optimize the execution speed of the test
  • Quality: To optimize the quality of images
  • Max quality: To optimize the quality of images at the maximum

  • XML report

A report in XML format can be generated and worked with a BI solution (Jasper, Talend, etc…) .

Executions variables

Executions variables are variables that you define in the executions management menu and which will appear as environment variables in all tests belonging to the same project.

executions variables

You will find the environment variables in the special values menu.

envionment variable

Or with the command: $env(<Valeur_Variable>)

envionment variable in an action

Environment variables allow you to manage different execution environments, all of which use the same test base.

Environment variables can be overridden during the execution, either on the command line, or with the system used to launch the executions (Jenkins, GITLAB CI, AzurDevops).

Groups selection

Test groups allow you to filter the scripts you execute according to the groups they are associated with.

The groups management tab which is accessible from the project explorer lets you create, manage and delete groups.

groups management button

Each project has its own group management and each execution suite has its own filter configuration.

There are two ways of filtering with groups:

  • By including: All scripts belonging to this group are executed.
  • By Excluding: All scripts are executed except those belonging to a selected group.

Launch an execution with Agilitest

Once your execution has been created, make sure it's selected, as indicated by the tick on your Suite line.

suite selected

You can also select several Suites to be executed one after the other.

Multiple Suites can also be executed using Job Jenkins.

To launch the execution of your Suite, you need to follow the steps below, in order:

launching an execution
  1. Generate: This generates the java files corresponding to the selected ATS tests.
  2. Compile: This compiles the java files corresponding to the selected ATS tests.
  3. Run: Agilitest will open a console and replay all the tests selected in the run.

There are two optional options to add before launching your Suite execution (step 3):

executions parameter
  • Open failed scripts: At the end of your execution, this will open any scripts that were not successful.
  • Generate reports: At the end of your execution, your Suite report will be generated, and can also be opened if you check the following option. You can choose *Report level of detail once this option has been ticked.

💡 Tip

This console should only be used for "quick" script verification in Agilitest. For longer script launches, it's better to use a Windows terminal or the "CMD" shortcut you can create in the executions management tab.

shortcut button

Still require support?
Contact support

Scripts headers

In addition to the tests and controls to be performed, the ATS format makes it possible to define a set of meta-data that are very useful for characterizing all of your tests.

Open the script header

To access to the script header, click on the "Script header data" at the top right of the script editor window.

script header data button

You will then see a submenu whose activation will modify the display of your editor according to the information to display:

header submenu

Actions

actions

You return to the display in the test actions editor. By default this possibility is not activated.

Header

header action

To give you access to the information of the script header:

information window

The following items are displayed:

  • Author: The person or group who performed the test.
  • Description: Definition of the test content. This field accepts HTML code. You can also add a set of metadata which will be reproduced as is in the ATS script: requirement numbers, etc.
  • Prerequisites: What are the links with other files, or the availability of environments, etc.
  • Groups: The groups to which the test is affiliated.

ATS code

ats code

Clicking on "ATS Code" will display the raw ATS code corresponding to the test currently being edited.

This menu allows you to copy the test code to send it to a correspondent who can replay it.

ats code tab

🔸 Warning

This tab cannot be used to modify the ATS code directly.

When you receive an email or a file containing the ATS code, the procedure for importing it into Agilitest is as follows:

  • Create a new empty script
  • Select the ATS code in your e-mail editor, notepad, etc...
  • Drop the code directly into the empty Agilitest editor window
  • Agilitest will read the code and regenerate the corresponding actions
  • Then click on Execute

It is also possible to Drag&Drop or copy/paste lines of code directly into the Agilitest editor. Either directly into a script, which will add the new actions corresponding to the code, or into a directory, which will create a new script.

This also works with text. If you take any text (a paragraph from a web article, for example), you can Drag&Drop it into the Agilitest editor, which will translate it into a comment action. This can be used to structure a test or to check the text, for example.

Java code

java code

By clicking on “Java Code”  this will display the Java code generated during the test execution.

Obviously, the Java files that correspond to the ATS test files cannot be modified directly.

Close

close button

This button will close the script completely. This saves it if it hasn't been saved.

Still require support?
Contact support

Settings menu

When using Agilitest for the first time or during its use, you can configure the software to optimize its use. Agilitest works mainly with the ATS and Java (JDK) packages that will be used to create, maintain and execute automated projects.

At the top right of the editor there are various support menus including the "Settings" menu.

settings button in editor

Click on the “Settings” button to open the window in the editor

Settings page

Agilitest settings

Error reporting

You can enable error reports (or logs) by checking the "Error reporting" box.

error reporting

Three log options are available:

  • The Startup logs, in case Agilitest crashes at launch

Then the test execution logs which will display technical errors (related to a driver, not functional errors):

  • To open the current logs, empty by default, which display the last created logs
  • To open the logs directory in your Windows explorer and have access to the logs history

Languages

In this configuration menu, you can also change the language to English or French.

choice of french or english

Mandatory tools

There are two prerequisites for the proper functioning of Agilitest: the ATS package and the JDK.

ATS settings

Agilitest requires an up-to-date ATS library to operate.

ats settings

From these configurations you can :

  • Create a configuration: This will create a global configuration of ATS in the system. By clicking on it you can modify the configuration.
  • Download ATS components
  • Download ATS-OpenCv
  • Create a Neoload configuration
  • Open a Maven directory
  • Open an ATS directory

How to set up ATS?

It is also possible to configure some of the functions of the Agilitest editor via the .atsProperties configuration file.

To access the ATS properties, click on the "edit configuration" button of the ATS settings

edit configuration button

The currently allowed parameters are as follows:

  • Default number of executions of each action in the editor before deciding on a failure. By default they are set to 10.
maxtry code

  • Positioning of windows opened automatically by the editor. By default, the coordinates of the upper left corner are set to x=20 and y=20.
  • Sizing of the windows opened automatically by the editor: width and height set by default to 1500 x 960
window position and size code

  • Management of the "timeOut” on the execution of the scripts and the loading of the web pages. By default, it is set to 60ms and 120ms
TimeOut code

  • Management of access paths to different browsers and specific waiting times for each of them:
path to browsers

  • Management of access paths to the various Windows desktop applications installed on the computer. A shortcut will be automatically created from the "Applications" menu in the startup action of a channel.
path to windows applications

You will find the application registered in the properties directly in the applications when you open a channel

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/6091037db25653a59aa30cfc_image-51.png

🔸 Warning

The access paths will have to be adapted according to your configuration.

Java (JDK) settings

Java allows to load, compile and execute ATS projects.

From the configuration menu it is possible to download the JDK or to enter the path to a JDK already existing in your computer.

java jdk settings

🔸 Warning

You need at least a version 11 of the JDK for Agilitest to work.

It is also possible from this interface to add Java execution arguments for the launch of tests by clicking on the "Add argument" button.

add argument

External connections

ATS Mobile Station servers

It is possible to set up an ATS Mobile Station server to automatically connect the set up server during your mobile tests.

By clicking "Add" button, you will be asked to enter the IP address and port, which will be retrieved directly from Mobile Station interface.

ats mobile station servers

You can check our documentation on mobiles tests.

GIT accounts

The Git account in Agilitest allows you to clone an existing Git account and thus use a Git project.

Click on the “Add” button to add an account

Git accounts

Then, enter your Git account information.

Git account entry

Still require support?
Contact support

Capture tool

▶️ You can find our tutorial about the capture tool on our Youtube channel.

The Agilitest capture tool is an essential component for selecting user interface elements to capture and reuse them in tests as action targets.

What is the capture tool?

During a manual or automated test, it is essential to define the target of each action programmed in the scenario. For example, a click action requires a target element to interact with so that the test clicks on the right button, or the right interface element.

The Agilitest capture tool defines these action targets. It goes a long way in identifying the components of your applications, to set up detection rules tailored with the relevant attributes.

The capture tool allows to fly over the GUI elements of your web, mobile, desktop, or data structures (XML for your SOAP webservices, JSON for your REST webservices).

For each element thus overflown, the capture tool presents you the tree in which it is located, and the attributes which it has.

What is the DOM?

It's the same capture tool that allows you to capture the HTML tags of the DOM (Document Object Model) of your web applications, the Widgets of your desktop or mobile applications, or a graphical presentation of the data structures of your webservices.

In this sense, the Agilitest capture tool is graphic, versatile, and at the service of the multichannel aspect.

The DOM is an HTML representation of a web page, which defines the structuring of the different components of the page.

The DOM can be seen as a tree where each element can have zero or more children, which can themselves have zero or more children.

Example : The DOM always starts from a root element: the <html> tag. This tag has children (<head>; <body>) which therefore have <html> in common as a parent. The content of your <body> tag can notably contain links, buttons, blocks etc.…

💡 Tip

To better understand HTML:

  • Opening tag <>, closing tag </>
  • Element, parent, child element and sibling element
  • Processing a component of <iframe> type
  • An <input> tag implies a parent <form> tag (often rich in attributes)
  • A <li> tag implies a parent <ol> or <up> tag (often attribute-rich)

How to open the capture tool

To open the capture tool, you must first start a channel and have the website open as part of a web test

Once you have created your project and opened your channel, you can open the capture tool by clicking on the corresponding button in the channel management menu.

capture tool icon in editor

The capture filter is symbolized by a pattern in the form of small crosses that are positioned in front of the channel (the screen of the application to be tested). This filter is used to delimit the capture area.

capture tool filter above web page
The capture tool filter is activated

Another indicator that the capture tool is activated is the Capture window that appears at the top on the left.

capture window

You can press the Shift key on your keyboard to click on elements on the web page without having to close the capture tool. This will open a drop-down menu or show other elements that don’t necessarily appear.

🔶 Warning

The pattern corresponds to the initial size of the channel that is set in its ATS configuration. If the channel is manually resized, some times the syncronisation with the channel will work and the filter will match the modified channel size. However, in other cases, the filter will not match the channel size because it will be out of sync with the channel driver. It will therefore be necessary to close the channel and then to open it again for the driver to synchronize again.

Use of the capture

The Agilitest capture tool consists of a "capture window".

capture window

This window can be moved from left to right, especially when it hides an element that interests you.

This capture window is composed of 3 main buttons:

  • System (Alt): Toggles between HTML capture mode and system capture mode. By default the capture tool will be placed on the HTML view. To change the view you can click on the system button or press the ALT key on your keyboard. Changing the capture mode requires the capture tool to reload, which may take a few seconds.
  • Source Code: Displays the source code of the page.
  • Close: Disables the capture mode.
  • The coordinates x and y: correspond to the coordinates (x: abscissa and y: ordinate) of the cursor.

The movement of the mouse over each element of your application is accompanied by a tooltip specifying its type (either the name of the HTML tag for the web, or the name of the GUI component for the desktop).

capture identify an element

To capture an item, you need to hover your mouse over the desired item, then press the CTRL key on your keyboard. You don't need to click on the mouse, just press the CTRL key.

This will bring up the "Captured element's parents" window that displays the path from the root of the application to the item that was just targeted.

capture element's parent window

The parent elements unfold like an accordion to display more details of the attributes. The attributes must be checked according to what you want to keep to perform the detection of the element.

captured element's parents window close up

As the mouse moves through the different "nodes" of the path, the blue frame around your element in the web page will position itself to identify the element you have moved.

captured element underlined

The component is displayed with all the attributes that define it. The objective is to select one or more attributes that will define the component and make it uniquely recognized within the page. This is called a "Locator".

The attributes

attributes in the capture element's parents window

The attributes are: type, class, id, name, or even CSS attributes for web applications. Or they can be: TitleBar, Button, TabItem for desktop applications.

Agilitest only proposes the attributes it finds. This means that it does not invent ids, it takes them from the DOM.

If there is no id proposed, it means that the application is developed as is. Two possible situations:

  1. The developers have not developed any id, perhaps because of Agile development or a lack of time. You can therefore give them a report on your test and tell them if any ids are missing. As a QA, your role is also to audit good practices and quality in a broad sense. As a functional tester, it is more common sense to point out to the developers that it takes you time that is not necessary to identify this or that component when an id would be a time saver in the configuration of your tests.
  2. Conversely, if you use development frameworks, some frameworks do not have "good practices" that are respected and therefore do not have an id.

Warning about ”text” attributes

In the context of classic test automation, it's not necessarily good practice to use the text attribute, however, if it's not possible to do otherwise or your text will not change then it's not a problem.

Here are some reasons why the "text" attribute might be problematic:

  • Recognition of the element no longer works in the multilingual context of your solution.
  • Some browsers are case-sensitive (and others not), so a capital letter tends to reduce the robustness and portability of your test.
  • The handling of line breaks and/or spaces may differ from one browser to another.

Once you've selected the "text" attribute, you can click on it to automatically edit values with useful regular expressions to avoid these latter problems.

ShadowDom

Shadow DOM (Shadow Document Object Model) is used to avoid style conflicts and to isolate the component code, which is particularly useful during the development of complex user interface. Agilitest uses the ShadowRoot, which is a component of the ShadowDom technology, during its elements research in order to sharpen this research and to make your scripts more precise.

captured element's parents with shadowRoot

Agilitest automatically detect the capture of an element with the ShadowRoot type in the capture window. You will be able to recognize those elements with their pictograms and their dotted frame.

The ShadowRoot components that compose the captured element will appear in the interface element of the action.

ShadowRoot components

You will also have the possibility to manage your elements and declare those in ShadowRoot directly in the action editor.

ShadowRoot declared

Identify iFrames elements

Some HTML pages include iFrames (i.e. inline frames) in their design, notably to insert elements from another server into the page.

To find elements on these HTML pages, you will need to select each iFrame in the page DOM, otherwise you won't be able to find the children of that IFRAME on the page.

Example:

Select the iFrame attribute that allows you to recognize it.

iframe attributes

Select the attributes of the children you wish to automatically find in this iFrame.

children attributes

The object is then easily recognized.

Advanced features in the locator

Once the attributes to define your component are selected, several steps can be performed before placing your interface element within the script by adding a corresponding action.

Statistics on the captured element

In the "Captured element’s parents" window, the Statistics button allows you to check whether the checked attributes will uniquely recognize the item on the page.

statistics action on an element

Clicking on the "Statistics" button confirms or denies the uniqueness of the checked element according to the chosen detection rule. A green tick will appear to confirm the uniqueness of the element. It is possible to click on the magnifying glass from the green tick to highlight the element on the web page.

If the green check mark does not appear when checking the statistics, there are several possibilities:

  1. Multiple occurrences: A warning will appear to indicate multiple occurrences on the page. In this case, you can add precision and go up in the upper elements by adding attributes to your element or, if several occurrences appear, it is possible to target the occurrence that interests you from its index number.Example: If an image always appears as the 2nd occurrence in the order of the components on the page, then you can select the 2nd occurrence among those indicated..
  2. A red cross: This means that the element is not found. You will have to find another way to recognize the component.

Regular expressions (regex)

Regular expressions can be used in the Agilitest capture tool to match parts of attributes. The regular expression allows you to manage dynamic data.

A search based on long text is not recommended, as blank spaces and line breaks can lead to errors.

Example: Some JavaScript libraries are known to randomize parts of ids or classes. If we look at an id written "btn-XYhSj02-01". We assume that the first part "btn" is fixed and the second part "01" as well, only the middle part is likely to vary.

We can then match this identifier with this regular expression:

btn -.{7}-01

regular expression in the capture

The use of regular expressions brings an additional layer of difficulty, but their use allows to simply handle the most delicate cases. The difficulty associated with regular expressions is therefore a lesser evil.

When you click on the text of an attribute it will open the insert allowing the setting of regular expression.

buttons for regex

Access to two buttons for :

  • Manage case
  • Manage spaces

💡 Tip

Expressions to remember:

(?i) : Means that the expression is completely case insensitive

(?s): Insensitive to the formatting of special characters (line breaks, spaces, etc)

.*: To form any character string. The dot represents all possible characters (A-Z, 0-9 and special characters) and the star indicates that the previous pattern (i.e. the dot) is repeated n times.

[a-z]{3} : Means 3 letters between a to z.

Drop the element in the script

The "drag and drop" icon in the parent window of the captured item allows you to use this detection rule in the item of an Agilitest action.

The drag and drop can be placed either after the last lines of the test, which will create an action,

Create action with the element captured

Either inside an existing action line in the "Interface element" section.

drag into an empty interface element

Once the element has been dropped into an action in your script, you can highlight the element in your application to see exactly which object it corresponds to.

To do this, when your channel is open, click on the button with the magnifying glass icon to highlight the element in your application.

Search for an element by its index

When a locator allows you to find several elements, it is possible to specify by an index which one you want to manipulate.

Example: In an array where the number of rows is represented by the element "TR", if you specify index #2 in this element containing several occurrences, then the text of the second row of the array will be retrieved.

From the editor, fill in the index of a multiple element by clicking on the Lego icon.

Lego button

Then, to the right of the element, you will see a # and two up/down controls that identify by an index the element defined by your locator.

index

By validating, Agilitest allows you to retrieve specific attributes of an item identified by its index.

Graphic recognition of elements

Graphical recognition is possible with Agilitest, it allows to detect the presence of an element on the application and to count the number of occurrences (PCRE format). While it is not desirable to abandon the HTML attribute capture system, graphical recognition is complementary in specific use cases.

Example: When the desired element has no usable id or class, graphic recognition is usable.

When the application includes Java, Flash or 3D code, the capture tool will not always be able to dive into the application tree to present the different elements of the interface in a structured way. In this case, graphical recognition allows actions or controls to be performed even in the presence of a programming framework that is not cooperative with Agilitest.

To use graphic recognition, open the capture tool. Instead of positioning on a component and pressing the CTRL key, to perform a graphic capture you need to select the area you want to capture.

Using the mouse, hold down your left click to select the area to capture

capture graphic element recognition

The selection will take an image capture of the element with 3 buttons available:

  • Elements Tree
  • Copy
  • Save
graphic element buttons

Click on "Elements Tree" to associate the location with the graphic capture then drag the element into your script and add an action to it. The possibilities are the same as for a classic HTML component.

🔶 Warning

This tool should be used sparingly; it may be useful to act on a button that is not recognized, for example, but it may interfere with graphic recognition.

Target an element

In some particular cases, it is mandatory to do an operation on a very particular position on the tested software where the locator can not be used since it is only based on attributes.

Example :

When you want to click on a precise zone on an image where the last element visible by the locator would capture a bigger zone than wanted.

Like a web image of a map where you want to click on a city rather than a country, or a intern component of a desktop app, etc…

Agilitest offers a solution that allows a precise definition of the point on which you want to execute actions by specifying its cartesian coordinates in relation to the window’s component.

In the example below,

precise position on an element

If you only want to click on California, but the last element visible in the HTML structure is the full image of the United States, then you will need to create a cartesian coordinate for the locator.

A cartesian coordinate definition of the locator is done in two steps:

  1. Select the reference component

Start by selecting the standard locator, either by its attributes of by its graphic recogntion

capture element
  1. Target the action point

Once the locator is selected, click on the “Target location” button

target location button

You can then target precisely the point on which the action is to be exectued by clicking directly on it.

targeting the element

Agilitest will inform you that a locator with a cartesian target has been created by adding a target on the drag and drop button

drag drop button

Once you have dropped your locator in the editor, Agilitest will generate an action with cartesian coordinates.

target action in editor

Thanks to this functionnality, you will be able to generate a locator out of the select component.

Eventual problem with an overflown element

In order not to be intrusive with the software being tested, Agilitest will not deploy a plugin on browsers, which means that it will appear superimposed on the windows of the application being tested.

In some cases, this can cause display delays between the two applications, particularly when component selection boxes are displayed.

If, in the capture mode, Agilitest is not perfectly aligned on the page on which you want to capture elements,

Then, verifiy that your Windows system has not modified automatically the size of texts, apps and other items displayed on each of your screens. This parameter needs to be set to 100% in order for the Agilitest capture tool to work properly.

To open the display menu, do a right click on your desktop interface and select “Display settings”.

example

Define the text to100%.

The interest of such a tool

Using the source code in another way

The Agilitest capture tool offers interests compared to the development tools panel offered by browsers with the F12 key that gives access to the source code of a Web page:

  • The Agilitest capture tool is cross-browser: Chrome, Firefox, IE, Edge, Opera are treated the same way;
  • The Agilitest capture tool is multi-channel and can be used on: web applications, webservices, desktop applications, mobile applications;
  • The Agilitest capture tool does not just hover over elements, it refines the detection rules and tests their uniqueness on the application screen;
  • The Agilitest capture tool offers graphical element recognition** in addition to HTML attribute recognition.

Locator Agilitest vs. XPaths

agilitest locator vs xpath table

Many testing software applications use XPath as a system for querying and detecting elements in an application.

Detection is often assisted, and allows relative ease in creating an XPath expression. The XPath expression is created and used, often without the tester having had the opportunity to read and review it in the context of their knowledge of the application.

A recorder allows, when activated, to open a browser and to perform actions on it (clicks, data entry, etc) which will then be transformed into a script by the recorder.

The capture tool has the same purpose, only the typing is manual.

One of the advantages of the Xpath is the "absolute" side of the path, which allows to find exactly the component thanks to the detail of the indicated path.

However, if an element changes within this path, it will result in a wrong indication to the component. This is especially true with Javascript frameworks (like ExtJS) that randomize element ids making them difficult to use.

Example: If the developers add an IVD within the path or have rearranged the components, the attribute used to recognize the IVD has evolved.

Also, automatically generated XPath expressions can be cumbersome to maintain.

Agilitest offers the opposite:

The idea is to slow down the recognition of the component as much as possible. The fewer components you add, the less likely you are to make the test obsolete to future changes, which makes the test more robust.

These are, in our opinion, two reasons not to use XPath technology in Agilitest:

  • No automatically generated XPath expressions without review by the automation engineer or functional tester.
  • No systematic KO testing after the application is updated.

Still require support?
Contact support

SELECT components / Combo boxes

▶️ You can watch our tutorial about the SELECT componant on our Youtube Channel.

Agilitest supports HTML SELECT components and combo boxes for Desktop applications. This is necessary because these components have a graphical interface and a particular behavior: they select one or more values from a drop-down list.

Create a Select action

There are two ways to create a Select action:

  1. From the action menu

To create a Select action, click on the “Select” action in the actions menu

select action

          2. With the capture of an element

First, you need to capture the element on which you wish to perform the action.

Once it is done, drop the element in the editor and choose the action Select.

select action

💡 Tip

The SELECT action works just as well on a fully visible drop-down list as it does on a list that usually needs to be scrolled with a click. For the second option, you simply need to capture the main element of the list.

list of elements

Three options are possible to select a component:

options of select
  • With the index
  • With the text
  • With the value

Once the element has been selected, you can display the values and instructions to enter them by clicking on the "Load values" button.

load values button

You can click directly on these values to enter them instead of enter them manually. They will be adapted to the type of Selection chosen.

The values loaded correspond to the three options:

0-1-2-3 = Index

Volvo - Saab = Text

(volvo) - (saab) = Value

For the text and value selection you can use a regular expression, which is interesting to use in order to filtrer in a more flexible way.

You have also the possibility to “Keep other options selected” which can be applied in a case of a multiple choice list. It allows you to select multiple elements in a same list.

Index selection

The index corresponds to the position of the desired value in a drop-down list, starting from the top and beginning with 0.

Simply check the "Index" box and enter the desired value.

index selection

The index must not exceed the number of proposed values, otherwise no text will be selected.

Example:

In a drop-down list with 4 items: Volvo, Saab, Mercedes, Audi.

If you wish to retrieve the value "Mercedes", then you must enter the index "2", as it appears in 3rd position, but the count starts at 0.

Text selection

In a selection by text, the text will be selected if it corresponds to a possible option proposed by the drop-down list.

Example:

In a drop-down list with 4 items: Volvo, Saab, Mercedes, Audi.

If you wish to retrieve the value "Mercedes", enter the text "Mercedes" as it appears in the list.

text selection

Value selection

The value attribute is an additional value provided in the HTML code and linked to the displayed text. This allows you to select a text, but not to retrieve its value.

Once again, this value must be proposed for the corresponding text to be selected.

value selection


Still require support?
Contact support

Management and project explorer

Create a project

Open a new project

At the top of Agilitest editor, click on “New project

new project button

Agilitest will create a new project with a project tree under the selected repository.

new project

Create a new component

To create a component that will be part of your project, click on “New component

new component

When you create a new component, Agilitest allows you to select the following types:

menu of components

Create ATS script: To create a new script or subscript.

Create CSV file: To create a data file that will test multiple data. (Data Driven Testing)

Create a JSON file: To create a data file that will test multiple data.

Create Java scrip: It allows you to call for Java external code in Agilitest.

Create execution : To create a tests execution in order to manage the review of all your tests in a project, filtered according to multiple criterias.

Open an existing project

If you already have existing projects but they don’t appear in the project explorer, then you have to open them through Agilitest.

Click on “Open a project”

open a project

Then, select the project depository at the root and validate by clicking on “Select a file

project explorer

Then, the project will open in the gilitest project explorer.

Delete a script

You can delete your ATS script with a right click directly on the script situated in the project explorer.

delete button

When you delete a script, a window will appear to confirm that you wish to delete the selected script. This window indicates that th suppressed ATS script will be sent to the bin of your Windows system.

If deleting the script was an error, you can simply restore the script by recovering it from the bin.

Then, to show the recovered script reload your ATS project in Agilitest from the project’s menu.

reload project

Project explorer presentation

The project explorer is a principal element to help you browse in Agilitest.

It has been optimized to obtain the best visibility of your projects, to facilitate the creation, execution and maintenance of your tests and to increase producitivity

It allows you to have a global view of a project and to bring global modifications as well as to limit the step-by-step method.

The project explorer is composed of:

project explorer presentation
  • Project selector (1): You can select your project with a drop down list. This offers a better browsing between your differents projects.
  • Project’s menu (2): With the suspension points you can display the options and pages regarding the selected project.
  • Suite selection (3): Another drop down list allows you to define quickly the current suite for your project. This enhancement eliminates tedious steps to configure the selected suite.
  • View selection (4): To give you a more customized experience, a drop down list allows you to choose which type of view you wish to see appear.
  • A set of actions (5): These buttons are used to create a new component, a new file or to open the file position in the Windows explorer. These buttons are different depending on the displayed view.

Project’s menu

Click on the suspension points to display de project’s menu

project's menu

In this menu you can find:

  • Executions management: To manage your executions and Jenkins Job
  • Groups management: To open the group window that allows you to create and manage your groups
  • Project properties: To access the properties of your project
  • Open in system explorer: To display your project in your Windows explorer
  • Validate ATS scripts: To test the ATS script validity of the project
  • Reload project: To reload your current project and to show new modifications
  • Close project: To close the current project in Agilitest

What is a selected suite?

A selected suite is a current suite selected for a project. Each execution has parameters such as configuration options you can find the executions management menu.

To select a suite, click on the drop down menu made for suites

selected suite

The purpose of selecting a suite for a project is to modify the project parameters at global scale and thus vary the values dependent of the these parameters which are used in the project scripts.

Example :

If you choose execution "A" with the Chrome browser and select execution "B" with the Firefox browser, when you use the Browser parameter in a script, the value will automatically be Firefox for execution "B" and Chrome for execution “A”.

Change the project explorer view

To help you in your organization and to have clearer understanding of your project, you can select the view you want to see displayed in the project explorer.

To do that, click on the drop down menu made for selecting a view for the explorer.

project's view

View: ATS script

ATS script view
  • ATS scripts view: To only display the ATS scripts of your tests and their repository within a same project.

View: Java Scripts

Java script view
  • Java script view: To have a view of all the Java scripts created and their repository in a project.

View: DATA

DATA view
  • Data view: To show all the JSON/CSV data files and their repository in a project.

View: Resources files

resources files view
  • Resources files view: To display files embedded in a test project that are still required for test project management. These are images, files, etc. that can be used during test execution.

View: Java librairies

Java librairies view
  • Java librairies view: To show the content of  the “libs” repository (.jar, .zip, class files)

View: Execution results

Execution results view
  • Execution results: This corresponds to all the files generated following a test execution, in order to have visibility of the elements that make up the execution. These "versatile" files are modified with each execution and are not intended to be saved in a test project.

Still require support?
Contact support

Editing actions

▶️ You can find a tutorial on how to edit actions on our Youtube channel.

During the creation of your tests you will interact with the Agilitest editor. The editor allows you to create actions and to manage their executions in order to improve the maintenance of your tests.

Create actions

Your created actions are going to be added one after the other in your script. It is possible to change their order manually directly in the editor.

There are three ways to create new actions:

Actions menu

This menu appears when you have opened a script. It contains the actions used during a test.

actions menu

To create a new action, simply click on one of the actions in the menu and it will be added to the editor.

Example :

If you want to create an “Enter text” action, click on the corresponding action in the menu,

enter text action

Then, the newly created action appear, empty of any information, in your script

new action without info

You will need to complete your action manually or by dropping an interface element.

Action created from a captured element

Once your element is captured with the capture tool, click on “Drag drop into editor

drag and drop

While holding your element with your mouse, drag it into your editor and place it under an action to make the “Create action” input appear.

create action popup

The generated action is linked to a graphical element in your application.

Select the action you want to do on your element.

contextual actions

All actions are not available from this contextual menu. To have access to all the actions you can check the actions menu.

Copy and paste an action

By doing a right click on on an action in your script, or a group of action, a contextual menu with different options appears.

right click on an action

This menu allows you to:

  • Copy/cut and paste
  • Delete permanently an action
  • Deactivate/activate an action or a group action

Their display will be greyed out and a stop icon will be added to a deactivated action.

greyed out action

They won’t be played during the script.

Active actions

You know that an action is selected when its colour is dark grey. This is what is called an active action.

active action

You can select multiple active actions.

To do that, select the first action, then press the SHIFT key on your keyboard and select the last one

All the actions in between those two actions will be selected (cf. from action 1 to action 3).

You can also use the CTRL key on your keyboard to select separately one or multiple action to add in a group of active actions.

Actions linked to the application’s elements

What is an action composed of?

Agilitest editor gives graphical interpretations of the actions that will compose your scripts. The ATS format, which is a test language, is a text format that describe the whole of the actions.

presentation of an action
  1. Each action has an index that add up automatically and is numbered depending on its position in the script (cf. index 2).
  2. Next to the index is the nature of the action, which can be parametered

Example :

For an enter action, you can enter the text you want to see appear in your test, (cf. “Hello World ! $key(ENTER)” for the action in the capture)

        3. Then, under the nature of your action, you have the interface element and its options. In the options you can modify, specify or enter manually the Locator, which is the targeted element.

Actions on the interface element

Click on the lego icon to the right of your element to add attributes to your element.

lego icon

Enter or modify attributes

attributes menu

You can also click on the element to add parents or children and specify their type.

specify the element

If your locator, i.e your targeted element, can retrieve multiple elements on a page, click on the “#” to specifiy which element to select by its apparition order.

index element

💡 Tip

This functionnality can be useful to select a specific row or column in a table.

Drag and drop an element

As seen previously, you can create an action by drag and dropping a captured element into your empty action.

application root

Furthermore, you can drag and drop an element already used in a previous action into a new one.

drag and drop

Empty element

An action may not have an element.

application root

Click on the root application to show different options

root application options

  • Addition of an interface element: With this you can create an element with search criterias (type of element, parents, etc…)
interface element creation

  • System interface: This allows you to target an element from the system window by defining it. The “Button” type appears by default.
system interface specification

💡 Tip

You can make manual modifications on a system interface, however, we recommend to make those modifications via the “Desktop” application in an Start channel action.

desktop application

  • Dialog box: This is allows you to manage and execute actions on a dialog box
dialog box

For further information you can consult the documentation on how to automate a dialog box.

  • Screen record: With this feature you can count shapes in a video.
screen record

Still require support?
Contact support

Web automation

Agilitest supports web application automation on 5 browsers:

  • Chrome
  • Firefox
  • MSEdge
  • Brave

Agilitest supports the latest browser versions thanks to frequent ATS updates.

In some cases, if you have special needs and are not connected to the ATS server, here's how to configure your Web drivers manually:

Click on the "Help" menu in the top right-hand corner of the Agilitest editor.

help menu

Then, click on the browser you wish to version

web drivers

This will take you to the browser's support page.

You can also access all web driver versions by system using this link: https://actiontestscript.com/releases/ats-drivers/

On the Agilitest side, insert the following lines in your .atsProperties file:

<browser>
<name>chromium</name>
<driver>chromiumdriver</driver>
<path>D:\tools\chromium\chrome.exe</path>
</browser>

To know more, you can consult the documentation on Web drivers.

Create a first Web test

To get started, you need to open a channel on the web browser of your choice so that Agilitest can communicate with that browser.

By default, Agilitest will find the installation of the main browsers on the market.

Click on "Start channel" in the actions menu,

start channel

Select the browser you want to use.

browser selection

You'll then need to specify which URL your application is located at, which may be a local or Internet link.

To do this, click on the Navigation > Browser URL action.

browser URL

Enter the URL

URL

From here, you'll need to switch to capture mode to select DOM elements, perform actions and controls, and finalize your test.

How to execute a test on multiple browsers?

Once you have exectued your first test, you can quite easily execute it on multiple browsers, by doing the following:

Create a single-column CSV file and fill in the browsers you are interested in.

To do this, simply click on "New component" and on the CSV file.

CSV file

Next, you need to iterate over the values in the CSV file by performing a sub-script call.

  • Create a new script
  • Drop your main script from the Project Explorer into the Edit window, to create a "Call script" action.
  • Drop the CSV file on this new action, to generate an iterative call on the CSV file.
call script action

Simply modify your initial script slightly, to vary the browser name:

In the "Start a channel" action, replace the hard-coded browser name with the variable $param(0)

param(0)

This is the value of the first column in your CSV file on which your sub-script call will be iterated.

In Agilitest, you can use variables in several places to increase the reusability of scripts and files. For more information, see our documentation on passing parameters to a sub-script.

You can also create an environment variable accessible from your project's runtime parameters.

To use them in your scripts, use the $env(parameter_name). function.

For further information, please consult the documentation on variables.

🔸 Warning

Although it is possible to open several different browsers in the same script, it is not possible to open the same browser several times.


Still require support?
Contact support

Video reports

It is important that the analysis of test failure conditions be quick and efficient to determine if the test needs to be modified or if there is a regression condition in the software.

This is crucial to further reduce the load of automated testing on the maintenance site.

The ATSV video functionality is provided by ATS natively: it is open source. You will be able to exchange reports with your partners even if they do not have access to Agilitest.

How to generate a video report in Agilitest?

There are several ways to produce a video report directly in Agilitest.

From the channels management menu

The channel management menu is accessible on the left side of the Agilitest editor, below the project explorer, and allows you to request the generation of a report during an execution.

Click on “Parameters

parameters channels

Select “Visual report”

visual reports

At the end of the execution, the report is accessible with the project explorer in the target\report directory.

By double clicking on the generated ATSV file, the video report is read in the viewer provided with Agilitest.

atsv file

From the executions management menu

In the execution control panel you can request the generation of Video Reports.

To open the run control panel, click on "Executions management" in the project explorer

executions management

This will open the run management and suite compilation page.

project's builder

Then, click on the suite settings button.

pen button to edit

Click on the case “Enable reports

enable report button

Then select the quality level of the video report which implies the level of detail more or less high

quality choice

It is important to configure this correctly as it may affect the execution time or size of video reports when replaying continuous integration tests.

Finally, click on “Generate reports” in the execution line of the project’s builder.

generate report

The ATSV format has been optimized to take up little space and be generated quickly, but be aware that the configuration of the videos in the runs is for all tests that will be replayed and can produce a large amount of reports.

How to play an ATSV video without Agilitest?

An ATSV player written in HTML5 / Javascript is provided free of charge and can be integrated directly into your continuous integration environments, or even launched from the command line.

The HTML5 ATSV player is activated to read the reports.

ATSV HTML5 player

The ATSV player is a tool that allows you to replay an ATS test as a sequence of images and animations

When you open your ATSV file, it is displayed in a browser tab.

atsv html5 player

For each ATSV HTML video, it will display on the screen the name of the channel being executed and the number of actions performed.

current channel

The following actions can be performed during the reading process:

  • Play
  • Pause
  • Stop playing
  • Previous and next actions
previous and next actions

  • Switch to full screen, which will expand the image sequence to the entire screen with the list of actions superimposed on the player

To activate the full screen click on the corresponding button

full screen button

This will show you the player on the whole page

player on full screen

When the full screen is activated you can click on the "Actions" button

actions menu

This will display the list of actions next to the video images

list of actions

  • Select an action in the action pane that will be displayed directly on the video
actions of the test

  • Select a sequence moment, directly on the playback bar
playbar

To do this, hover over the player's progress bar and select a capture to display it

overview of the video

To view the details of the report, hover over the "i" to see the information

"i" point for information

The comments in a test are also visible in the video reports.

To view them, move your mouse over the yellow bars representing the comments.

comments in the player


Still require support?
Contact support

Actions menu

The Agilitest action menu is central and allows you to manually declare all possible actions in a test script.

actions line in the editor

Types of actions

Channels button

Channels action

These actions allow you to create, close and modify the current channel of your test. They are integrated directly into the script.

Channel actions

Start channel: This action allows Agilitest to make the link with the application under test.

Switch channel: This action is used when several channels are present in the script. It allows to switch between the different channels.

Close channel: This tells Agilitest that the channel will no longer be used during this test and will close the application.

Navigation button

Navigation actions

In the case of application automation on remote services, Web and Webservices, these actions will allow you to indicate which URL to navigate to and which protocol to select: Web / HTTP, SOAP, REST.

Navigation actions

🔸 Warning

In the case of an execution on the desktop, you will still have to go through the "Browser URL" action by entering the path of the tested application in the Windows Explorer.

Subscript action

Subscript action

This action does not have a drop-down menu because it directly creates a script call action in the script. Sub-scripts do not differ from scripts, both are ats files, only one is called by the other.

There are two ways to use this action:

  • By making a direct call with or without parameters
  • From a CSV/JSON file

Enter text action

Enter text action

The enter text action sends items corresponding to keyboard keys to your application, key presses, with or without additional special keys.

This action is inserted directly into your script. From the action you can set the nature of the action.

Click on the action "Enter text [ ]" to enter a text.

You can write directly the desired text with your keyboard. You also have access to the special keys which have the same functions as those present on the keyboard (enter, space, CTRL, etc...).

Text entry

Also, you can insert special values into your text entry from the special value menu.

Special value button

This will give you access to various values, variables, etc…

Special value menu

mouse button

Mouse actions

The mouse actions are used to manage the mouse on PC applications, but also the specific actions of mobile applications such as the swipe.

mouse actions

This action has a sub-menu including :

  • Mouse click: It performs a click action on an element
  • Over: It simulates the mouse over
  • Drag and Drop: This action contains a sub-menu that completes it:
  • Drag: This performs a hold click
  • Drop: This releases the element. It must be preceded by a "drag" action
  • Swiping: To swipe right, left, up or down with the mouse or by simulating touch for web tests.
  • Scroll: To scroll a cursor or access elements of a page

Check action

Check actions

Check actions are generated for an explicit check or assertion during the test. This can potentially lead to the test failing or allowing it to continue.

Check actions

There are three possible verification actions:

  • Property check: This allows you to check the value of an existing property in the script
Property check

  • Occurrences check: This allows you to check the number of occurrences of an element
Occurences check

  • Values check: This allows to verify that a value corresponds to an existing value in the script
Values check

property action

Property action

The property action allows you, from a captured component, to retrieve one of its properties and place it in a variable.

This variable can then be used to define other dependent variables, create assertions, etc.

Property action

System action

System actions

System actions are only used for a mobile channel.

This action is done in two ways:

  • By using the button action: This allows you to interact with a physical button on the phone (sound setting, home, lock, etc...)
  • By setting the properties: This allows you to define a system property  (sound volume level, phone orientation, enable/disable WIFI, etc...)

Window button

Window actions

The window management action allows you to manage the Windows operating system, Windows desktop modal applications and browser tabs.

It does not allow you to manage the internal windows of some web applications, which are floating HTML elements, directly accessible with the web automations.

A specific menu is also available to manage dialog boxes without adding unnecessary complexity.

window actions

The window action has a sub-menu with three possible actions:

  • Size and location: This moves the window by specifying its new Cartesian coordinates or to change its size (height and width).
  • Window visual state: This allows you to send an event from the operating system to the current window.
  • Switch Window: This changes the current window by specifying the number of the window that should be swapped.

select action

Select action

This action handles specific SELECT components in web browsers or COMBO-BOXES in desktop applications.

scripting action

Scripting action

Scripting is used to execute Javascript code on a component.

It differs from the Java execution action which occurs outside the context of a component (but which can still retrieve variables).

comment button

Comment actions

In addition to simple technical comments, this action will allow you to declare key functional steps in your test.

Comment types

This action has four types of comments:

  • Functional step: This comment indicates an important step in the script
  • Script comment: This comment explains the operations performed by the script
  • Execution log: This comment is functional on strings
  • Report Summary: Allows you to add text to the summary of the generated execution report

Some of these actions can act directly on a component and can be created from an element captured and dropped into the script.

actions available from a captured element

These actions are: Check actions, Mouse actions, Enter text, Property, Javascript and Select actions.


Still require support?
Contact support

Editor presentation

To help you familiarize with the Agilitest environment, here is a presentation of the various elements that makes up the Agilitest editor.

editor interface

Project management menu

projects elements

This menu is situated at the top left of the editor. It allows you to create a new project, to open a git clone, to open a project already in use, to create a new component and to save files on which you are working on.

Create a new component

new component

When you create a new component, Agilitest provides a selection of different types of component :

Create ATS script: To create a new test or a subscript**.**

Create CSV file: To create a data file in order to test various data (Data Driven Testing).

Create a JSON file: To create a data file in order to test various data as well.

Create Java script: To call a Java code extern to Agilitest.

Create execution: To create an execution of your tests to manage the review of all your tests from a project that can be filtered with multiples parameters.

Configuration and help menu

settings and help buttons

This menu, situated at the top right of the editor, allows you to:

  • Take screenshots of your editor directly from Agilitest
  • Have access to the settings of Agilitest
  • Have access to the tools that can complete Agilitest
  • Search for a script in particular in the editor
  • Have access to the help menu

Agilitest settings

Editor's settings

Agilitest settings allows you to:

  • Generate error reporting
  • Parameter the lanugage of the Agilitest editor (french or english)
  • Configure ATS
  • Configure Jenkins
  • To connect Mobile Station or Git accounts

Tools menu

Tools menu

You can improve your experience by adding tools that communicate directly with Agilitest. Among those tools there are:

  • Jasper Report
  • Apache Maven project management
  • FlaUInspect
  • Jenkins server

Help menu

Help menu

From the help menu you have access to:

  • Agilitest archive download link
  • Mobile Station download links (Windows and MacOS)
  • Player ATSV download link
  • Various resources to support your path on Agilitest (documentation, videos, webdrivers, etc…)

Project explorer

Project explorer

The project explorer is a structure tree that lists all the projects and elements they are composed of.

It allows you to have a global view of a project and to bring global modifications as well as to limit the step-by-step method.

From the project explorer’s menu you can modify the view of the tree.

projects views

To know more, you can consult the documentation about the project explorer.

Channels management

Channel management menu is a prerequisite before you start editing a test, it is a central element of Agilitest and that will facilitate the test creation and maintenance.

channels management menu

In this channel management menu you have access to:

  • The Capture tool button
  • The Close button to close the current channel
  • The Play button to play the script
  • The Next button to play an action and the following one
  • The Parameters button to set up the execution management

Script’s variables

The script’s variable menu allows you to create and visualize all the variables that are used in a script.

script's variables menu

This is to avoid having the variables in the script’s core that is only made for actions.

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/609102fd03ae3864a5d425e1_image-24.png

Scripts management

Actions menu

actions menu

The Agilitest actions menu is central and allows you to manually declare all the possible actions in a test script.

In this menu you will find all the agiles actions that are used during a test. It was made to secure the most compatibility between all the devices supported by Agilitest.

This menu is also used to manage different channels used in a test.

Script editor

Agilitest script editor represents a big part of the editor. It shows the actions you can execute on your tests. The editor will propose graphical interpretations of the actions that will be performed on your script. The ATS format is a textual format that will describe all its actions.

script editor

This section of the editor is designed to allow the reuse of components: copy of the actions or elements on which they act on or with subscript creation.

The actions display only shows the principale actions, but all cases can be managed in sub-menu.

https://assets-global.website-files.com/60799032d5e3523ef1cd727c/609102fad3595f83cd52dec3_image-26.png

Script header

The script header menu is used to manage a set of metadata linked to a test, like execution suite for example.

To have access to the script header, open a script and click on the “Script’s header data” button

script header button

You can visualize the ATS script corresponding to your test.

ats code

💡 Tip

This can be useful to copy the information from the script’s header and send it by email or add it to a comment in your bug tracking tool.

You can also have access to the Java code which once it is compiled will allow the execution of the tests.

java code

🔸 Warning

ATS and Java scripts cannot be edited directly in the editor.

To return to the script editor, click on the "Actions" button

actions button

Still require support?
Contact support

What is ATS

Agilitest is an intuitive functional test automation suite designed so that everyone can automate tests.

Featuring a unique approach to functional test automation, Agilitest offers a comprehensive view on the quality of software at all times, on web, desktop, mobile and webservice technologies alike.

In a context where Agile teams and DevOps integration are becoming the norm, Agilitest provides all software testers, whether they have a technical background or not, with an intuitive and robust way to create, maintain and execute automated functional tests.

ActionTestScript, diminutive of ATS is a test language that is structured and readable and understandable by a human being and easily editable by an A.I. used to create reliable and powerful automated test campaigns with a graphical interface.

ATS is open-source under the Apache 2.0 license.

Test scripts are defined by a sequence of «actions» executed on a Web application (Chrome, Edge, Internet Explorer, Firefox), desktop (Desktop), mobile, or Webservice.

Scripts written in ATS are converted into java classes and then executed using Selenium frameworks (for browsers), or by software layers directly implemented for desktop parts, mobile Android and iOS or Webservices.

ATS produces reports in the following formats :

Execution reports:

- Execution report: for a global reading of tests execution

- Detailed execution report (with or without screenshot): to analyse the reasons for failed tests

        - Summary report (pdf): for a global reading of test success in a specialized format        

        - ATSV report: Execution images compiled in a video format (played via the ATSV player)

- Validation report: to document and to archive the implemented executions

ATS is compatible with the widely used TestNG execution format and is compatible with most recent continuous integration systems.

With ATS, test designers focus solely on the functional actions to be performed and do not have to worry about technical considerations.

The link between ATS  and Agilitest

To make ATS and Agilitest work you have to install some prerequisites.

For more information you can consult the documentation on hardware and software requirements.

The link is primarily philosophical: we wanted to make available to all the software test replay technology that is ATS and thus allow possible acceleration of the developments that are linked: dev/ops-related technologies and more generally all those involved in the software production chain are multiple and still in high evolution.

Technically, Agilitest is an editor that produces ATS scripts, but we also put in this editor all the experience of several years of use of automated testing tools. It relies on ATS and benefits from the technical features it brings: readable scripting, step-by-step replay of tests, robustness...

🔸Warning

Agilitest is an ATS code editor, but modifications are not made from the Agilitest editor but with Notepad++, for example.

ATS is maintained by Pierre HUBER, founder of CAIPTURE, publisher of Agilitest. More information by following the link :

www.actiontestscript.com

Still require support?
Contact support

Jenkins integration

▶️ You can find a tutorial on how to use Jenkins with Agilitest on our Youtube channel.

Agilitest lets you automatically install and configure a local Jenkins server, or even connect to a remote Jenkins. It's simple, fast and extremely practical.

You can schedule recurring executions to ensure that all your tested functions are OK or not.

Example:

You can schedule jobs to run every morning at 6 a.m., or every Thursday, or even continuously over a defined period if you wish, etc...

These jobs, which will automatically launch your tests on your Web, Desktop, API or Mobile solutions (emulated or physical terminals), and will be displayed on a highly graphic screen. This is how you gain confidence in the quality of your solutions on a daily basis.

Jenkins with Agilitest

Agilitest can communicate with Jenkins in order to create new Jobs.

Jenkins is the component that allows you to schedule executions while providing access to campaign reports and tracking the success and failure rate for a given job. This is even though ATS is compatible with TestNg and can be deployed on any CI/CD system.

Agilitest offers a reduced panel of the basic options offered by Jenkins. When you want to automate your test execution, you can use Jenkins directly from Agilitest.

Open Jenkins with Agilitest

  1. Jenkins embedded

To open Jenkins in Agilitest, click on the “Executions management” button

executrions management

Then, click on the “Jenkins integration” button to have access to the Jenkins interface in Agilitest.

Jenkins integration button

If Jenkins is not installed :

Click on the Jenkins icon or connect Jenkins from the tools menu

tools button

In the tools, click on “embedded server” in the Jenkins menu,

embedded server button

Enter an available port on your computer, and click on the “Download” button

download button

Once Jenkins is installed, click on “Connect” to connect Jenkins to Agilitest.

connect button

Connecting an embedded server will open Jenkins on your computer, this operation can take a few seconds.

This will open a web page composed of the projects opened by Agilitest.

Jenkins web page

Click on the “Stop Jenkins” button to close Jenkins and stop its process

stop jenkins button

If you simply disconnect, the Jenkins process won’t stop.

The embedded server is useful for creating jobs and executing them on the fly. However,iIt is less secure than a remote server, as it does not require a password to connect.

           2. Jenkins remote

Connect Agilitest to Jenkins with the remote server to execute your tests actually in production.

In remote mode, there is no downloading but you will need to have a Login and a Token.

To connect to that, click on the “remote server

remote server button

In the “URL” part, enter the URL from your open Jenkins page.

jenkins page

The folder path corresponds to the folder in which the Agilitest projects will be stocked.

Enter the name of your choice for the folder

folder path

Then, you will have to enter a Login and a Token.

To obtain them you can find them in your Jenkins page Jenkins Dashboard > Users:

user in Jenkins

Enter the Login corresponding to the one in the Jenkins page.

login in the editor

To obtain the API Token, click on the User in Jenkins and then on “Configure”.

In the “API Token” part, click on “Add a Token” > “Generate

API  TOKEN

Copy the generated Token (it is only generated once) and paste it in the Agilitest editor

api token in the editor

Finally, click onConnect”

connect button

The remote server has a little less options than the embedded server once it is connected. You will have the possibility to connect or disconnect from Jenkins.

Create a Job

Once Jenkins is connected, it can be used to execute Jobs.

To create a new Job, click on the “New Job” button next to the Jenkins icon.

new job button

Enter the name of your Job, add a description and configure the parameters you want.

Create a new job interface

You have mutlitple options:

  • Tools

Use the Git repository: To use a Git repository when a project is already run by Git

Maven Job : To have Maven intervene during the executions

  • Launch

You can also configure how your Job launch

By checking the "Automatic" box, you can decide when your jobs should be launched. Choose one or more days of the week, set the the frequency and set the working hours on a 24-hour format.

Click on the "Continue" button to execute the test several times.

  • Suites list

The list of suites that will be executed in your Jenkins Job can be found in the "Suite list" insert.

Click on the "Add" button and set the suites you wish to execute.

suites list

  • Reports

You can choose to generate the Agilitest reports at the end of your executions.

You can also choose to send an email in order to follow the process of your Jobs.

Parameter a Job

Once the Job has been created, you can set it up again by clicking on the "pen" icon in the Jenkins interface in Agilitest.

edit job button

Select a Job and click on “Execute”.

execute job button

At the end of the execution, Jenkins will validate the test or not.

You can execute your test again directly from the Web page, or from your Agilitest editor, as described above.

You can also configure your Job directly through Jenkins from the "Configure" tab, where you'll have access to all the parameters.

configure in Jenkins

After a first execution, the Job will display a weather symbol representing the status of the Job.

weather status in Jenkins

This weather symbol will also be represented in Agilitest.

weather statue in Agilitest

Below the Jenkins icon are access buttons to:

jenkins buttons
  • Open the Jenkins configuration
  • Open the project’s page
  • Open the Agilitest tools’ window
  • Synchronise your information from Jenkins

Advanced configuration

If test execution needs are massive, then the Jenkins server will not execute any tests at all, and will delegate them to the execution servers via Jenkins built-in/agent communication.

Jenkins allows the use of various communication protocols such as Java Web Start (JNLP) and SSH.

A list of all connected or declared agents can be found in the Jenkins server configuration.

Jenkins configuration

You can also find them in the Jenkins page Dashboard > Nodes

Nodes in Jenkins

It is important to note that a controller can also be an agent.

When an agent is selected, any errors that can be corrected will appear in the "Warnings and information" box.

Warnings and information

Your tests need an agent to be executed, and this agent must have a declared label. In order for the ATS test execution to work, you need the ats-executor label.

If your agent doesn't have a label:

Click on the "Fix" button.

Fix labels

Once redirected to the Jenkins page, click on the relevant agent in Dashboard > Nodes

Agents in Nodes page

Then, click on “Configure”  and enter “ats.executor” in the Labels

configure labels

It is also possible to create a new agent.

To do that, click on “New agent

New agent button

Enter a name and a new folder location

New agent information

Then click on “Download agent” and extract the files

download agent button

Click on “launcher.bat” to connect.

launcher bat file

🔸 Warning

For a launcher to be executed, you must have Java declared in your Windows system.

You also have the option of enabling or disabling an agent.

deactivate button

When tests are launched, they will be executed on the available agents. If you don't want an agent to be used, you can deactivate it.

deactivated agent

Still require support?
Contact support

Web services

In your end-to-end functional tests you can manage Web Services flows directly in your Agilitest/ATS automatic test scripts.

The objective is that you can control the exchanged data or even recover them to reuse them for functional purposes in your automatic tests.

Writing the Web Service call in Agilitest

To do this, simply enter the "Start channel" action with the full http link of your Web Service request:

Example here: http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL

Starting a Webservice channel as a Web channel

Executing this "Start channel" action will automatically open a specific viewer that will allow you to capture all the data you want to check and/or retrieve in this Web Service stream.

Agilitest will automatically detect whether it is SOAP or REST (in which all other types of services that are not SOAP will also be included).

This capture window will communicate all the actions available in the submitted Web Service:

WSDL: obtaining the list of available services

Writing the method addressed to this Web Service in Agilitest

The second specific Web Service action is found on the "Navigation" and REST or SOAP Webservice

Call a REST webservice action
GET function

The REST action is by default GET, but all the HTTP methods of the standard are available: Get, Post, Delete, Patch, and Put.

You can enrich the query either by the method (URL), or by the API parameters, or by the headers, or all in the same time.

 Select the method
And modify Headers and API data

You can manually switch to the SOAP type via the dedicated button:

For all Web Services you can according to your needs.

  • Send requests directly via the method (i.e. the html link in which you have filled in the desired information).
  • Use the "API Data" box to complete, complexify or clarify the query.
Example of a SOAP query with data
  • Use the "Request header" box to manage the headers if necessary.
Add a header

There are two additionnal parameters which you can use :

  • Change port: Allows you to indicate on which port you want to query the webservice.
  • Use the cache: When possible, Agilitest will not make a new request if the requested data is already in the cache.

If you don't know the body of available actions: the Wizdler plugin

If you don't know the body of the Web Service, here is a simple trick to help you analyze WSDL files and generate SOAP messages:

  1. Install the WIZDLER plugin on your web browser (Chrome for example: Link to the Plugin Wizdler here)
  2. Open your http Web Service link on the same browser
  3. Click on the dedicated Wizdler button:

       4. Click on one of the actions available on this Web Service (e. g. CapitalCity) to retrieve the body and paste it into the "API Settings" box.

         5. Do not forget to fill in the related action in the "method" of the Agilitest action

          6. You can even test the action by replacing the default data[string] and then clicking on the dedicated "Go" button and checking the result returned by the Web Service

Capture of data returned by the Web Service

Now that the "method" and the "API Settings" box of your action are filled in, Agilitest will be able to automatically execute the action in your functional flow.

You can capture the query result via Agilitest's capture mode.

Capturing the result of the query
Selection of attributes that identify the element

The "Property" action allows you to reuse the target data returned by the Web Service in your script:

And we get the value in a variable….
indicating which attribute of the element is of interest to us

The recovery of the attribute "value" in this case allows us to recover the Capital of the Country whose ISO code is FR, namely Paris.

The action went well

Note

The Check and Property recovery actions will very often be the most relevant actions in writing your end-to-end functional tests using Web Services.

Example of a SOAP script

Please find here an example of ats SOAP script: SOAP_flag_demo.ats
Right-click on the link above and select "Save link as…" to retrieve the ATS file.

You can add it to your Agilitest project to edit and/or run it.

Still require support?
Contact support
No results found.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.