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.

Description

Define if the test is active.

Application

The application for which the testcase is defined.

Create TestCase

  1. Go to TestCase → TestCase List. CreateTestCase

  2. Click on Create TestCase.

    1. Feed the Test field with the test name.

    2. Feed the Description field with a short description of this test.

    3. Continue to describe.

    4. Click on Save.

Implement TestCase

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

Action

Action

Description

Example

Unknown

Unknown action. Default Action when creating a new action

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

mouseButtonLeftPress

TBD

mouseButtonLeftRelease

TBD

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

TBD

OpenUrlLogin

TBD

OpenUrl

TBD

executeJS

TBD

openApp

TBD

closeApp

TBD

select

TBD

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

TBD

wait

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

waitVanish

TBD

callService

TBD

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

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

TBD

verifyElementNotVisible

TBD

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

Property

When Clicking on Button buttonManageProperties, the Window "Manage Properties" will open. From there you can :

  • either manage your TestCase properties

  • or see your inherited properties - coming from the step libraries of your use steps.

windowManageProperties

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

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

%system.TOMORROW-dd%

Day of tomorrow

%system.TOMORROW-doy%

Day of tomorrow 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
Note
It is possible to loop over a step using the following configuration. TestCaseLoopStep

Pose de Contraintes sur le Robot

Il est possible de definir au niveau du cas de test des contraintes (UserAgent et/ou ScreenSize) qui seront utilisées lors de l’execution. Ceci peut être utile pour tester des fonctionalités qui ne s’activent que pour une resolution et/ou un UserAgent bien precis. Il est possible de tuner les liste des UserAgent et ScreenSize proposés en mode autocomplete dans l’interface de Cerberus via les invariant public USERAGENT et SCREENSIZE.

UserAgent et ScreenSize seront definis au moment de l’execution en suivant la regle suivante :

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