Category

Create a Bitbucket-hosted Git repository

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

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

How to get your Agilitest licence id ?

How to get your Agilitest licence

Here is all the information necessary to obtain your Agilitest licence id:

  • Connect to the computer where Agilitest is installed.
  • Launch Agilitest and click on the license activation banner at the top
 License activation banner  
  • Display of the license activation popup
  • If the licence is already activated, you will not see the activation banner on the top middle.
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
Still require support?
Contact support

Creating an instance on AWS

A step by step guide to create and setup an Agilitest/Jenkins instance running on the Amazon Web Services (AWS) cloud platform.

In AWS, an instance is a VM (Virtual Machine), a container etc. In our case, the instance will be a VM.

Creating an instance for Agilitest/Jenkins in the AWS cloud.

To create your instance you will go through 7 steps. To start creating an instance, click on "launch instance".

Step 1: Choose your image

Agilitest needs a Windows distribution. In the search bar, enter "Windows 2016" and select the "Microsoft Windows Server 2016 Base" image.


Step 2: Choose the instance type

For the choice of the instance type, a t2.small type will suffice. However, for comfort, I recommend using a t2.large or larger.

After selecting the type of instance you wish to use, click on "next".

Step 3: Setup the instance

For this step, no changes are required to get the instance working. You can proceed to the next step.

Step 4: Storage

The default configuration is sufficient for our instance. You can proceed to the next step.

Step 5: Tags

This step makes it easier to read your instance list. It is not necessary to add tags but it will simplify your reading.

Step 6: Security group configuration

First of all, you will have to create a security group. Name and description are open, it is up to you to fill in the information according to your configuration.
The type field allows you to choose with which protocol you will connect to your instance. The choice of a connection with the RDP protocol is simple and perfectly functional.
No modification is necessary on the protocol and the targeting of the ports.
In the source part, choose "My IP" so that only your machine can access your instance. If you need to access it via another IP address, you can add a new "custom" rule with the IP address of the machine you want to access.

Once done, you will need to click on "review and launch".

Step 7: Launch the instance and create the access key

Click on "launch", a window will open to select or create a key pair. If you already have a key pair, select it. If you do not have one, select "create a new key pair". Give it a name and upload it.
Be careful, you must save your key or you will not be able to access your instance. You can now launch your instance.

Connecting to the instance

Now that your instance has been created, you will have to connect to it. To do this, click on your instance once it has started and then click on "connect". You land on the connection window of your instance.

You will first click on "Get password" to obtain your password.

Here, you will have to get the key downloaded in step 7 via "Browse" and then decrypt this key to get your password.
Your password will not change from one connection to another, even if you stop your instance. So remember to write down your password so you don't have to repeat this step.
You can now download your remote desktop and connect to it with your password.

Installing Agilitest

Once your instance has been created and you have logged in, you will need to install Agilitest.
First, download Agilitest and JDK 10 (required for Jenkins). Then, launch Agilitest from the settings and download ATS settings and java (JDK) settings. Then go to Tools and download Jasper, Maven and Jenkins (embed server version).
If you have a Git you can link it to your Agilitest. To do this, go to "settings", and click on add in git account.


Jenkins Installation

To finish, you will need to connect to your Jenkins. Click on "connect" and then connect locally via a browser to the address localhost:port
In Jenkins, go to Manage Jenkins > Global Tool Configuration and install the JDK 10.
Optionally, still in Manage Jenkins > Configure system, you can add your github server to be able to replay your tests. However, you will also have to link your github to Agilitest. You can do this directly in the Agilitest settings.


Your instance with Agilitest is now ready to perform your first tests.

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:

Personal access token menu
  • 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:

The pipeline menu

Then click on New pipeline and indicate where your Agilitest project code is located and follow the instructions to connect the Azure Pipeline to it.

Select where AzuredevOps will find your code

You can choose to use a preconfigured pipeline for Maven.

Select a maven project

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:
    o Change the value of "goals" to "clean test"
    o Change the value of "javaHomeOption" to "Path"
    o Add a "jdkDirectory" property and specify the path to the JDK on your machine
    o Remove the "jdkVersionOption" and "jdkArchitectureOption" properties
    o Add a "mavenVersionOption" property with the value "Path"
    o Add a "mavenDirectory" property and specify the path of Maven on your machine
    o Add a "mavenSetM2Home" property with the value "true"
  • Your YAML file should look like this:
Sample of a Yaml configuration file

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 tutorials try to cover 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 a client application running on Windows operating systems.


Supported systems:

  • Windows Server 2016
  • Windows 10

Software requirements

The following software requirements are necessary for the AGILITEST solution to work properly.

  • Installation of the Java JDK 11 recommended (may be installed by Agilitest)
  • Installation of the .NET Framework 4.5
  • Browsers: support for the latest versions of browsers and for relatively recent versions for which there is a Web driver. Specific version may be configured as default.
  • Chrome
  • Chromium / JXBrowser
  • Firefox
  • Microsoft Edge
  • Microsoft NewEdge
  • Opera
  • Internet Explorer : V11 supported / only the latest versions (contact us).

Android

Agilitest supports recent Android versions> 5.0.

Support of physical mobiles.

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

iOS

Agilitest supports recent iOS versions> v12.

Support of physical mobiles.

Support of emulators.

Material requirements

The minimum hardware recommendation for using AGILITEST on your client computer is the same as that for the .NET Framework 4.5

  • Processor : 2 GHz
  • Memory : 512 Mo

Global installation: approximately 300 MB of disk space is required

  • Java JDK : 250 Mo
  • Apache Maven : 10 Mo
  • Selenium Libraries + ATS : 10 Mo
  • Selenium Drivers : 26 Mo
  • Adobe Air : 10 Mo

Network

In order to regularly update your agilitest version, you'll need to have a full network access to those sites:

https://api-agilitest.com

https://caipture.com

https://actiontestscript.com

The accesses are done on the ports 80 and 443.

If this is not or partially the case, please contact us in order to obtain a standalone version of Agilitest.

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 :

Visualisation d'un fichier au format HAR (source Wikipedia)

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 therefore developed new ATS actions specific to this integration, you can put URL filters, start and stop recording as well.

Here is the detail of the operations to be carried out:

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>
...

You should know that the performance tag allows you to integrate other configuration elements.

For example, integration with Octoperf will allow you to transmit your HAR files directly into Octoperf projects to carry out load tests.

Les correspondances des paramètres sont les suivants:

  • 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 menu appear on the right side of your screen:

New Performance menu on the right of the possible actions

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

Performance menu

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.

Start channel using performance mode

Click on the third icon at the bottom right.

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

Start channel using performance mode

Add recording functions

Here is the detail of the different functions available:

Settings

Configure network capture.

"Configure network settings" menu

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

  • Latency :  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.

Adding a URL filter 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.

Add a URL filter

Record

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

Network record disabled

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

Restart the network capture

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.

Principle

The principle is as follows:

  • You record a functional test scenario with Agilitest
  • You decide that this scenario is a good candidate for load-up tests carried out with Octoperf: you add the ATS actions necessary for its instrumentation
  • Then you replay this scenario, Agilitest will generate a .HAR file and can 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 therefore developed new ATS actions specific to this Octoperf integration.

Here is the detail of the operations to be carried out:

Activation of the Octoperf mode

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

It is also necessary to activate the Octoperf mode, and the two operations can be carried out at the same time, because you will have to modify 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

Profile section of your Octoperf account

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

API Key
  • 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:

New Performance menu to the right of possible actions

The Performance menu is scrollable and displays the following submenus:

Specific Octoperf actions

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 at the bottom right.

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


Opening of a channel with activation of network functions


Add integration functions with Octoperf

Here is the detail of the different functions available:

Settings

Will allow you to configure the network capture.

"Configure network settings" menu

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

  • Latency : 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.

Adding a URL filter 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.

Allowed URL filter

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.

Recording action: recording is now disabled

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

Resume the recording

Save VU

Action 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:

Modification of the description of the virtual user
  • Modify the description of the VU that will be sent to Octoperf
Backup settings for the virtual user
  • 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 frequently happens that you have to validate a dialog box on WEB supports in order to confirm or cancel an action.

To automate the validation with Agilitest please follow the following steps:

  • Add a "Mouse click" action
  • Click on the "Root of the application" button to select the interface type among the following

A new menu appears:

  1. Interface element
  2. System button
  3. Dialog box
  4. System interface
  • Click on the "Dialog" button"
  • Hover over the item to select the desired answer then click on it
  • Select the type of validation desired on the dialog box:    
  • Accept    
  • Dismiss

Your dialog validation action is automated.

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 want to get quickly started with Agilitest, but you don't know how to do it? Here is an article to help you get started. You can also watch our tutorial:

1. Technical prerequisites

Agilitest is installed on a computer running under Windows operating system.

Here are all the technical pre-requisites you need to know about: https://www.agilitest.com/documentation-agilitest?fuel=Hardware+and+software+requirements

2. Download Agilitest

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

Fill in your personal information and we will go back to you for a short demo before the setup.

Our technical team will give you a link to download the package.

3. Install Agilitest

Once the agilitest.zip has been downloaded, you just need to unzip it in a folder where you have access rights.

Launch the Agilitest.exe file by double clicking on it. Then go to the settings panel.

Click on "Update" of the ATS configuration, it will download the last version of the ATS package.

Update packages

For the java installation, you have two options:

  • Click Download Java Configuration: do it by default if you don't know wether Java is already installed on your machine. It will break nothing if Java is already installed.
  • You can also enter the directory where your JRE can be found if you want to use your own JRE.
Java setup

4. Create a test project

Click on "New project". Select a directory with read/write access on your computer and click OK.

Agilitest will create a new project and a project tree under the selected directory.

Create a new project


5. Create your first test

Click on "New component" at the top left of the editor and select "Create ATS script". Enter the name of your first "helloworld" test.

Agilitest will create a helloworld.ats file in the project tree, under src/main/ats, and will open this file in the editor.

Click on the "Channels" action and select "Start Channel". By default Agilitest will create a web channel in Chrome.

 Start channel

Click on the play button that appears when you place your mouse on the right part of the channel opening action: the action will be launched and Agilitest will open a browser.

Execute this action

Click on the "Navigation" action and select "Browser URL". Agilitest will create a second action to navigate to a URL

Browser URL action selection

Click on the "Browser URL" action which has just been created in the editor and select a website: www.google.com

Launch the action by clicking on the play button on the right.

Now, we are going to recover an element from the google page to perform an action on it: click on the "Capture" button on the right of the editor.

Channels management menu and capture button

Agilitest will give focus to Chrome and allow you to select the elements of your web page.

Sélection du champ INPUT principal de www.google.com

Place your mouse on the main INPUT component of the page and press the CTRL key on your keyboard: Agilitest will open the main locator selection window.

Opening the locator selection window

Selecting a locator allows you to identify which attributes of your component, or its parents, make your component unique on the page. For example, select the "name" attribute by clicking on its selector.

If you click on the "Statistics" button, Agilitest tells you if it has uniquely identified the component.

Identification of a component by its "name" attribute

When your locator is defined, you can drag-drop the component in the editor: click and hold your mouse button in the "Drag and drop in the editor" area

Drag start zone

Move your mouse in the editor area until you see "Create an action" appear: either between two actions, or in the lower part of the last action created.

"create an action" to be able to drop the element

Then release your mouse button: Agilitest displays a menu allowing you to define the action you want to create.

Select "Enter text": a new action is created at the desired location.

Selecting the type of action to create

Click on the new action created on the text "Enter text", and enter the text to search for.

Hello world !

Then, if you click on the play button of the new action created, your Chrome browser will launch a search on the site www.google.com


First action linked to an element of the page

Here is it !, Agilitest works like that. You have the possibility of defining much more complex actions, adding controls, acting on locators and doing similar tests on Windows, mobile applications (Android and iOS) and web services: each time the principle remains the same.

Agilitest piloting an Android application

One last thing: don't forget to close the open channel.

Close the channel

The name of the channel you close is the default opened channel, but don't forget: with Agilitest you can open as many channels as you want on as many different technologies in a single test.

Enter the name of the channel to close if necessary


Still require support?
Contact support

Calls for conditional sub-scripts with Agilitest

Agilitest allows you to call conditional sub-scripts, that is, the evaluation of a condition leads to the call or not of the sub-script.

How to call conditional sub-scripts

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

Then, click on "call script" then "create a condition".

Click on create condition

Agilitest then displays a selection popup of a variable on which the condition is based, which must be a tie.

Selecting a condition

Only one condition can be selected, and it is possible to remove a defined condition by re-clicking on "call script".

Ability to remove a condition

The other call parameters of the sub-script remain the same: you can pass input variables or a CSV file.

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

For now, only equality has been proposed as a condition, and Agilitest will show you in the editor the result of the current status of the call of sub-scripts :

  • green arrow: the sub-script would be called
  • sense-forbidden: the sub-script would not be called
Explicit signaling

We advise you to use this function with a lot of precautions, because it will allow you to integrate non-genericity in your tests, and therefore potentially malfunction related to uncontrolled data.

The cases for which we recommend it are the following :

  • make a call based on a global variable value, this allows you to perform set-up operations based on whether or not a variable is present in the call parameters of continuous integration for example.
  • in a sub-script with a CSV file: call a script according to a parameter of the CSV file passed in sub-script call, this requires you to have a second level of sub-script, but allows you to manage dedicated controls.
Still require support?
Contact support

Element location

In certain particular cases it is compulsory to carry out an operation at a very precise place in the tested software, and where the use of a standard locator based only on the attributes cannot be used.

This occurs for example when the last element whose structure is visible represents a large portion of the screen, for example a large image, and when the clickable area is precise: this may be a web imagemap, an internal component of a desktop application, etc.

The solution provided by Agilitest is to allow precise definition of the point on which the actions will be performed, by specifying its Cartesian coordinates relative to the window of a component.

In the example below, we want to click on California, but the last element visible in the HTML structure is the complete image of the United States.


How to Click California ?

The definition of a Cartesian coordinate locator takes place in two phases:

Select the reference component

You start by selecting a standard type locator, either by its attributes or by graphical recognition.

Sélection de l'image par un locator standard

When selecting the locator, you will see a "target location" button at the bottom of the selection window: click on it.

Sélection of the California area

You can then precisely target the point where the action should take place by clicking on it.

Agilitest informs you that it has generated a locator with Cartesian targeting by adding a target in the start drag-drop area.


Locator with targeting information

If you drop this locator in the editor, Agilitest generates an action with Cartesian coordinates.


Locator with Cartesian coordinates.

Using this feature, it is possible to generate a locator outside of the selected component.

Still require support?
Contact support

Capture boxes on overflown elements

In order not to be intrusive with the tested software, Agilitest will not deploy a plugin on the browsers and will appear as an over-print of the windows of the tested application. In some cases, this can cause display shifts between the two applications, especially when displaying the component selection boxes.

How to deal with overflown element

Symptom: The capture mode of my AGILITEST editor is not perfectly aligned on the page on which I want to record operations.

Check that your Windows System has not automatically made a change in the size of texts, applications and other elements displayed on each of your screens. By name, this parameter must be set to 100% for the proper functioning of the AGILITEST capture. To open the display menu : Right click in the window's background and select "Display Settings".

Set the text size to 100%

Still require support?
Contact support

Data Driven Testing using a CSV file

AGILITEST offers its users to practice Data-Driver Testing as much to configure test campaigns as to adapt a script to its context and optimize test coverage via its dataset.

This goes through a specific function: The Agilitest editor allows you to pass a CSV file as a parameter of a sub-script call. Thereafter, during the replay of the test, the sub-script will be called as many times as there are lines in the CSV file, passing as input variables of the sub-script the values ​​of the columns of each line.

How to use a CSV file for data-driven testing

Here's how to do it:

  • Select the src/assets/data directory in the project explorer
Selecting the src/assets/data directory  
  • Right-click and select "Create CSV file"
  • Enter the name of the CSV file: the file is created empty in the src/assets/data tree
  • Double click on the file to edit it: Agilitest edits your empty file
  • You can click on "Add parameter" to add a column to your file, and on "Add iteration" to add a line.

Add rows and columns

Subsequently, you can enter values ​​directly in the cells that have been created.

Edition of a CSV file
  • Create an action of type "Sub-script call"
  • Drag the CSV file directly from the "Project Explorer" area to your new "Call script" action: Agilitest takes this new CSV file into account when calling the sub-script.

Editing a sub-script call with CSV file in Agilitest

Once this file is completed, you can retrieve the variables in your sub-script by using the $param() function and passing the index of the column of the parameter that interests you.

For example: $param(0) returns the value of the first column.


Example of using the $param() function
  • Tip 1: you can combine $param calls with other text boxes to generate more complex texts. The above example will generate a button identifier "Btn1" from the value "1" passed as input.
  • Tip 2: you can give a default value in the $param function as a second variable, this allows you to use the sub-script as a directly usable script. Btn $param(2,1) will return Btn1 if the script was not called by a parent script.
  • Tip 3: To start testing your script, you can start by calling your subscript by passing hardcoded parameters.
call the sub-script with directly filled parameters

The video below summarizes the steps to create a CSV file and iterate over it with a sub-script.

To go further, you can consult our article on the interest of exploiting data-driven testing with Agilitest and which offers a webinar video on the subject.

Still require support?
Contact support

Element "Not found"

It can happen in test automation that an element is no longer recognized during an execution due to modifications made in the software.  

To fix it, AGILITEST allows direct adjustment of tests in the editor.

Location and analysis

The user can use the video of execution of the failed test and / or an illustrated report to understand and locate the recognition failure. There are then two possibilities:

  • The element initially sought no longer exists in the software tested.
  • The element initially sought does exist but is no longer recognized.

Fix the test

If the element sought no longer exists:

  • The test can be modified by deleting this action directly by "right click" via the test editor.
Delete an action
  • The user checks the previous, linked and following actions in the test execution, if necessary.
  • Save the modification.

If the element sought exists well but is no longer recognized:

  • A modification of the test is therefore necessary via in particular an update of the recognition criteria for this element from the AGILITEST editor.
  • For this AGILITEST indicates precisely which attribute is not found to locate this element.
Find the element not found  
  • Then open the capture mode via the editor.
  • Hover over this item again on the software to be tested.
  • Push the CTRL button to capture the element

Reselection of the missing element
  • Adjusts the detection attributes (it is possible to use "Regular Expression" on each attribute for robustness purposes)
Selection of identification criteria
  • Validate the uniqueness of detection via the incorporated statistical test.

Validation of the uniqueness of the component

Drag & Drop these new attributes on the action concerned by this "non detection" in order to update it.

The new identification is implemented
  • Save the change.
Still require support?
Contact support

Opera and Firefox: channel opening failure

AGILITEST may not automatically locate the installation location of the browsers on which you wish to automate functional tests.

How to locate the browser installation

Relative error message:

To fix this, you just need to manually configure the ATS configuration file accessible directly from the editor via the "Settings" menu> "Edit configuration" button.

Edit configuration

The file will be automatically opened with your default file editor:

You will only have to define the path specifically established on your system to access the execution files of the target browsers ("opera.exe" in our example).

Save the modification of the configuration file.

Close and restart AGILITEST to take the change into account.

The configuration file is also used to configure other functions of the AGILITEST editor. For more information, please consult the installation and configuration section> User guide - Editor configuration

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

Recovering a script

You have the possibility to delete your ATS scripts via the contextual menu of the right mouse click directly from the explorer file tree proposed by Agilitest.

Method to recover a script

A confirmation window of this deletion is then proposed to you:

(The latter informs you that the deleted ATS script will be sent to the Windows system trash.)

If this deletion was an error, you can simply restore the said file via the Windows system recycle bin.

Click on your ATS project in Agilitest to update its content and the restored ATS script will be displayed again:

Comment faire un refresh des dossiers dans l'explorateur Agilitest

The recovered file can be used

You can then edit it, launch it, etc., as if it had not been deleted.

Still require support?
Contact support

IE 11 configuration

How to setup Agilitest on Internet Explorer 11

In order to allow you to use Agilitest on Internet Explorer 11 (available in beta), it will be necessary to configure the following security options as a prerequisite :

Please open the "Internet Options" on your Windows system:

Then select the "Security" tab on the "Properties of: Internet"

  • Uncheck the "Enable protected mode (Internet Explorer restart required)" option on each of the proposed zones
  • Internet
  • Intranet local
  • Trusted site
  • Sensitive sites

Apply the changes and click on "OK" on the warning popup:

A restart of the Internet Explorer browser is required to take these changes into account.

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

PDF 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.

These files can then be used to produce all types of documents for:

  • Analyze the causes of test failure
  • Check that the layout of the screens is correct when changing languages
  • Document the use of the application
  • Present the functioning of an ongoing development to the rest of the team or a client.

There are many uses, which is why we have chosen to rely on an open format (XML) and a document generation engine under free license: FOP

Setting up Agilitest to produce the XML report

In the editor:

In the "Channel Management" tab, select the "Parameters" menu, then "XML Report".

Then, start the test execution.

At the end of the execution, the following files are generated in the directory target/report/<name of the test>_xml/

Actions.xml : file containing the execution metadata

1.png … n.png : as many image files as screens viewed during the test.

In continuous integration:

You must first generate a TestNG execution file.

To indicate that you want to generate the XML report

Select the corresponding execution

Click on the small pencil allowing the modification

Check the XML Report box.

Start the execution of the selected tests

Files are generated in the same subdirectory from the root declared as continuous integration.

Installation of FOP

FOP is automatically downloadable in the "Settings" section of Agilitest, just click on the download button. If you have a special need, perform the following operations:

  • Download FOP (fop-2.3-bin.zip) by following the link : https://xmlgraphics.apache.org/fop/download.html
  • Perform a standard installation
  • Set up your PATH so that the fop executable can be found
  • Open the System Control Panel (type "system" in the Windows search)
  • Select "Advanced system settings"
  • Click on the "Environment Variables…" button, then click on "New…" in the "System Variables" section, then click on "New" to add the path to the installed FOP.

Stylesheet

To produce a pdf file, FOP need a XSL style sheet:

https://en.wikipedia.org/wiki/XSL

based on the XSL-FO standard:

https://en.wikipedia.org/wiki/XSL_Formatting_Objects

This allows you to produce the document in the format you want relatively easily.

We provide a default style sheet to help you in this process. (See link fop_files)

Generation of the pdf file

To launch the generation, you have to:

  • Open a Windows command window ("command prompt" or "cmd")
  • Go to the directory (for this purpose use the command "cd " in the command prompt) in which all the parts useful for generation are located:
  • The style sheet called stylesheet.xml
  • The file generated by Agilitest actions.xml
  • Screenshots of the Agilitest test run
  • The various images and files used by the style sheet (examples are provided in the "file_fop" zip)
  • Enter the command line allowing the generation of the file named "report.pdf":
  • fop -xml actions.xml -xsl stylesheet.xml -pdf report.pdf
  • Press "Enter" to launch the command..

Help files

You will find in the following archive a set of files that will allow you to start : fop_files

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

ATS configuration options are directly accessible from the Agiltiest control panel and some menus (especially in executions).

How to configure ATS?

It is also possible to configure some of the AGILITEST editors' functions via the configuration file.atsProperties accessible directly from the editor via the "Settings" menu > "Edit configuration" button.

The currently allowed settings are as follows:

  • Default number of executions of each action in the editor before deciding on a failure: default set to 10.

<maxTry>16</maxTry>

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

<appBounding>
<x>20</x>
<y>20</y>
<width>1500</width>
<height>960</height>
</appBounding>

  • Management of "timeOut" on script execution and web page loading: set by default to 60ms and 120ms

<timeOut>
<script>60</script>
<pageLoad>120</pageLoad>
</timeOut>

  • Management of access paths to the different browsers and specific timings for each:

<browsers>
<browser>
<name>opera</name>
<path>C:\Program Files\Opera\52.0.2871.40\opera.exe</path>
<actionWait>50</actionWait>
</browser>
<browser>
<name>firefox</name>
<path>C:\Program Files (x86)\Mozilla Firefox\firefox.exe</path>
<actionWait>200</actionWait>
</browser>
</browsers>

  • Management of access paths to the various Windows desktop applications installed on the client machine: A shortcut will be automatically created in the "app" part of the "Start channel" actions of AGILITEST

<applications>
<application>
<name>notepad++</name>
<path>C:\Program Files\Notepad++\notepad++.exe</path>
</application>
</applications>

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

Still require support?
Contact support

Script comments and log

Agilitest allows you to use advanced formatting of comments directly from the publisher.

The format used is HTML, so you can design your comments as you wish.

In addition, you can use the variables in your scripts to make intelligent comments.

There are three types of comments:

  • Script comment
  • Functional step
  • Execution log

Script comment

This comment explains the operations performed by the script, intended for those who will have to maintain it in particular.

 Selecting a comment type in Agilitest

Comments of type "Functional step"

These comments indicate an important step in the course of the test.

They are included in the video and XML / pdf report files

Comments of type "Execution log"

These are functional comments for the testers.

Samples

  1. Bold characters
  2. Underlined characters
  3. Italic characters
  4. Using bullets
  5. Using numbered paragraphs
  6. Clickable active links
  7. Show a screenshot

Below are some examples of these HTML formats of strings allowed with Agilitest:

  • Bold characters :

<b> Bold characters </b>

  • Underlined characters :

<u> Underlined characters </u>

  • Italic characters :

<i> Italic characters </i>

  • Using bullets :

<UL> <LI> Using bullets  N°1</LI><LI>Using bullets  N°2</LI></UL>

Commentary text with bullets
  • Prioritized into numbered paragraphs: :

<OL><LI>Numéro 1</LI><LI>Numéro 2</LI></OL>

Text of the hierarchical commentary
  • Insert an active clickable link (to a bug tracking software like Jira or Bugzilla):

<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1431248">Bug 1431248</a>

Text of the comment containing a link
  • Insert and display a link to a screenshot (which would illustrate the error to correct):

<img src="https://bugzilla.mozilla.org/attachment.cgi?id=8943437" width="300" height="110"/>

Text of the commentary containing an image
  • An example of an advanced comment in the editor:
Still require support?
Contact support

"text" attributes in element recognition

Warning about text attributes

We recommend using the "text" attributes of an item on which you want to automate an action only when you can't do otherwise for the following reasons:

  • The recognition of the item no longer works in a multilingual context of your solution.
  • Some browsers are case-sensitive (and some are not), so a capital letter tends to decrease the robustness and portability of your test.
  • The management of line breaks and / or spaces may differ from one browser to another.

However, these "text" attributes will be the only attributes available to recognize an element.

Once you have selected the "text" attribute, you can click on it to edit the content: we have added some options allowing you an automatic edition of the values ​​with regular expressions useful to prevent the latter issues.

Select an element using its text : click on the regular expression check

Automatically add the regular expression to manage the case in mutli-navigators

After activation: the spaces are replaced by \s* and the string begins with (? i)

Subsequently, AGILITEST will not take into account the spaces and the case on these elements of recognition whatever browsers used to further increase the robustness of your automated functional tests.

Still require support?
Contact support

Channel opening failure

What to do when my AGILITEST editor does not allow me to open a test and capture channel: nothing happens when I open a channel.

Types of channel opening problems

If it's a JDK problem, then:

  • Follow the dedicated user guide available in the User Guide - First Time Installation section to verify that the Java has been installed.

If it is a problem of drivers and / or libraries (file blocked by firewall or antivirus) in case there are two possible solutions :

1- Repeat the operation making sure that the blocking does not repeat (temporary neutralization of the antivirus)

  • Close Agilitest
  • Access the user folder on your machine to manually delete both "drivers" and "libs" folders
  • Re-open Agilitest to force a regeneration of files with the latest versions available in SAAS
Automatic update of ATS components

2- Use the manual package download function to deploy it yourself in the later directories:

  • Via the "Configurations" menu, download the zipped package of Drivers and Libraries
Manual download of ATS components
  • The archive "ats.zip" will be automatically downloaded via your default browser
  • Unzip this archive "ats.zip" which contains the folders "drivers" and "libs" in your own user folder type
  • C:\User\your_account\.actiontestscript
Still require support?
Contact support

Passing parameters to a subscript

One of the most interesting features of Agilitest is the ability to use sub-scripts. This will allow you to factorize common functions of your tests, such as the creation of test data, login, regularly used operations ...

An additional benefit is that you will be able to pass values ​​as parameters to your sub-scripts, and thus make your sub-scripts scalable and generic.

Finally, if you properly manage the granularity of your scripts and sub-scripts, it will also allow you to have test scripts that are not too long, readable and easy to maintain.

Start by building a test with hardcoded values and no subscripts

The sub scripting action has been designed to make it scalable

Just start by modeling your test script : create actions, declare variables. At some point, you will realize that you have generated something that can be reused.

Then select the actions which interest you to create a sub-script, and drop them into a directory of the Project Explorer. Agilitest then asks you the name of your new script, creates it in the designated directory and generates the call of this sub-script in the original script. You have nothing else to do.


Selection of 4 actions to generate a sub-script
Enter the name of the subscript
The subscript is created and its call is directly generated in the calling script

I want to be able to pass parameter

Your new subscript contains all the actions that interest you, but for the moment it will realize all the time these actions with the same parameters.

Obviously, what interests you is to be able to modify the values ​​to use your sub-script in several possible configurations.

The most appropriate way to do this is to edit the subscript and modify the parameters of each action to "variabilize" them.

Variables that are passed to subscripts can be retrieved from them using the function: $param(value, default_value).

Thus, if you edit your script by replacing the hardcoded value with $param (value, default_value), you can both variabilize your sub-script but also use it with the values ​​you declared when it was created, as you can see in the sample below :

Action with a hardcoded value text=2
Edit the action
Enter the parameter value and keep the default value


The value you will use as the first parameter of the $ param() function is the index of the variable in the calling array of the subscript function.


Now that you have changed all the parameters in your sub-script, you need to modify the call parameters in the calling script.

Get back to your subscript call function  

Subscript call function without parameters


... by clicking on it, a popup will open and you can add a parameter

.

Add a parameter to a subscript call
Enter a parameter's hardcoded value
Je passe une valeur en dur (3) comme paramètre 0.
You can also enter a variable value
or enter special values
Passage de 4 valeurs dans un appel de sous-script


4 values passed to a subscript call

Finally, you will be able to add as many parameters as you want  to your subscript call. For each of them, the index number of the  parameter must correspond both in the calling function of the calling  script and in the $param() function of the sub-script.

How to get the result

To retrieve the result of a subscript, you must first declare a variable in the Variables tab, menu, create a variable.

Declare a new variable

The created variable is purple, ie modifiable by the user.


Then you drop the variable into the subscript call function, and it appears as a return variable, orange and unmodifiable.


Declare a variable returned by a subscript

Subsequently, you must make sure that your subscript will return a return value.

In the editor, you can add this return value by clicking at the bottom  left of your sub-script on the button "Add a return value"

Add a return value
Enter a return value
Many return values are allowed



Return values ​​are populated in the calling script

You then retrieve the return values ​​directly into your calling script.

If your script does not pass or does not return value, or does not use them, Agilitest and ATS wont stop the test.


These features will allow you to use your sub-scripts by entering the   parameters hard, and in this case you can recover return values.

Data-driven testing

You can call your sub-script several times by entering the number of iterations you want

Calling a subscript with a fixed number of iterations

This is useful when you have a function that can be used several times  in succession, for example a "back" function that returns to the  previous window, which will allow you to check your UI's behaviours.


You can also ask Agilitest to iterate over the lines of a CSV file  and invoke a subscript by passing the values ​​of the columns as input  variables. You do not get return values, but you call your sub-script as  many times as you want.


The important thing to remember in this article: This feature will allow you, once your tests done in a simple way, to extract reusable sub-scripts, and then to give depth to your tests.  testing your software with a wealth of data. Keep in mind that a  software is bug-free until a client has found a runtime configuration  that you have not tested, and this often involves using exotic data...


Still require support?
Contact support

Channel management

You can watch our tutorial or you can go through our documentation about channel management :

We make the distinction between the actions to manage the channels in the ATS scripts, which is the subject of this documentation and the management of the channels in the editor to make operations of capturing graphical elements that you can read here .

In an ATS script generated by Agilitest, there is always only one active channel at a given time, and all actions are directed to that channel.

It is therefore imperative to start a channel before creating any action.

Start a channel


Actions to manage channels in ATS scripts

The start channel action allows you to select the application that Agilitest will launch for you, you have several possibilities:

  • Open a browser among those proposed
  • Open a Windows Explorer
  • Open a desktop application defined in your configuration
  • Open a mobile app (Android or iOS)
  • Open any .exe application.
  • Open a Webservice

Then it is best to rename the channel you have opened so that it can be referenced in the following actions. This is done by clicking on [ex.new-channel].

Open a channel with Chrome

Switch channel

The "Switch channel" action allows you to switch to another channel identified by its name.

From this action, all the following actions will be directed to the specified channel.

Switch to Firefox channel

TIP : The starting of a new channel directly activates this one.

Stop a channel

Stopping a channel tells Agilitest that this channel will no longer be used during this test, and will close the application.

Connect a channel to an already launched application

A small trick: if you want to connect a channel to a process already existing in your operating system, you can use the process:// command completed by a regular expression to find your process in the list of processes already launched.

For example:

process://.*notepad\+\+\.exe

Connection to an existing process

Channel management menu

This documentation is about the menu that allows you to manage the different action input channels when debugging tests, another article deals with channel management actions.

The channel management menu is on the left, below the project explorer

The channel management menu with a Chrome channel in progress

It has several icons whose functions are as follows:

Capture: This action is only possible if you have already opened a channel, executed the open action and possibly navigated to the page or web service you are testing. It allows to enter in capture mode and select elements on which to carry out actions.

Close: This action allows you to cleanly close an open channel, ie close the application and indicate to Agilitest that it is closed. Agilitest is not intrusive (no plugin), it has no way of knowing that you have closed an application directly through the actions of the operating system (click on the cross icon of the window for example) . It is therefore imperative to always use this action to close an application opened by Agilitest.

Run: This action starts a complete run from the current action. If you are not sure about an action to start a test, you will get the following message:

Agilitest error message

In Agilitest, all scripts can be sub-scripts of other scripts. In the editor, it is impossible for Agilitest to determine the beginning of a test, so you must indicate by which action you want to start your test in the editing and debugging phases.

Next: This action executes the selected action and moves on to the next action. So you can run your test in sequence, step by step. This action is equivalent to the action of executing each action displayed to the right of the current action in the editor.

Parameters: This action displays a submenu for selecting the current execution settings in the editor.

execution parameters window
  • Animate: allows you to replay the test by animating the actions that are performed (moving the mouse, clicks, text entries, etc.).
  • Visual Report: The visual report has the same result as the animation, but as a video report: an ATSV (ATS Video) file is generated in the /target/reports directory. It is not necessary to set the replay in animation mode to obtain 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 /target/report/>test_name> directory. They can then be manipulated to produce all types of reports, including a pdf report using JASPER, as well as a style sheet that you have customized. Producing an XML report activates the generation of a visual report.
    • Run in reduced mode: This hides the Agilitest editor during the execution of the test, and thus to better see the tested application. It's quite useful if you use Agilitest on one screen.
    Agilitest execution in reduced mode


    Still require support?
    Contact support

    Window management

    You can watch our tutorial or you can go through our documentation about windows management :

    When an application opens a window, Agilitest can not determine if the capture should take place on this window or if it should stay on the current window. It depends on how the designers of the application wanted to do it, if the window is modal, non-modal, aso.

    So we have added a whole set of functions that allow to handle correctly all types of situations involving multiple windows, or browser tabs, which we will also consider as windows.

    The Windows menu


    The current window

    When there is only one window in the application, all the actions that are carried out are sent to this window. When an application has several windows, you have to define a current window. This is very similar to what we did with the current channel : all the actions that are performed are on the current window.

    The concerned Windows are real OS windows : you might have a very complex Web application that manages several windows in a browser without having to change windows.

    Change current window

    Switch window action

    This function makes it possible to change the current window by indicating the number of the window concerned. Generally, the number 0 corresponds to the main window of the application, and the following numbers are in order of appearance of the windows (or tabs in a browser).

    Size and location

    A size and location action

    This action allows you to move the window by specifying its new Cartesian coordinates, or to change its size: height and width.

    All you have to do is activate the parameters that you wish to modify by clicking on the yellow stars, and then enter the desired values.

    This action will act on the current window.

    State of the window

    This action will allow you to send an operating system event on the current window. It works the same way as if you had clicked on one of the icons in your application, (top right for Windows).


    Windows icons on Windows OS

    Agilitest menu to send events to windows

    Possible actions are:

    • Close : close the current window
    • Maximize : enlarge the current window to the maximum
    • Reduce : reduces the window

    Powerful actions

    All of these actions will allow you to act precisely on the configuration of windows in your application.

    In some cases, this can cause problems:

    The forced positioning

    If you set the windows of your application always in the same position, you may not see any bugs depending , in which case we recommend letting the applications use the screen space as they please, and possibly run the tests on screens with different sizes.

    Obviously in some cases, it is useful to force a specific configuration, if you use graphic recognition for example, since unlike an approach related to the structure of the application (DOM, Desktop), graphic recognition will act on the elements that are actually visible on the screen.

    Direct intervention on the application

    Closing the current window will get rid of a bulky popup.

    But we do not recommend closing the main application window (unless you want to control an alert popup).

    To do it properly in Agilitest, use the channel close action.

    Close the channel


    Still require support?
    Contact support

    Text input

    You can watch our tutorial or you can go through our documentation about text input :

    How to use the text input

    The Enter text action can be accessed directly from the toolbar, or by dropping a locator in the editor:

    Create an Enter text action using the menu...
    ... or create it by dropping a locator

    In both cases, a submenu allows you to enter the text you want :

    Type your text

    A set of additional keys allows you to use special keys when entering text.

    The menu allowing to Insert specific values

    You can use the menu allowing you to insert a special value, variable, etc.

    Obviously, to see your text appear in the tested application, the interface element on which you perform this action must accept text entries from the keyboard. However, Agilitest will not forbid you to do so on a wrong item, the final operation will always depend on how your application reacts.

    Send text on a link is possible, even if nothing happens


    Still require support?
    Contact support

    Mouse actions

    You can watch our tutorial or you can go through our documentation about mouse actions :

    How to use the mouse actions

    The mouse actions are usable for all applications, including for mobile applications (the click corresponds to a tap on the screen).

    The menu is accessible directly in the toolbar, or by dropping a locator in the editor:

    Mouse menu in the Agilitest editor...
    ...or by dropping a locator

    In both cases, the menus are identical.

    The possibilities of actions are as follows:

    Mouse click

    By clicking on the edition of the generated action, you have access to a sub-menu that allows you to select the type of click you want to generate: left click, scroll wheel, right, double-click, and pressing the key CONTROL or SHIFT.

    Mouse clic menu

    By default the click is in the center of the element.

    However, you may want to click on a staggered area or on another element whose Cartesian coordinates you know relative to the selected interface element.

    For this, you can select a corner, or side of the element from which you will specify a cartesian offset.

    The positive coordinates always define a point inside the element. For example, if you select the right / top corner and an offset of 10 in x and 10 in Y, the point of the click will be inside the bounding box of the interface element, 10 pixels to left and bottom of the top / right point.

    Cartesian coordinate click

    Hover

    Hovering lets you indicate that you want to fly over a specific area of ​​the screen.

    For example, this allows you to activate drop-down menus.

    In this case, the positioning in Cartesian coordinates also works.

    Hover a specific cartesian coordinate

    Drag, swipe, drop

    The drag, swipe, and drop actions simulate a movement of the mouse during which the left mouse button is held down. Actions must be performed in this order:

    • Begin with a drag action by defining the element from which the user wishes to start his left click and maintain it.
    • Insert zero or more sweeping actions: definitions of scan areas that are visited by the mouse with the mouse button held down.
    • a drop action by defining the element on which the mouse button is released.

    This action is very often used to perform drag-drop operations between several windows of one or more applications.

    Drag, drop, swipe actions

    Scrolling

    The scroll action simulates a rotation of the mouse wheel causing scrolling of the displayed page. In the case of a mobile application, the scrolling results in a swipe action of the screen (swipe).

    In both cases, Agilitest is used to indicate the number of pixels scrolling up or down. This number is positive if you want to scroll down.

    To be effective, the selected interface element must answer to a scrolling action. You can perform this action on the main application window by not selecting an interface element.

    Scroll action using the application root  

    The action is usable on sub-windows, DIV, which have scrolling options, by selecting the element including the desired window.

    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.

    We have developed new ATS actions specific to Neoload

    Here is the detail of what is available:

    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 menu appear on the right of your screen:

     New Neoload menu on the right

    The Neoload menu is scrollable and displays the following submenus:

    Neoload submenus

    Here is the detail of the different functions available:

    Start

    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.

    Starting a Neoload user scenario

    Stop

    Tells Neoload to stop the current user journey.

    Terminate a user path

    The options available on the action:

    • 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.

    Action to create a Neoload container

    Recording

    Record activation / deactivation action

    This action activates and deactivates the recording in Neoload.

    Resumption of recording in Neoload
    Still require support?
    Contact support

    Desktop automation

    We will see how to automate software solutions developed and compiled under Windows.

    IAgilitest natively supports these solutions, thanks to a specific Desktop driver.

    How to launch the software?

    Just create an action to open a channel and then click on the icon to select an .EXE file.

    Select a .exe file

    Agilitest then opens a file explorer allowing you to select your executable file.

    Then everything is working as on web technologies: you switch to capture mode to select components:

    Capture items on a desktop application

    Pressing CTRL allows you to select a component and display the locator selection window:

    Select the locator for a Desktop Component

    In this case, the components that are displayed are not elements of the DOM as on the Web browsers, but correspond to the Widgets used to build the graphical interface of the desktop application.

    The identification of a locator to uniquely retreive the component in the page works however the same way. In the case of a Desktop application, there may be AutomationId generated by the  framework  of component  used to develop the application.

    Select a component in a submenu

    To select a sub-menu component, it may be useful to use the SHIFT button, which temporarily pauses the capture mode to navigate to the desired sub-menu component: If you press SHIFT, the events of navigations are directly sent to the tested application.

    To create an action in Agilitest, you just have to drop the element in the editor, starting from the "drag drop into editor" area of ​​the locator:

    Start to drag to create an action

    You create an action by dropping the component at the desired place in the editor: at the end of the script or between two actions. Just make sure that the "Create an action" menu is displayed in the right place.

    Create an action

    The Desktop typed action is then inserted into the editor.

    Desktop action created

    To go further

    Configuring 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 displayed automatically in the action start channel, allowing you to open it directly.

    Prefered application Notepad++

    Using a Desktop Locator on a Web Applicatio

    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 corresponding to your browser.

    Favorites button in Chrome

    If you want to test your application on several Web technologies and several browsers, we do not recommend using this mode, since you will be able to activate non-DOM components, specific to your browser, and thus cause a malfunction on other browsers.

    Activate the Desktop selection

    To select a Desktop Locator on a web application, simply press the ALT button while in Capture mode: Agilitest will switch from the DOM view to the Desktop component display. You can also click on the "Sys (Alt)" button at the top of the capture window.

    Just press ALT again to return to the DOM selection.

    This 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.

    Select a file to upload



    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 update

    Agilitest is a software solution that automatically updates itself at launch. And there is usually a new version every week.

    Our philosophy is to be responsive to the needs of our customers and our installed base.

    In addition, Agilitest supports the latest versions of browsers, and this is absolutely necessary to check their changes and update our drivers (see the info on Chrome 74).

    ATS and the Agilitest editor

    At launch, Agilitest starts by updating the open-source ATS library.

    ATS is the open-source library that manages all the interfaces with the technologies supported by Agilitest and replay the tests written in ATS format.

    This update will insure that the Agilitest editor will use the very last version of ATS.

    Then the Agilitest editor will update itself : A splash screen will inform you that a new version is available, and propose you to update it.

    Update proposed at launch

    You also see the content of the new version: it includes the following elements (so far in French):

    Ajouts : These are new features not related to existing functions.

    Evolutions : New features related to existing functions & functions extensions

    Corrections :  Functional bug fixes, feature fixes, technical improvements.

    You can refuse the update

    Obviously, you can refuse the update, but know that the impact is quite limited since it concerns only the editor and its features: the update of ATS is automatic.

    I want to use a specific ATS version

    Stabilizing the use of a specific version of ATS is quite possible by referencing the ATS library you want.

    We do not recommend this because the changes in the editor and ATS are closely related, but we consider that this feature may interest some customers. In general, you may not have access to some recent features developed in the editor.

    Modify project properties

    To indicate the desired ATS version, just click on the modification of the properties of a project (icon with the key in the project banner).

    Modify project properties

    If you want to let Agilitest manage the dependencies and automatically download the required libraries for the selected version, you can check "Use Maven with Agilitest". Otherwise, you will have to manually move the version into your .actionTestScript directory.

    Finally, when the ATS version of the installed components is not that of your project, Agilitest indicates you by information panels present in the properties tab and in the project explorer's project banner.

    Projects using different versions of ATS

    What should I do?

    We advise you to systematically update your version of the Agilitest editor and the ATS library that it uses.

    It may happen that you refuse to finish a short test and then update your editor later.

    I want to reset my configuration

    Here's how to reset your configuration :

    1/ Uncheck "use Maven" in the properties of your project.

    2/ Delete both libs and drivers directories (in your user directory under the .actionTestScript directory).

    3/ Close and restart Agilitest

    4/ Check that the libraries are well updated at start and downloaded in the configuration tab, otherwise buttons will allow you to download them.

    Editor's settings correctly updated
    Still require support?
    Contact support

    Testing non-nominal behavior

    When performing your functional tests, you will have to set up checks that correspond to the correct functioning of your application, by checking that the elements that must be displayed are correct. Generally it is quite simple when the software works in a nominal way because you only have to select the elements that you need.

    In some cases, it is also necessary to check that non-nominal operation cases do not occur. And it can be difficult to replicate this type of failure case when the software is running in a nominal way.

    How to test non-nominal behavior

    We will see a tip that is not usable in all cases, but that can help you in certain situations.

    In our example, the page we are going to test must display a pdf file. In nominal mode this file is displayed using the internal viewer of your web browser. The code used is similar to this one:

    <object data="agilitest.pdf" type="application/pdf">

    In nominal mode you get the following result:

    Viewing a native pdf in Chrome

    When viewing a pdf file produced by an application which may be different from one case to the next, it can be very difficult to verify that the pdf is displayed well: the content may be totally different from one publication to another and sometimes you do not really know what to look for.

    It becomes interesting to check that the case of non-display of the pdf does not occur. But here it is: how to simulate it if my page works correctly.

    The trick is to go directly edit the page in Chrome to tell him to open a pdf document that does not exist.

    Just click on F12 to display the HTML code of the page:


    Opening the HTML code edition in Chrome

    The code displayed is as follows:

    <div align="middle">
    <object data="agilitest.pdf" type="application/pdf">
    <iframe src="https://docs.google.com/viewer?url=agilitest.pdf&embedded=true">
    </iframe>
    </object>
    </div>

    Then just change the name of the file, for example by adding a letter and press ENTER: Chrome will interpret the new code and display the result: This display corresponds to the one you will get when the pdf file is not correctly generated and is not available.

    Result displayed when the file is not found

    You just have to do a graphical control on a part of this display representative of an error case:

    Switch to capture mode and select a portion of the displayed message, then drop it into Agilitest to create a check on occurences

    Be sure to set that the number of occurrences of the image must be zero which corresponds to nominal result.

    In this particular example, we used graphic recognition because we want to control the display of an internal pdf viewer to Chrome. It is possible that for your particular cases, you can treat this final control only with internal elements, (DOM or structure of your Android or iOS application) displayed in a nice error popup.

    Still require support?
    Contact support

    Test modification / execution

    The Agilitest editor is very particular, because it allows you to replay the tests and modify them at the same time, with the granularity of a simple action.

    This allows you to go to the basics when it comes to changing a test or to maintain them, these activities are necessary to make live your test base, but obviously you must spend the least time to focus on the essentials: increase functional coverage or depth of your tests, do exploratory testing...

    Step by step

    Agilitest allows you to replay actions independently of each other. Just click the play button that appears at the top right of each activable action when you hover over it.


    Play button at the right

    Agilitest will then immediately perform this action on the tested software and return the result to you.

    Element not found in the page

    In this case, the element could not be located and the action failed: it is then necessary to modify the locator of the object if it still exists, or to modify the test more in depth.

    This operating mode allows you to run your test step by step by successively selecting the actions one after the other and thus check the progress of each action.

    It is also very powerful to set up the tested software in a context on which you know that you will be able to continue your test edition.

    For example: click on a URL navigation to return to the launch of the page.

    Breakpoints

    The easiest way to modify an existing action or insert an action at a given location is to set a breakpoint.

    To do this, simply click on the small STOP button at the top left of your action.

    Setup a breakpoint

    Then you run your test by clicking Play in the Channel Management tab.

    Run the test

    The test will then run to the breakpoint and stop just before playing the action.

    Execute in reduced mode

    If you select the reduced mode execution in the channels management tab, the Agilitest editor will be reduced to let you better see what is happening in your application, it can be useful if you only have a single screen.

    execution in reduced mode

    Whatever the selected execution mode, you just have to enter the capture mode to select a new component or recover the locator of the component causing a KO.

    Select a new locator

    Then you can check that your action is going well step by step.

    The action was successful

    Java run mode

    The step by step mode is a special mode dedicated to the editing / modification of tests. ATS has been designed to generate java code to run compiled tests, which is particularly suitable for launching continuous integration tests, or running full test campaigns in Agilitest. It is fast and efficient.

    Still require support?
    Contact support

    Javascript code calling

    Agilitest allows to call javascript code on a component that has been captured.

    This differs from a java call that is more like a subscript call.

    In both cases, you must be informed that it will be possible to modify the elements of the software that you test, and thus to break appart from the operation that you are supposed to control.

    In some cases, it is very practical, even necessary: ​​We will see the case of the slider.

    The next image shows two sliders that originally have a value of 50.

    When manipulating a slider, it is quite complex to set a precise value only by using mouse movement actions, as shown in the example below, the two sliders display different values ​​for the same swipe of 100 pixels to the right.

    Drag a drop of 100 pixels to the right
    move of 100 px: sliders have different values

    What is the issue ? If you perform a test based on move of 100 pixels and subsequently the value of the slider is critical to the success of your test, you become dependent on the implementation of the slider.

    In this case, javascript is particularly suitable, since it will allow you to set a value directly on the slider element by modifying its internal variable value:

    value=75;

    t's hard to make it simpler...

    We set the same value on both sliders

    We see on the two sliders that have different sizes that it allows to set the same value, no matter the movement of the sliders, which are different.

    Values are identical

    Visual checks

    You can modify the style and therefore the color of the elements you test, for that you just have to modify the style object:

    style.backgroundColor="green"

    Modifiez le style d'un élément

    This will allow you to display visual controls in ATSV files or XML reports produced by Agilitest. It might be useful...

    The slider became green

    A complex check built into the page

    In some cases where you have to perform a complex check on your page, it is quite possible to code this check in javascript code loaded in the page, and then call the javascript function in your test by retrieving the value returned to do a simple check.

    This is not an optimal situation because you may have to manage development code including this function and production code with the hazards that it may cause, but it can lead to complex situations to deal with.

    For that you just have to declare a global function in a SCRIPT tag of your page:

    <SCRIPT>
    function checkpage() {
        ....operations...
        if (condition) {
           return true;
        } else {
           return false;
        }
    }
    </SCRIPT>

    Then just call it from your Agilitest editor, referencing a return variable, on which you will only have to perform a value check.

     Call and check a javascript check function  
    Still require support?
    Contact support

    Using Variables

    You can watch our tutorial or you can go through our documentation about using variables :

    User-friendly management

    Our approach: to produce software that allows people unfamiliar with development to perform automated software tests, we have thought a lot about the idea of variables and how to implement them in Agilitest.

    We decided to implement them so that they do not impact the progress of the actions performed by the tester. This is why there is no calculation action, update action, nor transformation of variables action in Agilitest. All of these operations are managed in a separate tab dedicated to variables management.

    This behavior makes it possible to reserve the edited part of the script for the actions on the components of the tested applications and for the checks that are made, and facilitates the understanding of the tests.

    The variables management tab in Agilitest

    To simplify operations and avoid errors, we defined two variable origins:

    -the orange color variables that come from the UI and elements of the tested application, and which are non-editable.

    -the purple color variables that are declared by the user or created from orange non-editable variables, they can be edited and modified

    These two kind of variables can be used to declare new purple variables.

    The set of variables of a test is thus an assembly of trees of dependencies of variables, Agilitest and ATS will automatically update the variables dependent on other variables when they are modified.

    Thus, the user must only worry about recovering values ​​on the elements of the pages or screens tested and create dependent variables, and he knows that, anyway, the values ​​of the set of dependent variables that he has declared will always be up-to-date with the current context of the test performed.

    This mechanism allows a lot of flexibility and ease of processing for people who are not used to computer development.

    How to create a variable?

    There are several ways to create variables in Agilitest:

    Environment variable

    Environment variables are declared in the executions of your project, in the "Execution Parameters" tab.

    Just select an execution, then you can add a new parameter and change its value.

    Management of the execution parameters

    NB: These variables are necessarily declared as strings of characters and can not use functions of modifications which are accessible for the other variables.

    To use them in your scripts, use the function $env(parameter_name), for example in the case above, $env (browser) will display "chrome"

    Editable script variable

    These variables are created in the tab "Current's script variables" by clicking on the menu and selecting "Create a variable".

    Creating an editable script variable

    You will create a purple, editable color variable. You can then give it a name and a value.

    As soon as your variable has a value, it will appear to the right of its name. This allows at any time to check the values ​​of the variables of the current script.

    If the variable is not declared correctly and Agilitest can not assign a value to it, it displays an error message besides the name of the variable.

    Error in declaring a regular expression

    To set the value of the variable, you can use the "Insert special value" menu to the right of the input field, which gives you access to all categories of variables that can be used in Agilitest.

    Insert special value menu

    These functions are accessible to define all the editable variables you will need, they can be concatenated to generate a more complex value.

    Here are the main functions to access it:

    • $env(parameter) : Returns the value of an execution parameter defined in the current execution.
    • $var(variable) : Returns the value of a variable
    • $param(index_param) : In a subscript, returns the value of a variable passed as a parameter by giving its index.
    • Random String: Returns a random string indicating the desired number of characters and its case. the function is used like this:
    • $rndstring(10) : generates a string of 10 random characters
    • $rndstring(15, low) : generates a string of 15 characters in lower case
    • $rndstring(8,upp) : generates an uppercase string of 8 characters
    • Unique Id : Returns an identifier in the format Universal Unique Identifier, it is used like this:
    • $uuid : generates a UUID, example: 110e8400-e29b-11d4-a716-446655440000
    • Now : Returns a string indicating the current time of the computer that replays the test (or the continuous integration server), it is used like this:
    • $now : server time, for example: 17:38:11
    • Today : Returns a string indicating the current day of the station that replays the test (or the continuous integration server), it is used like this:
    • $today : server day, for exemple : 08/30/2019
    • Project identifier : Returns a string that identifies the project containing the file ats, it is used like this:
    • $pgav : com.functional.Test(0.0.1)

    Non-editable script variables

    These variables are generated from elements from the tested applications, using the "Property" action.

    This action takes as input a UI element that will have to be captured, as well as the name of the attribute of this element that interests us.

    Retrieving an attribute from an element and reusing it in a SOAP call.

    These variables are orange and can not be changed.

    A script containing editable and non-editable variables

    Advanced use of variables

    Agilitest allows you to transform a variable in 5 different ways to facilitate the calculations.

    • Strings
    • Regular expressions
    • Date
    • Time
    • Numeric

    Strings of caracters

    By default, all variables are strings.

    The type of a variable can be modified at creation by clicking on the corresponding button.

    Variables transformation

    The transformation of a character string makes a page appear according to the type that will allow to manage it. If you click on the "Cancel" button, your variable becomes a string again.

    We will take two variables that will serve as an example.

    date :  8/9/2019
    time : 11:34:33

    Declare two variables

    You can concatenate variables in string format with each other and with text.

    For example, if you create a variable $day, and you give it the value $var (date)_$var (time), its literal value will be 8/9/2019_11: 34: 33


    Regular expressions transformation

    Regular expressions are used to split strings to generate variables that correspond to subgroups of characters

    The regular expressions management menu asks you for a model that must match to your original value.

    This template has parentheses that define the subgroups and are used to determine what the value of the variable will be. Selecting group 1 will give the variable the value that corresponds to the model defined in the first parenthesis.

     Retrieving the date from the variable day
    Retrieving the time from the day variable

    Date transformation

    It is possible to perform date calculations to obtain a later or later date, in a day, a month etc.

    From the entered value, selectors allow you to add or subtract days, months, years

    The original format supported can be m/d/yy or yyyy-mm-dd

    The date obtained can then be used in regex variables to retrieve the day, month or year.

    Declaration and usage of date variables

    Time transformation

    It works the same as date transformation, in this case 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

    Declaration and usage of time variables

    Numeric transformation

    Variables transformed into numeric are used to handle integers or decimals in the format nn.nnnnnn

    The input format can be a decimal number respecting this format, but also a decimal number whose separator will be a comma.

    Declaration of a numeric variable

    It is possible to use standard operators to do calculations:

    • + : addition
    • - : substraction
    • * : multiplication
    • / : division  

    The most common mathematical functions are implemented : sin, cos, tan, power, ln, etc.

    For very specific cases where you would have special operations to perform, you can call java code by passing some values ​​in parameter and then recovering a variable on which you can put a control.

    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 we will create a variable that will retrieve the specific value in the Android column.

    We 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

    We can add 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.

    The check function

    Everything goes through the function "Check", which 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 occurrence 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.

    Check properties

    In the example above, we select a SPAN with an "id" equal to "cwos".

    We then check its "text" property which must be equal to 4.

    The verification function will perform the comparison considering both parameters as strings; and accepts regular expressions.

    Check values

    This function takes as input a variable that can be modifiable or not.

    The operation is then identical to the "Check properties" action.

    Check occurrences

    The occurrence check controls the number of items found on the current page using an Agilitest locator.

    Indeed, in some cases, it may be useful to define locators which can match multiple elements. This allows for example to control the number of rows or columns of a table.

    The "Check occurrence" action is also very useful for adding more robustness to your tests.

    Check occurences

    Check occurrence 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. In the example below, we are waiting for a processing to be done by checking its "progress bar", and comparing it by the one to be displayed at the end of the processing.

    Graphic control before moving on.
    Still require support?
    Contact support

    Java code calling

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

    In some cases, however, it is useful to call external code to perform a specific operation specific to the customer environment.

    We will see in this article how Agilitest can call a piece of java code, passing input variables and retrieving output parameters.

    Obviously, we recommend all the usual precautions in the use of external code java, because as it allows to do everything, it can also have an unwanted impact on the SUT (System Under Test).

    In terms of portability, the .ats code that Agilitest produces is transformed into java for execution. You can therefore consider that the java code that you will write will be portable on the various platforms supported by ATS.

    What, write some code!

    Let's go !

    For starters you will generate the stub of your java code in Agilitest by doing the following:

    • In the Agilitest Explorer, select the java directory in src / main at the same level as your .ats files
    • Right-click and select: New java script.
    • The editor opens a popup to request the name of the script, enter the name of your script and click OK.
    • The editor then opens a java code editing window and, after the necessary and useful declarations, displays the function that will be called: testMain().

    public class test extends ActionTestScript{
          public void testMain() { }
    }

    Parameters

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

    To do this, you must click on "call the script" or on the small pencil that appears when you hover over the action, then click on "add a parameter".

    Passing parameters to a java sub-script call in Agilitest

    Then you can enter the values ​​you want to pass to your script, and you can use all the possibilities offered by the Agilitest editor for that: use variables, values ​​in "hard", iterations on a .csv file.

    To retrieve them on the java code side, you have the function getParameter(int), which takes an integer corresponding to the index of the variable in the call of the subscript: getParameter(0) will return the first value passed in settings.

    String param1 = getParameter(0).toString();
    int param2 = getParameter(1).toInt();
    double param3 = getParameter(2).toDouble();
    boolean param4 = getParameter(3).toBoolean();

    Recovery of results

    The results are retrieved symmetrically on the call.

    It requires the declaration of variables in the Agilitest editor, which will be of the unmodifiable type (by the user).

    To declare return variables, do the following:

    Variable declaration in Agilitest
    • Declare a new variable in the variable management menu in the left-hand side of the editor.
    • The type will be modifiable by default (violet).
    • Name this variable
    • Drop it directly into the subscript call action
    • Agilitest will change the type of variable to make it unmodifiable by the user (orange) and indicate it as a return value from the java call
    • Subsequently, you can use this variable in your script
    Declaring a variable returned by a script

    To set a return value on java side, you have the function returnValues​​() which takes all the values ​​you want to return:

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

    Obviously, the number of returned values ​​must match the number of variables declared on the Agilitest editor side.

    Exécution of the code

    If your test includes a Java script, it will be necessary to compile it before running the test. At the time of this compilation, your potential syntax errors will be highlighted. You can find out more about the compilation of tests and the configuration of the executions.

    Once your project is compiled, you will be able to run your test, and the java actions as if it were Agilitest's standard actions: step-by-step (Agilitest action by Agilitest action) and mode run in the same way, with each java action running in one go.

    If your java code is a little complex, and you want to debug it, step by step will be possible provided you have assigned a Java debug port in agilitest and have an eclipse or intelliJ type IDE.

    Still require support?
    Contact support

    Regular expressions

    You can watch our tutorial or you can go through our documentation about regular expressions:

    Regular expressions are very powerful for performing operations on data, extracting subsets or recognizing patterns.

    We allow their usage in several places in Agilitest:

    Component recognition

    In Capture mode, when you have selected a component by pressing the CTRL key, you can then click on the attribute of interest to select its value.

    How do I match a UUID?

    In the case presented above, we have only one cd_frame_id_ attribute whose value will eventually change over time since it is a UUID.

    We can allow Agilitest to recognize it simply by clicking on the "Regular Expression" checkbox and entering the following regular expression in the property value: [0-9a-fA-F]{32}This regular expression indicates that we are going to look for a 32-character string, consisting only of hexadecimal characters.

    Entering a regular expression

    Afterwards, a statistics request allows to recognize the element in a unique way in the page:

    The uuid is recognized

    Thanks to the regular expression, the value of the uuid can be modified, but as long as it remains a 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.

    Checking up

    It is possible to use regular expressions in the action of checking object properties or variable values.

    In the case below, we use the same regular expression as before to check that the format of the cd_frame_id_ property is indeed that of a uuid. Obviously, we use another way of identification to find the element (here id = examples-iframe).

    Checking the format of a uuid

    Manipulations of variables

    Finally, it is possible to use regular expressions to perform operations on variables, with the objective of recovering certain sub-parts of them. We use the notion of capturing parenthesis, associated with a group number: the complete regular expression is decomposed into sub-expressions surrounded by parenthesis, it is then possible to retrieve the part of the variable we are interested in by its group number corresponding to the number of the parenthesis in the global regular expression. In the example below, we have retrieved a complete text that includes a price we wish to check.

    Recovery of the raw text containing a price to be checked

    Using the following regular expression:

    (\d),(\d)\ €(.*)

    We can retrieve successively:

    • The price in euros corresponding to group 1
    • The cents after the comma corresponding to group 2
    • The additional text corresponding to group 3

    Recovery of pennies

    Finally, what is the use of regular expressions?

    You will have understood: the use of regular expressions will allow you to surgically target the different elements of your tests: components, variables, values and add a lot of robustness during their execution. For people who are not familiar with them, after the first errors and the surprise of the discovery, this technology is actually quite simple to use and allows you to do a lot of things without writing a single line of code.

    Still require support?
    Contact support

    Graphic recognition

    How graphic area recognition works

    Graphic area recognition is used in Agilitest to allow:

    Here's how it works:

    At any time when you are in "capture" mode, you can identify a rectangular area of ​​the application tested by drag-drop.

    The selection of a locator

    Select a graphical zone

    Agilitest then displays the image you have selected and allows you to copy it, save it, or go directly to generate a locator using it, by activating the display of the element tree.

    Display the selected image

    When you click on "Element Tree", Agilitest will display the structure of the software or DOM to the smallest element that completely contains the selected image. This operation will allow you to ensure a unique identification of your image that could be printed in several places of your software.

    Indeed, without selecting a locator, you can end up with an image present in several places, just use the magnifying glass tool to realize it:

    2 similar images found by the magnifier without additionnal locator

    To fix this issue, simply select the parent elements and their attributes to generate an additional locator and drop the whole into a new action of the Agilitest editor.

    The final locator including an image and DOM elements : one image

    If during this selection phase of the locator you click on the "Statistics" button, Agilitest will temporarily hide the capture grid so that you can recognize the graphic component in the page.

    The final locator selection

    Just after the drop in the editor, the generation of a new action is performed and displayed. It contains a link to an image that is saved in the src/assets/resources/images directory.

    The final locator in Agilitest

    And the files in the project explorer

    You can view all the images that have been used in your project by selecting the "Show resources images" menu of the project explorer:

    A view of all the images in one project
    Image recognition menu

    The image search menu that you get by clicking on the image in the editor allows you to add the following information:

    • Using a non-unique locator to identify occurrences, then select through an index the image uniquely.
    • You can affect the graphical recognition tolerance and the algorithm used. For the moment only the ATS algorithm is proposed and we advise you to keep the default tolerance (0.5%).

    Graphic assertions

    Occurrence assertions will allow you to add controls on the presence of graphical elements in your applications, to count them, to generate wait-for timers, and so on.

    To achieve them simply drop the graphic element in an action of type "Check of occurrence".

    Check on image occurences

    However, we must pay particular attention to this control of occurrences: Agilitest will check the images that are actually displayed on the page (unlike a DOM approach that can potentially trace objects not displayed).

    In this case, it must be ensured that the window is correctly sized and displayed to allow complete recognition of the elements.

    Still require support?
    Contact support

    Web drivers

    Why Agilitest need Web drivers

    Agilitest is a software solution installed on your computer and regularly updated at launch.

    The objective is to make available as quickly as possible new features for our customers, to correct bugs present in the solution, but also to adapt to the evolutions of the browsers that we support.

    In the facts, without additional configuration, Agilitest currently supports 5 browsers: Chrome, Firefox, NewEdge, Opera and Internet Explorer in version 11.

    Our philosophy is to provide support as soon as possible to the latest versions of browsers, and this is why we use the web drivers to communicate to the browsers : we can provide a very quick support as soon as the Selenium drivers that we rely on are updated on these latest versions.

    Therefore, the update of Agilitest will bring with it the latest version of the driver and will drive the latest version of the browser, and generally you have nothing to do because:

    • If you update your browser, it should be done without impacting the operation.
    • If you do not update it, well, it is often possible that the latest driver provides backward compatibility with previous versions of browsers, and in most cases, it goes well.

    The Chrome update 74

    Except that it did not go as planned for Chrome 74: The update of end of April 2019 and chromedriver Selenium brought a break of compatibility with Chrome 73. And since that date, it somehow happens with new versions.

    To enable our customers to update their version of from one version of Chrome to another, we have made it possible to deploy alternative configurations do not announce the official support.

    For example, currently, Agilitest can drive Chromium and an extension of it, JXBrowser, an embeddable browser in a java heavy client.

    How to proceed

    Adding new browser versions to Agilitest requires the configuration of the editor in the .atsProperties file.

    To set up a new browser, insert the following lines into your .atsProperties file:

    <browser>
    <name>chromium</name>
    <driver>chromiumdriver</driver>
    <path>D:\tools\chromium\chrome.exe</path>
    </browser>

    The name tag allows you to name the browser as it will be printed in Agilitest. A certain number of names are reserved because we adapt to the specifics of each browser: chrome, firefox, etc. You will therefore only be able to modify the driver and the path of the executable for a browser already known to Agilitest.

    The driver tag tells Agilitest what is the name of the .exe driver to load (in the $ user /.actiontestscript/drivers/directory)

    Here are the links of the drivers for Chrome, Firefox, IE , and Edge

    The path tag indicates the path of 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 than 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 is no need to add a driver change.

    To specify what is the MSEdge path, you may use the following lines:

    <browser>
    <name>msedge</name>
    <path>C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe</path>
    </browser>

    Still require support?
    Contact support

    JXBrowser support

    What is JxBrowser?

    JxBrowser is an application layer for integrating modern web pages, containing HTML, CSS and Javascript, into Java applications. It allows building GUI of your cross-desktop application using any popular HTML5 UI toolkit. You can also use recent HTML5 toolboxes to produce java applications running on multiple platforms. JxBrowser is based on the open-source Chromium project that includes the source code and libraries written by developers in the Chromium community.

    How to setup JXBrowser?

    Configuring JXBrowser requires adding a new driver-browser pair to your Agilitest .atsProperties configuration file. This file is by default in the following directory: your user directory, followed by .actiontestscript).

    You must add a <browser> section as follows:

    <browser>
    <name>jx</name>
    <driver>jxbrowser</driver>
    <path>C:\Program\path_to_jxbrowser_based_application\app.exe</path>
    </browser>

    1. <name> is the name you want to print in Agilitest
    2. <driver> : Download the latest Selenium driver for Chromium integrated with JXBRowser, available at:

    https://sites.google.com/a/chromium.org/chromedriver/

    The drivers directory containing the correctly renamed chromedriver driver

    3. Unzip the driver file and copy the file "chromedriver.exe" into the installation directory of Agilitest drivers (by default: your user directory, followed by .actiontestscript/drivers).

    4. The file "chromedriver.exe" should be renamed by the name of the driver you gave in your configuration file (in this case jxbrowser.exe, but you can give the name you want as long as it does not impact the Chrome driver and the .exe file matches what is configured in the .atsProperties file).

    5. <path>: path to the executable that launches your JXBrowser application

    6. The configuration of JXBrowser must allow remote debugging on port 9222. (https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013082-remote-debugging-port)


    Still require support?
    Contact support

    Connection to an existing process

    Different modes of launching applications

    Agilitest is a multi-channel solution that allows you to connect to multiple channels simultaneously for different types of applications:

    • Web Channels: Chrome, Firefox, IE, Edge and Opera: by opening a channel on one of the browsers, then by performing a navigation action on a URL.
    • Desktop Channels: All types of applications compiled for Windows. Just select the executable file directly in the opening action of the channel (.EXE).
    • Android Channels: All applications running on Android devices, including those offered by the operating system. In this case, the selection of the application goes through a connection to the terminal via "ATS Mobile Station", which then allows access to the list of all installed applications.
    • SOAP or JSON web service channels: the web service is selected when the channel opens, and navigation allows you to call specific services.

    My application does not fit in any of these cases !

    For each of the situations described above, it is Agilitest that launches the tested application because it is its nominal operation.

    In some cases, it is not possible to have Agilitest launch the application to test, this can occur for example in the following cases:

    • Launching an application with a .bat file initializing environment variables before launching the .exe. In this case it is not possible to run the .exe directly. (in fact you can use an Agilitest java call to do it).
    • Launching the application on Windows startup by a service. However, the application must have a graphic window on which to act.
    • Using a specific Windows application to perform certain operations as part of a general end-to-end test (for example: Explorer.exe).

    The solution

    To use an existing process as an Agilitest test channel, the trick is to identify it among the processes running on the test machine. Here's how to do it:

    • Create a channel open action
    • Specify the name of the process to hang on to starting with process://

    The use of regular expressions is possible to specify the name of the application concerned, for example:

    process://.*notepad\+\+\.exe

    Connect to an existing processus


    Still require support?
    Contact support

    File selection by browsers

    Why select files from a browser?

    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 in test automation

    This causes two types of problems while automating this procedure in a test

    • Issue 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 ...
    • Issue 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 multi-channel solution

    Agilitest is an integrated test solution that supports the use of different application technologies (web, desktop, ...) within the same test. We will use a DOM-desktop failover.

    The issue 1 is easily handled by Agilitest and here is the solution:

    • Open a channel on your application and run your test up to the download part.
    • When the file selection popup opens, simply press the "ALT" key on your keyboard to switch from the DOM component recognition mode to the desktop component recognition mode. There, you will be able to navigate in your window of selection of the file.
    • At the end of the selection of your file, you can close the modal window and use the "ALT" key to switch back to the web part with a DOM.
    Selecting a file on the user's computer from a web application

    Tip: For more robustness, we advise you to set a file in an easily accessible tree of your filesystem and that you can reproduce everywhere, for example in "quick access" under Windows Explorer.

    Solution to Problem 2: Agilitest knows how to handle the specific behavior of browsers

    Issue 2 is managed with Agilitest using sub-scripts set up via a data-driven testing (CSV) data file in the following combination:

    • Calls of a first sub-script fed by the parameter "navigator" in column of the file CSV. We recover the name of the browser to iterate the launch of the same test on several browsers.
    • Calling subsequent sub-scripts whose name is composed from the "browser" parameter of the first sub-script. For example: script_chrome.ats, script_opera.ats, etc. We use the name of the browser to customize the name of the executed script.

    The proposed solution makes it possible to manage the differences of behavior of browsers. However, we do not recommend that you use it for the following operations, which are handled directly by Agilitest for all browsers:

    • Navigate to a URL, prev, next, home ...
    • Closing the window
    • Tab change

    This would make your tests non-generic, which is not desirable.

    Still require support?
    Contact support

    Wait function

    The problem of non-constant waiting time

    Some applications are dependent on external elements to be able to continue their processing: waiting for a response from a server, waiting for the results of a calculation, waiting for the full display of a page that may depend on the implementations of the browsers, etc.

    This poses a problem when performing the functional tests: how to correctly manage this waiting without causing a situation of failure of the tests and without spending too much time waiting?

    The solution is not to wait a given time to continue the test, for obvious reasons: you do not know how long you'll have to wait. In addition you will completely pollute your database of automated tests by sprinkling here and there waiting times sometimes useless, which will considerably slow down the execution of all your tests.

    That's why you will not find a "wait" function in Agilitest ...

    The Agilitest solution: make a "check on occurrence"

    What is it about ?

    An Occurrence Check is an Agilitest action that verifies that there is one or more items present or missing in the page or software being tested.

    This solution will tell Agilitest that you want to control the number of occurrences of an object in your application.

    The action checking the occurrences of an object in Agilitest

    It is applicable in the following situations:

    • We want to wait until the page has finished loading to continue processing. In this case, we can perform an occurence check on an item that will display at the bottom of the page at the end of the upload.
    • We want to wait a modification of the page which will remove elements already printed. In this case we perform a check on occurrence equal to 0 (absence check) on an item which must disappear before continuing the test.

    In both cases and as long as the conditions of success of the check on occurrence are not met, Agilitest will start to consider itself "in a situation of potential failure" of the test, and will therefore multiply the controls to avoid generating a false negative.

    At the end of its control, Agilitest will produce a test failure situation, unless, in the meantime, the conditions for successful check are met, and therefore the items we were expecting are either present or have been removed.

    The option "Max trials" in Agilitest

    The trick is to tell Agilitest how many tests it will have to perform to wait for the conditions of the check. This is done by selecting a number of max tries that he will have to perform before considering "to be in failure" on this action.

    Each action has the ability to wait and retry multiple times. This greatly contributes to the robustness of the tests when you know that your server may be in a situation of not delivering the desired page immediately.

    The maximum number of trials is limited to 50, but the waiting time between each test follows an exponential curve: this allows to quickly check the conditions of success when they are present, but also to wait "a certain time '' for a long treatment to be done.

    Using this solution we could even ask to wait until the end of a trailer on an Android application broadcast video ...

    How to still wait for a fixed period?

    There is always a solution with Agilitest, and in this case it involves using a piece of Java code, here's how:

    • In the Agilitest Explorer, select the java directory in src / main at the same level as your .ats files
    • Right-click and select: Create java script.
    • The editor opens a popup to request the name of the script, enter wait and click OK.
    • The editor opens a java code editing window, paste the following code in the function testMain ():

    try {
        final int ms = Integer.parseInt(prm(0, "1000"));
        Thread.sleep(ms);
    } catch (Exception e) {}

    • Drag-drop the "wait.java" script from the Agilitest Explorer to where you want to call it in your test.

    TIP: If you want to be able to specify the wait 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) {}


    Still require support?
    Contact support

    TestNG execution

    You can watch our tutorial or you can go through our documentation about execution report:

    TestNG is a framework that was created to run tests in Java, which is the basis of ATS executions produced by Agilitest.

    Apart from the specific execution / editing mode of the Agilitest editor, we have developed a compiled Java runtime mode which is faster and intended to be used for a test or group of tests. in a project.

    As we will see, the executions are created in Agilitest, can be executed by Agilitest, but are also exportable to TesNG compatible environments that will be able to replay the tests without requiring complex configurations.

    To create a TesNG runtime in Agilitest, go to the project's strip level in the project explorer and click on the gear wheel.

    Enabling the executions menu

    Manage project executions

    Agilitest will open a new tab with several parts:

    • The Project Builder: Allows you to configure, generate, execute, and optionally produce the corresponding reports and open them. The operation of the project builder is discussed at the end of the article.
    • Command line: Agilitest shows you the command line that you can use if you want to start ATS execution from a command prompt on Windows. This command must be started at the root of the ATS project. You can copy these elements to a .bat or .ps1 file to run all the executions you have configured without going through Agilitest..
    • Executions: This is the configuration menu for TestNG executions whose operation is explained in the next paragraph.

    The executions

    An execution corresponds to the definition of a subset of the tests of a project that you will be able to replay at one time.

    To define an execution, click on the "Add" button in the executions tab.

    Executions defined in a project

    Then, enter the name of the execution to create, you will see it appear in the run tab.

    A set of options will allow you to define the quality of the reports produced when launching the run.

    Agilitest will generate a corresponding .exec file in the /src/exec directory.

    The executions directory

    This file is in the TestNG standard and is a filter on all the tests of a project, as well as instructions for executing the corresponding test campaign.

    You have several options for defining this subset of tests:

    Add scripts to an execution

    Add scripts directly to the "Scripts" tab: Drop the ATS files directly from your project explorer to see them on your tab.

    Select packages

    Indicate which are the directories in which to get the scripts, and which ones are not concerned.

    Sélection du package api

    The "Packages" tab presents all the directories of your project and allows you for each directory to define if the ATS files that it contains must be included or excluded from the selection.

    It is not necessary that the files have been added beforehand in the script tab.

    Transversal selection by groups

    Test groups allow you to filter tests based on the groups with which they are associated.

    The group menu allows you to define new groups and select groups to add or exclude from a execution.


    Managing test groups in executions

    Execution parameters

    The execution parameters are variables that you will define for a given execution and that will appear as environment variables in the set of tests that are affected by this execution.

    Adding environment variables to an execution
    Using the environment variable in a script  

    The environment variables will allow you to manage different runtime environments, which will however use the same test base.

    Reporting configuration

    By clicking on the little pencil that appears during the overview of the executions, you can select a number of parameters to manage the level and quality of the reports you want to produce.

    The pencil to enter the modification of the parameters

    Here are the different options that are proposed:

    Logs level

    The different log levels are as follows:

    • Silent
    • Error
    • Info
    • Warning

    They are ordered from the least verbose to the most verbose.

    XML Report

    If you decide to produce an XML report, it can be directly converted to pdf by Agilitest.

    Visual report

    Indicates the quality of the ATSV video reports you will generate. The different options are:

    • Off : no report generation
    • Size : optimize the size of ATSV files
    • Speed : optimize the report generation speed
    • Quality : optimize the quality of generated reports
    • Max quality : optimize everything
    Generation and Quality Reporting Options

    Start an execution in Agilitest

    Once your execution is created or selected, you can do the following at the project builder:

    The project builder

    Generate: generate the java files corresponding to the selected ATS tests.

    Compile: compile java files corresponding to the selected ATS tests (includes the "generate" phase).

    Execute: Agilitest will open a console and replay all the selected tests in the run. (Includes the phases "generate" and "compile").

    There are two possible options:

    • Open the TestNG report at the end of execution: opens the report produced by TestNG.
    • Generate the pdf report for each test and open the generated reports (as well as replayed tests).
    Still require support?
    Contact support

    Manage execution suites

    You can watch our tutorial or you can go through our documentation about scripts management:

    How to manage execution suites

    Execution suites are very useful for defining test selection criteria that differentiate tests from each other, or to bring them together by identical domains: functional, importance and priority during replay, typing, execution environments, etc.

    These groups of executions are independent of the directories in which the tests are recorded.

    To define a group, go to the executions of the project and click on "Add" in the Groups tab.

    Groups of a project

    Subsequently, the group becomes accessible to all the tests of the project.

    Add a group

    To affiliate a test to a group, simply open the tab "Script header data"

    Script header data

    All of the script information is then displayed along with the available groups for that script.

    Just select the desired group and save your script.

    Selection of a group

    Subsequently, this group can be used to define a run, and your test will be replayed automatically when the run is replayed.

    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.

    To access it, click on the "Page" icon at the top right of the editing window of your script.


    Script information access menu

    You will then see a submenu whose activation will modify the display of your editor according to the information to display:


    Sub menu to access script information

    Actions

    You return to the display in the test actions editor. By default this possibility is not activated.

    Header

    You access the information in the script header:

    Script header

    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 that will be reproduced as such in the ATS script: requirement numbers, and so on.
    • Prérequisite : what are the links with other files, or the availability of environments, etc.
    • Groups : the groups to which the test is affiliated.

    ATS code

    Display of the raw ATS code corresponding to the test being edited.

    This menu allows you to copy the code of the test to send it by email to a correspondent who can replay it.

    This tab does not allow direct editing of the ATS code.

    Copy of the ATS code in the ATS tab of the editor

    When receiving an email or file containing ATS code, the procedure to import it into Agilitest is as follows:

    • Create a new empty script
    • Select the ATS code in your email editor, notepad, etc ...
    • Drop the code directly into the empty window of the Agilitest editor
    • Agilitest will read the code and regenerate the corresponding actions.
    • Then click on Run ...

    Java code

    Display of the Java code generated during the execution of the test. Obviously, the java file that correspond to the ATS files of the tests can not be modified directly.

    Affichage du code java

    Close

    Closing the script, allows you to save it if it has not been saved.

    Still require support?
    Contact support

    Settings menu

    The Agilitest configuration menu is the first page to visit just after an installation.

    Here are the different elements that you will find there:

    Language configuration

    This menu allows you to select the language used by the Agilitest interface. It requires a restart of the editor to be taken into account.


    Language selection in Agilitest

    ATS configuration

    Agilitest needs an up-to-date ATS library to work.

    This menu allows you to download the latest library and is correctly configured by default: just click on the "Update" button.

    If you want to get this library to position it in a specific directory, you can click on "Download ATS Components": you will get a .zip file that you can uncompress wherever you want.

    Finally, the "Change configuration" button will allow you to specify in detail how you want Agilitest and ATS to interface with your applications.

    ATS configuration menu

    Java configuration

    Java is required for running Agilitest, in a fairly recent version.

    This menu allows you to download the latest version we recommend for using Agilitest. It is correctly configured by default.

    The additional configuration is for those of you who want to call java code in Agilitest actions and use their debugger in an eclipse or intelliJ type IDE.

    The debug port is the one you need to configure in your editor. You can also ask Agilitest to wait for the connection to your IDE when the channel starts. Be careful not to check this option if you do not have an IDE present because you may not be able to open your channel if the IDE does not respond.

    Java configuration menu

    MAVEN configuration

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

    MAVEN configuration
    Still require support?
    Contact support

    Capture tool

    You can watch our tutorial or you can go through our documentation about the capture tool:

    The Agilitest capture tool is an essential component of the solution that allows you to select which UI elements to capture and re-use in the tests as action targets. Detailed presentation of this tool dedicated to the autonomy of the automation engineer, and the robustness of the tests !

    What is the capture tool?

    During the course of a manual test or an 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 on which to interact so that the test clicks on the right button, or the right interface element.

    The Agilitest capture tool - also called locator - 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.

    In practice, 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.

    It's the same capture tool that allows you to capture the HTML tags of the DOM 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 that we love.

    Opening the locator

    The Agilitest Capture Tool should not be run blank when you open the software, as it requires you to open the application on which you want to run it. Logically, to capture an element, you need an application on which to capture!

    To begin, you need to create a project and then create a new ATS Script component. Then you need to create a channel open action, such as a Chrome browser channel. You can perform this first action with the button to the right of the line.


    "Capture" icon on the left side of the Agilitest window

    After opening the channel, you can finally open the capture tool with the magnifying glass "Capturer" icon located in the banner at the bottom right of Agilitest.

    Using the locator

    The Agilitest capture tool is composed of a "Capture Window". Its first button toggles between the HTML capture mode (for web apps) and the system capture mode for desktop elements. At the top right of this window, you will find the x, y coordinates of the cursor that can be useful to define eccentric clicks relative to the targeted element.


    The Agilitest capture window (top left)

    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).

    The Ctrl key is used to capture the overflown item. There comes the second window "Parents of the captured element" which displays the captured element (at the bottom) and which traces all its parents to the root of the application. These parents unfold in accordion, and we can check the attributes that we want to retain to perform the detection of the element. These attributes are class, id, name, or even CSS attributes for web applications. Or, they can be of the TitleBar, Button, TabItem type for desktop applications.


    Parent window of the captured item. Note the "Statistics" icon at the top

    Finally, the "drag-and-drop icon" in the editor allows you to use this detection rule in the element in an Agilitest action. You can drag and drop either after the last lines of the test (tooltip Create an action) or within an action line in the "Interface element" part.

    Advanced features of the locator

    Statistics on the captured item

    On the "Parents of the captured item" window, the Statistics button allows you to check if the checked attributes allow you to recognize the item uniquely on the page.

    A click on the "Statistics" button confirms or invalidates the uniqueness of the checked element according to the chosen detection rule

    Depending on the structure of the application, it may be normal to recognize several elements from the same detection rule (for example several menu items) and we can then specify in Agilitest which to retain by its index number.

    But in general, it is better to uniquely identify elements, and to use id where possible.

    Regular expressions (regex)

    Regular expressions can be exploited in the Agilitest capture tool to match attribute parts.

    For example, some JavaScript libraries are known to randomize parts of id or classes. If we look at an id written "btn-XYhSj02-01". We guess that the first part "btn" is fixed and the second part "01" also, only the central part is likely to vary.

    We can then match this id with this regular expression:

    btn -.{7}-01


    Ability to enter regular expressions instead of textual values

    The use of regular expressions brings an additional layer of difficulty, but their use makes it possible to treat simply the most delicate cases. The difficulty associated with regular expressions is therefore a lesser evil.

    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. If it is not advisable to abandon the capture system by HTML attributes, the graphic recognition is complementary in specific cases of use.

    For example, when the desired element has no id or exploitable class, graphical recognition is exploitable. And again, even on applications that are less well endowed with attributes, tips exist.

    When the application includes Java, Flash, or 3D code embedding, the capture tool will not always be able to dive into the application tree to present the different interface elements in a structured way. In this case, graphical recognition allows you to perform actions or checks even in the presence of uncooperative programming framework with Agilitest. Learn more about graphical recognition.

    Why we developed such a tool

    Simplicity first

    Agilitest is a simple product that can be used by a functional validation team that is not expert in software development.

    As a result, anything that involves a developing technical background, or is too difficult for a non-expert, is discarded.

    For the development of this tool, the KISS paradigm naturally applied to propose a simple and powerful tool.

    Locator Agilitest vs. developer tools

    Some web developers may wonder what the point of the Agilitest capture tool is compared to the developer tools panel offered by browsers with the F12 key.

    The question does not arise for long as the Agilitest capture tool is on a higher level:

    • 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 doesn't just fly over the elements, it allows you to fine-tune the detection rules and test their uniqueness on the application screen;
    • The Agilitest capture tool offers graphical element recognition in addition to HTML attribute recognition.

    Locator Agilitest vs. XPaths

    Many test software applications use XPath as the query and element detection system in an application.

    Detection is often assisted, and allows a relative ease in the creation of an XPath expression. The latter is therefore created and used, often without the automation or the functional tester have had the opportunity to read it and review it in view of their knowledge of the application.

    And actually ... it's often better like that as XPath expressions generated automatically can be heavy to read by a human being. And when the application evolves during an update, these XPath expressions break very often, resulting in a KO test and a need for maintenance ... until the next update of the application! This is especially true with Javascript frameworks (such as ExtJS) that randomize element ids making their use difficult.

    This in our opinion is two reasons not to use XPath technology in Agilitest:

    • No XPath expressions automatically generated without revision of the automation engineer or the functional tester
    • No systematic test KO after updating the application.

    Finally, the Agilitest capture tool seems to us more simple and pleasant to use.

    Conclusion

    If we were to summarize the main strengths of this locator, it would be its simplicity for the user regardless of the technology used, and the robustness of the tests achieved through its use.

    Still require support?
    Contact support

    SELECT components / combo boxes

    You can watch our tutorial or you can go through or documentation about select components :

    Agilitest native manages SELECT components in HTML and combo boxes for desktop applications. This is necessary because these components have a graphical interface and a particular behavior: it is a matter of selecting one or more values from a drop-down list.

    A SELECT HTML component

    There are 3 possible options to select a value :

    Selection options in Agilitest

    Index selection

    The index corresponds to the position of the desired value in the drop-down list, starting from the top and beginning with 0.

    Simply check the Index box and enter the desired value, obviously this index must not exceed the number of values proposed -1 otherwise no text will be selected.

    Selection by text

    In this case, the text will be selected if it corresponds to a possible option proposed by the SELECT.

    This makes sure of the value used, but it still needs to be proposed.

    Value selection

    The value attribute is an additional value that is provided in the HTML code and that is related to the displayed text. This allows you to select a text, but to retrieve the value.

    Again, this value must be proposed for the corresponding text to be selected.

    Still require support?
    Contact support

    Project explorer

    The Agilitest Project Explorer represents a physical file tree that you will find on your computer as it is.

    We made this deliberate choice for several reasons:

    A test corresponds to a file ATS, readable and modifiable, it is thus interesting to have this correspondence to be able to use them directly from your operating system.

    This organization will  allow you to manage your files in folders and sub-folders without any big complexity, and it makes it possible to manage a very large number of tests.

    Finally, we are ourselves on a MAVEN-type tree, so that we can take advantage of the ability to manage dependencies so that they are always up-to-date with ATS, and people who wish to use it with Agilitest can do it simply.

    Tree Example in the Project Explorer

    The contents of the directories

    Here is the detail of the main useful directories that make up the project explorer:

    • libs : this directory can integrate non-MAVEN-dependent libraries that you want to use with your test project.
    • src\assets\data : contains the CSV files used to variabilize your scenarios and do Data Driven Testing.
    • src\assests\resources\images : this directory stores the images used for graphic recognition.
    • src\assets\resources\lang : this directory includes the different translation files you use (for example in your video files)
    • src\exec : contains the executions files that you have created with Agilitest. These files can be used as is by Agilitest or your continuous integration environment compatible with TesNG.
    • main\ats : contains your tests in ATS format, and subdirectories that you have declared. The number of .ats files in each directory is indicated.
    • main\java : contains the java code files you want to call from your ATS scripts.
    • target\classes : contains the compiled code of your java files, this includes the java code generated by ATS and the additional java files you have imported.
    • target\generated : the ATS code is transformed into java which is generated in this directory before being compiled.
    • target\logs : executions logs generated by TesNG.
    • target\output : a set of files and directories used by TestNG during the execution of the tests.
    • target\report: contains the ATSV (ATS video) files that are generated on demand during test replay.
    • target\report\<name_of_the_test> : contains all the screenshots that are generated during a test replay, as well as an actions.xml file. All of these elements allow you to generate reports on demand in several formats, including pdf, using the XLST FOP engine.

    Change the view of the project explorer

    By selecting the menu at the top right of the project explorer, you will be able to modify its display.


    Project Explorer View Men
    • Projects Explorer: normal view
    • Show resource images: Allows you to see all the images you have used for graphic recognition at a glance.
    • Show ATS scripts : allows you to see only your test scripts
    • Show visual reports : allows you to focus on the videos generated during the execution of your tests.
    The image view
    Still require support?
    Contact support

    Editing actions

    You can watch our tutorial or you can go through our documentation about editing actions :

    We will discuss the publishing facilities of the Agilitest editor.

    The simplicity of the display

    The Agilitest editor has been designed to show you most of the actions that you declare in your tests, for the details, it is usually enough to click on the displayed elements to make appear a complementary window which allows to go into the details.

    Opening a channel and submenu detailing what technology

    There is a notion of active action: it is highlighted. All actions adding operations will be based on this notion.

    An active action

    It is possible to select several active actions: for this select the first action, press the SHIFT key on your keyboard and select the last one: all the actions between these two actions will be selected.

    By using the CTRL key it is possible to separately select one or more actions to add to the group of active actions.

    a group of active actions

    The creation of new actions

    There are three ways to create new actions:

    By clicking on the actions menu

    You add a new action under the active action or the last active action. This new action appears empty of any information. It will then be necessary to complete manually or by dropping new elements on it.

    By dropping a captured item on the tested application.

    Just place the mouse in the lower part of the action below you want to create the new action to display a menu "Create an action".

    Create an action from the capture menu

    Subsequently, the action that is generated is linked to a graphical element of your application: not all action types are accessible in this way.

    Creating an action linked to an element

    Using the copy and paste function

    By right-clicking on an action or group of active actions, you can display a context menu.

    Contextual action menu

    This menu will allow you to Cut / Copy and Paste, or even delete the selected actions.

    Another option allows to activate or deactivate one or more actions: their display will be gray and they will not be replayed in the test.

    Actions related to the elements of the application

    All actions related to the elements of the tested application include a link to an interface element (issued from the tested software user interface).

    An interface element

    For these actions, the upper part concerns the action performed, and its sub-menu is related to the specificity of this action.

    Contextual menu linked to a mouse clic action

    The contextual menu linked to the interface element makes it possible to modify, or to completely manually specify the locator which makes it possible to find the element in the page:

    By hovering over and clicking on the item you will see a popup menu with the following options:

    Contextual menu linked to an interface element

    Action on the element

    By clicking on the item, you can add parents, children, specify their type completely manually.

    Locator modification menu

    By clicking on the small lego icon on the right, you can add attributes to the element.

    Adding of modifying attributes

    Finally, a click on the # in the locator modification menu will allow you to indicate which element to select in order of appearance when your locator makes it possible to retrieve several elements from the page. This feature is useful for selecting a specific row or column in a table for example. The positive values are in the order of the visual of the locator while the negative values start from the last identified value to the first of the locator.

    Drag-drop of an element

    By clicking on the dark banner of the interface element, you will be able to drag-drop it into a new action.

    Drag-drop an interface element

    This is very useful for reusing interface elements that have already been previously declared

    No element

    Application root context menu  

    If you delete any definition of the interface elements of your application, you display the notion of root of the application, with the following possibilities:

    • Add an interface element, we then return to the cases presented above.
    • Click on a system button: this allows you to send a click event directly to the graphical components of your browser.
    Menu bouton système
    • Manage a modal dialog box of type alert or config: allows you to accept or refuse when the dialog box is displayed
    gestion d'une boite modale
    • Add a locator to a system interface element: This function is related to desktop type locators. It is accessible to make manual modifications, but we advise you rather to go through the desktop driver.

    Actions options

    Additional options in the action line

    A set of additional functions are available on an action line and will allow you to:

    • Add a breakpoint when running the test, for debugging purposes. just click on the STOP panel
    • Increase or decrease the maximum number of trials. This specifies to Agilitest that it must try several  times to wait for the application to return before generating a failure. By default the value is set to 15, the possible values ​​are from -10 to 50, and you should know that the higher the value, the more Agilitest will wait between two tests.
    • Tell Agilitest that this action can fail: by clicking on the top right square, you will see a double green arrow indicating that the action can fail without the test failing. This feature is necessary to compensate for some sporadic behavior of applications, for example a popup that does not display all the time.
    Still require support?
    Contact support

    Web automation

    Agilitest supports the automation of web applications on 5 browsers:

    • Chrome
    • Firefox
    • Microsoft Edge
    • Internet Explorer
    • Opera

    In addition, we provide generic compatibility with browsers that come from Chromium, for example JXBrowser.

    Create a first test

    To begin, you must open a channel on a web browser of your choice. By default Agilitest will find the installation of the main browsers of the market, except for Opera which will require a little additional configuration.

    By clicking on the "Start a channel" button, you will be able to select the browser that interests you.

    You can then immediately open the channel by clicking on the "Play" button that appears on the right side of the action: opening the channel will launch the browser.

    The following action "Navigation -> Browser URL" allows you to specify which URL your application is at, it can be a local link or an internet link.

    Enter an URL

    After specifying your URL, just play the action directly so that your browser is positioned on the desired page.

    From there, you will have to go into capture mode to select DOM elements, perform actions and controls, and finalize your test.

    How to run the same test on multiple browsers

    Once your first test done, you can very easily launch it on several browsers, for that do the following operations:

    Create a CSV file of a single column and fill in the browsers that interest you. This is done simply by clicking on "New component" and csv file.

    Ficher browsers.csv

    We will then iterate over the values ​​of the CSV file by performing a subscript call.

    • Create a new script
    • Drop your main script from the project explorer into the edit window, this will create an action "Call the script".
    • Drop the CSV file on this new action, to generate an iterative call on the CSV file.
    Iterative call of the main script by iterating on the different browsers

    All you have to do is slightly modify your initial script, in order to vary the name of the browser: click on the App section of the "start a channel" action, and replace the browser name, set to hard, with the variable $param(0), this is the value of the first column of your CSV file on which your subscript call will iterate.

    Vary the browser's name

    In Agilitest, you can use variables in many places in order to increase scripts and file reuse, you will have more information by consulting our documentation on Data Driven testing.


    Still require support?
    Contact support

    Video reports

    It is important that the analysis of the failure conditions of a test be fast and effective 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 maintenance burden of automated testing.

    That's why we provided Agilitest with a video-generation module when replaying the tests.

    This feature is provided by ATS natively: it is open source. You will be able to exchange your reports with your partners even if they do not have access to Agilitest.

    How to produce a video report in Agilitest

    There are several ways to produce a video report directly in Agilitest.

    By going through the channel management execution parameters

    This function is accessible to the left side of the Agilitest editor and allows you to request the generation of a report during an execution.

    • Click on Parameters and select Visual Report
    • Then click on Play
    • At the end of the replay, the report is accessible with the project explorer in the target\report directory.


    Channel management : Execution parameters

    By double clicking on the generated ATSV file, the video report is read in the viewer provided with Agilitest.


    Playing an ATSV file in the viewer provided with Agilitest

    Using the executions menu

    In the Execution Control Panel, you will be able to request the generation of video reports.

    You will have access to additional options regarding the quality of the generated video reports. It is important to properly configure this point as this can affect the runtime or size of video reports when replaying continuous integration tests.

    The ATSV format has been optimized so that it does not take up much space and can be generated quickly, but be aware that the configuration of the videos in the executions concerns all the tests that will be replayed and can produce a large amount of reports.

    How to play 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 on the command line.

    You can use it following this link :

    http://www.actiontestscript.com/dev/player/



    Still require support?
    Contact support

    Actions menu

    The Agilitest actions menu

    The Agilitest actions menu is central and allows you to manually declare all possible actions in a test script.

    The Actions that act directly on application components are the following : Keyboard Input, Mouse, Check, Properties, Select and Javascript, they can be directly declared by drag-dropping an element using the capture functionnality of the application.

    Here are the details of the actions:

    Agilitest types of actions

    Channel oriented actions

    These actions allow you to create, close and change the current channel of your test, they are integrated directly into the script. Which is to differentiate from actions that act on the currently open channels and which will allow you to capture elements of interfaces. It is important to understand this point which is central to the effectiveness of Agilitest.

    Navigation oriented actions

    In the case of automation of applications 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.

    Sub-script actions

    No submenu for this action that creates a subscript directly, but you can use this action in two ways:

    Keyboard oriented actions

    The Keyboard Input action sends keyboard events to your application, key presses, with or without additional special keys.

    Mouse oriented actions

    The "Mouse" action is used to manage the mouse on applications running on PC, but also the specific actions of mobile applications, such as the swipe.

    Checks actions

    The verify action can generate an explicit control or assertion in your test, which will potentially lead to a test fail or allow it to continue.

    property icon

    Property actions

    The property action allows you, from a captured component, to retrieve one of its properties to put in a variable.

    This variable can then be used to define other dependent variables, create assertions, and so on.

    window icon

    Window action

    The action window allows you to manage windows operating system, modal windows desktop applications, and browser tabs.

    It does not allow to manage the internal windows of some Web applications, which are floating HTML elements, directly accessible with Web automation.

    A specific menu is also available to manage the dialog boxes without adding unnecessary complexity.

    select icon

    Select action

    This action affects the specific components which are SELECT in web browsers or COMBO-BOXES in desktop applications.

    scripting icon

    Javascript action

    The javascript action is used to execute Javascript code on a component.

    It is distinguished from the Java runtime action that occurs outside a component context (but can still retrieve variables).

    comment icon

    Commentary action

    In addition to simple technical comments, this action will allow you to declare functional milestones in your test.

    Action "Neoload"

    This action is not visible by default, you must modify Agilitest configuration to activate it.

    It allows you to interface your test with Neoload to allow it to automatically recover the scenario that is replayed by your test.

    Still require support?
    Contact support

    User interface

    To help you become familiar with our application, here are the different elements that make it up:

    Agiltest's user interface

    Project management menu

    This menu allows you to create a project, open an existing project, create a new component and save the files you are working on.

    When you create a new component, Agilitest allows you to select the following types:

    New ATS script : create a new test or sub-script.

    Create a CSV file : create a data file allowing you to test on multiple data. (See our Data Driven Testing section)

    New java script : allows you to call Java code external to Agilitest.

    Create an execution : allows you to create an execution of your tests to manage the replay of all the tests of a project filtered according to multiple criteria.

    Create a new component

    Configuration menu and help

    This menu is the first to visit to ensure the correct configuration of your editor.

    It will allow you to update all Agilitest dependencies (ATS, java, FOP, etc ...).

    For those who want to go a little further in the configuration of their editor, you can modify the configuration of ATS by customizing the .atsProperties file.

    The help page will allow you to access multiple resources, including a sample project.

    You can also access information about the workstation on which Agilitest is deployed and download additional tools.


    Extract from the Agilitest help menu

    The Project Explorer

    The project explorer is located on the left side and will allow you to access all the files that make up your project.

    You will also have access to the execution management linked to a given project.

    Projects explorer

    Channel management

    The channel management menu is a prerequisite before starting to edit a test, it is a central element of Agilitest and which will facilitate the creation and maintenance of tests.


    The channel management menu

    Variable management

    The variable management menu allows you to view all the variables used in a script at a glance.

    This makes it possible to avoid finding these variables in the body of the script which is reserved for actions and controls.

    Variables management menu

    Actions menu

    The actions menu is central and allows you to add all the types of possible actions that can be performed on a test.

    It has been designed to allow maximum compatibility between all the technologies supported by Agilitest.

    This menu also allows the management of the different channels used in a test.

    Agilitest actions menu

    The edition part

    The editing section of Agilitest represents a large part of the editor and displays the actions you perform on your tests.

    This section of the editor has been particularly studied to allow reuse of components: copying of actions or elements on which they act, creation of sub-scripts.

    We have also simplified the display to print only the main actions, but all the possible cases are managed in submenus.

    An action line in Agilitest

    Script header

    The script header menu allows you to manage a set of metadata linked to a test, such as execution groups.

    You will be able to view the ATS script corresponding to your test to copy it and send it by mail or add it to a comment in your bug management tool.

    You will also be able to access the java code which, compiled, allows the execution of tests. ATS and java scripts cannot be edited directly in the editor.

    An icon allows you to close the script.


    Script header
    Still require support?
    Contact support

    What is ATS

    ActionTestScript, diminutive 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 11, Firefox and Opera), 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 :

    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

    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...

    ATS is maintained by Pierre HUBER, founder of CAIPTURE, publisher of Agilitest. More information by following the link :

    https://github.com/pierrehub2b/actiontestscript

    Still require support?
    Contact support

    Jenkins integration

    This documentation is obsolete since Agilitest V1.2.3 version. Please refer to:

    https://www.agilitest.com/blog/test-well-yes-but-what-how-or-how-agilitests-jenkins-interface-will-simplify-your-life

    You can watch our tutorial or you can go through our documentation about Jenkins integration :

    There are various ways to launch tests of an ATS project: just with Jenkins several solutions are possible.

    We will present here a very simple solution requiring only a few minutes of installation and configuration.

    Use this procedure only if you need a specific Jenkins installation : Agilitest is able to automatically download, install a Jenkins instance, and configure jobs on the computer where it runs.

    Jenkins installation

    • Download a Jenkins for Windows here: https://jenkins.io/download/
    • Install it as standard
    • Launch it in command line with java (do not launch it in service for this configuration example and if necessary stop the Jenkins service)
    • Example command to launch Jenkins: java -jar -Xms768m -Xmx1024m jenkins.war
    • Connect to "http: // localhost: 8080" and follow the instructions for the password.  
      Be careful : the initial password when launching manually is changed and printed in the launching logs.
    • You can then choose to "install the suggested plugins" or install some plugins you want.
    • Then enter the administrator account information and click on "Save and continue"
    • Configure the instance (address and port) then click on finish
    • Your Jenkins instance is ready to be customized

    Configure a JDK (minimum 10)

    Using a browser, connect to your Jenkins instance.

    (in some cases, if you have a blank screen, restart your command line instance).

    • Click on "Manage Jenkins" then choose "Global Tool Configuration": in the "JDK" section choose the JDK you want to use (minimum 10), either automatically proposed by Jenkins, or by defining a local directory containing a JDK 10 .

    Plugins installation:

    From "Manage Jenkins" click on "Manage Plugins". The necessary plugins for ATS are:

    • Environment Injector Plugin
    • GitHub Integration Plugin
    • Maven Invoker plugin
    • TestNG Results Plugin
    • Unleash Maven Plugin

    (Note: You can add all the plugins that interest you)

    • On the “Available” section, filter with the names of the plugins above to select them:

    (These plugins will normally be already installed on most existing Jenkins infra with the possible exception of TestNG)

    The installation of these plugins will recover all the necessary dependencies.

    Define the ATS directory

    Prerequisite: Download the ATS components (More information on the GitHub Action Test Script project in the "installing" section)

    From the "Manage Jenkins" menu click on "Configure System" then in the "Global Properties" section add an environment variable:

    Name = ATS_HOME
    Value = [chemin vers votre répertoire local ATS]

    • Back to Jenkins home page
    • Click on "New Item"
    • Name your new job
    • Click on "Maven Project" then click OK
    • In the "Source Code Management" section, click on the "git" radio button and enter the git URL of an ATS project (for example: https://github.com/pierrehub2b/ats_test.git )
    • You can also click on "none" to use a local project (the path will be defined in your project POM file).
    • In the “Build Environment” section, optionally add a variable (eg browser.name = chrome) after checking: “inject environment variables to the build process
    • To be used by ATS, this variable name must be the same as a variable used in the ATS project. (for example, in the Agilitest editor you will find these variables in the "Execution parameters" part of a project)
    • On jenkins, in the "Build" section, enter the value "test" in the "Goals and options" field:
    • Your job is configured and is ready to be launched by clicking on "Build Now":
    • Once the job is finished, you will have access to the usual reports resulting from the execution of tests (details by tests, regressions, passed, failed etc ...)

    If you want to share or exchange on another example configuration, you can do it via the following github project:https://github.com/pierrehub2b/actiontestscript

    Still require support?
    Contact support

    Special actions

    In your functional tests on mobile terminals you will sometimes need to automate atypical actions particularly related to the OS.

    For this we have integrated the following native functions:

    • Back : back on the last action
    • Home : displays the "desktop" of the mobile terminal
    • Menu : access to the functions of the mobile terminal office
    • Search : launches a google search on the mobile terminal
    • Delete : delete the last character entered
    • App : displays the list of recently launched applications on the mobile terminal

    To add these actions, proceed as follows:

    • Select "Application root"
    • Select "System button"
    • Select the correct system action for your test

    Details of available actions

    Back

    This action corresponds to the use of the physical button generally present on Android terminals.

    It is particularly useful for reducing the virtual keyboard that is sometimes automatically deployed without having to click on a particular button.

    Enter

    This action corresponds to the use of the physical button "Enter" on terminals.

    Home

    This action corresponds to the use of the physical button generally present on Android terminals.

    Reduces all running applications to quickly reach the "desktop" of the mobile terminal.

    Menu

    This action corresponds to the use of the physical button generally present on Android terminals.

    It is particularly useful for accessing the configuration options of the "desktop" of the mobile terminal.

    Effective action only from the OS (without effect on an application).

    Search

    This action corresponds to the use of the "search" function generally proposed on Android terminals.

    Effective action only from the OS (without effect on an application).

    Delete

    This action allows you to delete the last character entered in the element being selected.

    This action does not detect any element on the application.

    App

    Displays the list of applications recently launched on the mobile terminal.

    This action can be useful to perform a quick switch on a native application of the mobile terminal and return to the tested application.

    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:
    1. 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.
    1. Do not forget to fill in the related action in the "method" of the Agilitest action
    1. 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.