TestCase

TestCase List

TestCaseListPage

Shortcut

Edit TestCase

TestCaseEdit

Delete TestCase

TestCaseDelete

Run TestCase

TestCaseRun

Duplicate TestCase

TestCaseDuplicate

TestCase attributes

Field

Description

Test

Test name on which testcase is linked.

Testcase

An ID (alphanumeric caracter).

Status

Used to implement a workflow and gives way to filter Testcase.

Active

Boolean that defines if the Testcase can be launched.

Short Description

Provide a brief introduction about the Testcase.

Application

The application for which the testcase is defined.

Function

Another categorization field.

Priority

Assign to any of its execution a certain importance to calculate the CI score.

Detailed Description

Provide more detail about the Testcase. Isn’t visible in reports.

Comment

Should be use in addition with the short description to give temporary comment.

The Activation Criterias defines condition to enable/block the Testcase to be launched in specific context (countries, environment…​). This level of specification is the most important (override all the others conditions)

A Testcase can be linked to multiple Labels depending on their assigned system (see labels section)

You can define Robot constrains at testcase level in order to force the execution a specific testcase with a specific UserAgent or ScreenSize. This is used to test some specific behaviour of a website for a given UserAgent or ScreenSize. You can tune the list of UserAgent and ScreenSize proposed in autocomplete mode (on the GUI) by modifying the respective public invariant USERAGENT and SCREENSIZE.

UserAgent and ScreenSize will be defined at execution level following the rule :

TestCase

Robot / Execution

UserAgent Result

UserAgent1

UserAgent1

UserAgent2

UserAgent2

user Agent unchanged

UserAgent1

UserAgent2

UserAgent1

TestCase

Robot / Execution

ScreenSize Result

1024*768

1024*768

640*360

640*360

Fullscreen

1024*768

640*360

1024*768

Create TestCase

  1. Go to TestCase → TestCase List.

  2. Click on Create TestCase.

CreateTestCase

Only the following field are mandatory:

  1. Feed the Test field with the test name. (a default value should be selected)

  2. Modify the Testcase ID if necessary (it can be modified after, but the according execution history will be lost)

  3. Select the Application

  4. Continue to describe

  5. Click on Save as soon as you’re done.

TestCase Step

Step

  1. Click on Add step to display the following window. TestCasePage

  2. Feed a Description and click on Add for a new step.

  3. Or search for a step in library then click on Add.

testcaseaddstep

Your step is created. if you want to put it in library, just click on the book on the right side. A step in library will be available to add it in all test cases of your current system.

testcasesteplibrary

In the following screenshot you can see a use step. This step is imported from the previous library step. You are not able to modify it (all fields are grey). But you can find a link at the top to open the library if you want to modify your step. All use steps from this library will be impacted by your modification.

To modify only this use step, you have to click on the padlock icon but it will not be a use step anymore. (modification on library step will not affect it)

testcaseusestep

Note
You have the possibility to switch the position of your steps by clicking on the 3 dots.

testcaseusestep testcaseusestep

Note
It is possible to loop over a step using the following configuration. TestCaseLoopStep

TestCase Action

Action

Description

Example

Unknown

Unknown action. Default Action when creating a new action. Warning: make the execution fail.

click

will allow you to click on an element inside the current page. Value1 Identifier and name of the element to click in the form of : identifier=html_reference. Example : id=html_reference

mouseLeftButtonPress

allow to press and keep the button pressed until the next ButtonRelease action

mouseLeftButtonRelease

release the mouse button. Usefull with ButtonPress to perform drag & drop

doubleClick

will allow you to double click on an element inside the current page. Value1 Identifier and name of the element to click in the form of : identifier=html_reference. Example : id=html_reference

rightClick

will allow you to right click on an element inside the current page. Value1 Identifier and name of the element to click in the form of : identifier=html_reference. Example : id=html_reference

mouseOver

mouse cursor over an object Element path : the id of the element

focustoIframe

TBD

focustoDefaultIframe

TBD

switchToWindow

when the Test case need to switch to another window (like popup dialog) this action is used. Just specify the title or the URL of the other window to switch to this window.

title=titleOfThisNewWindow or url=http://url_of_this_new_window

manageDialog

TBD

OpenUrlWithBase

OpenUrl action using the based defined in the environment section

/cerberustesting

OpenUrlLogin

OpenUrl action using credential

OpenUrl

Open a specified url

https://github.com

executeJS

execute a JS script (no output can be retrieved)

openApp

TBD

closeApp

TBD

select

select an option in a <select> tag. this 'text' must be defined : <option value="text">

keypress

will allow you to press any key in the current web page. Value1 : Location of the element from which press the key. Value2 : Keycode of the key to press Example : ENTER

type

Write a data in a field. Element path : the id of the field Property Name : the property containing the value to type (can be a property or text.

hidekeyboard

Hide the currently visible keyboard

swipe

The action simulates a user pressing down on the screen, sliding to another position, and removing their finger from the screen. Swipe action can be used neither with unique parameter UP,DOWN,LEFT,RIGHT, or with combination of parameter CUSTOM and x1;y1;x2;y2, which are coordinates of origin point (x1;y1) and relatives coodinates of destination point (x2;y2)

swipe UP : will swipe from the 2/3 to the 1/3 of the screen. swipe CUSTOM 100;100;0;100 : will swipe from the point (100;100) to the point (100;200)

wait

Wait for a certain amount of time Feed a number (ms) or wait for element present feed an element (xpath)

waitVanish

TBD

callService

call a service defined the Service Library and provide the output within the execution

executeSqlUpdate

will allow you to execute SQL update (insert,delete,update). Feed the Database Name and the Script to execute. Database has to be declared to your system and environment.

executeSqlStoredProcedure

will allow you to execute SQL stored procedure. Feed the Database Name and the Stored Procedure to execute. Database has to be declared to your system and environment.

calculateProperty

will allow you to calculate a Property defined in the property section of the test case. [Optional] Feed Value2 with another property to affect to the previous Property Name a new value. Useful to override the one defined from the property section during an execution.

doNothing

Just perform no action. No action will be executed and engine will go to the next action or control

removeDifference

DEPRECATED

TestCase Control

Control

Description

Example

Unknown

Default control when creating a new control

getPageSource

TBD

takeScreenshot

Take a screenshot

verifyElementClickable

OK if Element is clickable.

verifyElementDifferent

TBD

verifyElementinElement

TBD

verifyElementEquals

TBD

verifyElementNotClickable

TBD

verifyElementNotPresent

OK if Element is not found (from the source code) on the current page.

verifyElementNotVisible

OK if Element is found and visible (according to rendering) on the current page.

verifyElementPresent

OK if Element is found on the current page.

verifyElementVisible

OK if Element is visible on the current page.

verifyElementDifferent

TBD

verifyIntegerEquals

OK if the Integer1 is equal to the Integer2.

verifyIntegerGreater

OK if the Integer1 is greater than the Integer2.

verifyIntegerMinor

OK if the Integer1 is lower than the Integer2.

verifyRegexInElement

TBD

verifyStringContains

OK if Property String1 contains the String2.

verifyStringEqual

OK if the String1 is equal to the String2.

verifyStringGreater

OK if the String1 is greater than to the String2 (After in a dictonnary)

String1 : ZZZ String2 : AAA

verifyStringMinor

OK if the String1 is minor than to the String2 (before in a dictonnary)

String1 : AAA String2 : ZZZ

verifyTextInDialog

TBD

verifyTextInElement

OK if the text found in Element is equal to the Text indicated

Element : //StatusCode Text : OK

verifyTextInPage

TBD

verifyTextNotInElement

OK if the text found in Element is not equal to the Text indicated

Element : //StatusCode Text : KO

verifyTextNotInPage

TBD

verifyTitle

TBD

verifyUrl

OK if the URL of the current page equal to the URL indicated .

verifyXmlTreeStructure

TBD

TestCase Property

When clicking on Tab buttonManageProperties, the Property menu will appear. From there you can manage your TestCase properties or see your Inherited Properties - coming from the step libraries of your use steps.

windowManageProperties

Properties are the key element of your TestCase to manage different variables in the same scenario. A property is identified by its name and the country for which it’s defined (e.g. you cannot have two properties defined for the same country with the same name).

Properties can be called by their name using the follwing syntaxes:

  • %property.property_name% : the execution will stop if any problem in the property calculation

  • %property_name_here% : the execution will not stop if any problem in the property calculation

When handling Datalib, the syntaxes to call the subdata are :

  • %property.property_name.sub_data_name% or %property_name.sub_data_name%

  • %property.property_name(sub_data_name)% or %property_name(sub_data_name)%

Properties can be called in action or control values field or in another property.

Field

Description

Property

Name of the property.

Type

The way the property is going to be calculated.

Value

Value of the property.

DB

DataBase in which the property will "executeSql".

Length

When calculating a list of values, defines the number of rows the property will return.

Row Limit

When returning a list of values, limits the number of rows the property will consider for random purposes.

Nature

Defines the unique value that will be used in the execution. By default, STATIC has no rules defined : it will take the first result it finds.

Desription

Description of the property.

Countries

Countries for which the property will be calculated (environment parameter).

Property Types

Field

Description

Example

text

assign the property an alphanumeric value. Can invoke other properties

%system.EXECUTIONID%_test

getFromDataLib

query the corresponding datalib (identified by its name)

Datalib_Name

getFromSQL

run a specific query an get the first, and only the first, result. The DB must be specified

select TestCase from testcasestepactioncontrol where Control = 'verifyElementInElement'

getFromJS

Execute the specified JavaScript script without getting any output

var xPathRes = document.evaluate ("//*[@data-cerberus='button_basket_ProductBloc_modifyProduct1']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null); xPathRes.singleNodeValue.click();

getFromJson

JSON path to get a certain element from a service call

$.status

getFromXml

Xpath to get a certain element from a service call

//OrderId/text()

getFromGroovy

Execute the specified Groovy script and get the last defined variable

'%property.date%'.replace('\','-').substring(0,10)

SQL queries management:
  • queries can be stored inside the test case and launched using getFromSQL. Only one value of the first row can be retrieved.

  • queries can be stored inside a Datalib, according to its DB. Several values of the first row can be retrieved.

We recommend the Datalib since its simplifies the modification of any request, if some queries can be re-used.

Service management:

A service must be referenced in Service Library

  • it can be called using the callService property, parsing will be performed using properties (getFromJson, getFromXml)

  • it can be stored in a datalib and all the field will be parsed using the Subdatas.

TestCase Variables

You can use variables in many area of Cerberus. Those variable are used in order to perform some actions of controls in a dynamic way. 3 types of variables can be created :

  • Variables defined from properties inside Test Cases.

  • Variables defined from application object.

  • System Variables

Properties and Application Object are defined by the users while system variable are provided by Cerberus.

The global syntax of a variable is : %[property|object|system].nameOfTheVariable%

This is the list of fields in Cerberus where you can use those variables.

  • Condition Value1 and Value2 at Test Case level.

  • Condition Value1 and Value2 at Step Test Case level.

  • Condition Value1 and Value2 at Action Test Case level.

  • Condition Value1 and Value2 at Control Test Case level.

  • Test Case Action Value 1 and Value 2.

  • Test Case Control Value 1 and Value 2.

  • Test Case Properties Value 1 and Value 2.

  • Path, Envelope and Method at Test Data Library (SOAP) level.

  • SQL Script at Test Data Library (SQL) level

  • Column, Parsing Answer and Column Position at Test Data Library Subdata definition level

  • Path, Request, Operation and Attachement URL at Service level.

  • Request detail (all keys and values) and Header (all keys and values) at Service level.

When a variable is detected in one of those field, Cerberus will replace it by the value during the execution.

  • If the variable is an object, the value (that never change) is just replaced.

  • If the variable is a system variable, the value is calculated and replaced at the same time (for ex : time will be the time of the replacement).

  • If the variable is a property, it gets automatically calculated at the time of the replacement. If was already calculated before, the same value (already calculated) is replaced. NOTE: In order to force the calculation of a property at a certain timing, calculateProperty Action can be inserted just before the action is used in a field.

Variables can be defined in a recursive way. That means that the following syntax :

%property.%system.country%% will be first replaced by

%property.FR% and then by FR property value (if it exist).

Please note also that, if at the end of the decode operation, there are still references to %property.???% or %system.???% or %object.%%% in the field, the corresponding test case will report an error and generate an FA status.

Property Variables

Property variable allow to have multi row content. As a consequence the full syntax will look like this :

%property.NameOfTheVariable.rowNb.SubData%

If rowNb is not defined, the 1st row will be used. As a consequence, the syntax %property.rowNb.nameOfTheVariable% is the same as %property.1.nameOfTheVariable%

If SubData is not defined, the key velue subdata will be used.

Object Variables

  • %object.myobject.value% : Get the application object myobject’s value

  • %object.myobject.picturepath% : Get the application object myobject’s picture path

  • %object.myobject.pictureurl% : Get the application object myobject’s picure url

System Variables

Below you will find useful properties :

Value

Description

%system.SYSTEM%

System value

%system.APPLI%

Application reference

%system.BROWSER%

Browser name of the current execution.

%system.APP_DOMAIN%

Domain of the Application

%system.APP_HOST%

Host of the tested Application

%system.APP_CONTEXTROOT%

Context Root of the tested Application

%system.EXEURL%

Full Url of the tested Application

%system.APP_VAR1%

VAR1 of the application on the environment.

%system.APP_VAR2%

VAR2 of the application on the environment.

%system.APP_VAR3%

VAR3 of the application on the environment.

%system.APP_VAR4%

VAR4 of the application on the environment.

%system.ENV%

Environment value

%system.ENVGP%

Environment group code

%system.COUNTRY%

Country code

%system.COUNTRYGP1%

Country group1 value

%system.COUNTRYGP2%

Country group2 value

%system.COUNTRYGP3%

Country group3 value

%system.COUNTRYGP4%

Country group4 value

%system.COUNTRYGP5%

Country group5 value

%system.COUNTRYGP6%

Country group6 value

%system.COUNTRYGP7%

Country group7 value

%system.COUNTRYGP8%

Country group8 value

%system.COUNTRYGP9%

Country group9 value

%system.TEST%

Test.

%system.TESTCASE%

TestCase

%system.TESTCASEDESCRIPTION%

TestCaseDescription

%system.SSIP%

Selenium server IP

%system.SSPORT%

Selenium server port

%system.TAG%

Execution tag

%system.EXECUTIONID%

Execution ID

%system.EXESTART%

Start date and time of the execution with format : 2016-12-31 21:24:53.008.

%system.EXESTORAGEURL%

Path where media are stored (based from the exeid).

%system.EXEELAPSEDMS%

Elapsed time in ms since the beginning of the execution (can be used to perform timing controls).

%system.CURRENTSTEP_INDEX%

Index number of the current step execution. Can be used when looping over a step.

%system.CURRENTSTEP_STARTISO%

ISO Timestamp of the beginning of the step execution.

%system.CURRENTSTEP_ELAPSEDMS%

Elapsed time in ms since the beginning of the current step execution (can be used to perform timing controls).

%system.STEP.n.RETURNCODE%

Return Code of the step n. n being the execution sequence of the step (sort).

%system.LASTSERVICE_HTTPCODE%

Http return code of the last service called.

%system.TODAY-yyyy%

Year of today

%system.TODAY-MM%

Month of today

%system.TODAY-dd%

Day of today

%system.TODAY-doy%

Day of today from the beginning of the year

%system.TODAY-HH%

Hour of today

%system.TODAY-mm%

Minute of today

%system.TODAY-ss%

Second of today

%system.YESTERDAY-yyyy%

Year of yesterday

%system.YESTERDAY-MM%

Month of yesterday

%system.YESTERDAY-dd%

Day of yesterday

%system.YESTERDAY-doy%

Day of yesterday from the beginning of the year

%system.YESTERDAY-HH%

Hour of yesterday

%system.YESTERDAY-mm%

Minute of yesterday

%system.YESTERDAY-ss%

Second of yesterday

%system.TOMORROW-yyyy%

Year of tomorrow

%system.TOMORROW-MM%

Month of tomorrw

%system.TOMORROW-dd%

Day of tomorrw

%system.TOMORROW-doy%

Day of tomorrw from the beginning of the year

%system.ELAPSED-EXESTART%

Number of milisecond since the start of the execution.

%system.ELAPSED-STEPSTART%

Number of milisecond since the start of the execution of the current step.

Tricks

You will find below some tricks which help you to implement specific test cases.

Note
It is possible to create a random property with a number of digit defined. You have to feed the property fields like the screenshot below. This property will be different for each execution. Example: 884592, 004795 TestCaseRandomProperty