The purpose of the software tests, besides compliance with the execution procedures, is to be able to control that the software complies with the expected behavior.

We will see what are the functions of Agilitest that allow to perform controls or assertions in your software tests.

Everything goes through the "Check" function.

check action

This action comes in three sub-functions:

  • Check properties
  • Check occurrences
  • Check values

"Check properties" and "Check values" will work the same way. The only difference is that in one case we will check the properties of one UI element and in the other the values of a variable.

Check occurrences” will control the number of items counted in the displayed page of the tested software.

Check properties

This function takes as input an interface element that will have to be captured.

Example :

check property action

In the example above, a SPAN is selected with an "id" equal to "cwos".

Its "text" property is verified to make sure it is equal to 4.

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

Check values

The operation is identical to the "Check properties" action described above. However, this function takes as input a variable which may or may not be modifiable.

Check occurrences

The occurrence check checks the number of elements found on the current page using an Agilitest locator, i.e. a targeted element.

In some cases, it may be useful to define "locators" that can correspond to several elements. This can be used, for example, to control the number of rows or columns in a table.

The "Check occurrences"  action is also very useful to add robustness to your tests.

check occurences

Check occurences and graphic recognition

Occurrence checking also works with graphical elements.

You will be able to check that an image is present a number of times in the displayed page.

This differs from a check based on the software structure, for example the DOM, for which even non-displayed items will be counted.

You can also combine occurences checking and graphical recognition to determine when you will be able to continue your test.

Still require support?
Contact support