2017 October Release

Enhance a Test by Using Validation StatementsPermanent link for this heading

It is very important to use validations in a test. A validation is used to check if the result of an execution (or of a set of executions) is the expected one. Following, you will find some examples where validations might be useful.

Check if Field Has Been Set CorrectlyPermanent link for this heading

In your test you set an input field to a specific value. This results in setting another field too (as when setting the "Category" of a case, the "Short Form" field should be set, too). For checking if the "Short Form" field has been set correctly, you can use a set statement for saving the value in a parameter (see chapter “Set Statement”). Afterwards, you can check in a validation statement if this value has been set correctly.


<Execution action="Quicksearch" location="PAGES.Explore.Category" value="*" />
<Execution action="Click" location="PAGES.Explore.Category[0].Job Advertisement" />
<Set parameter="ShortForm" location="PAGES.Explore.CONTROLS.Short Form" />
<Validation ok='"{~ShortForm~}"=="HR"' />

Check Success of Document ImportPermanent link for this heading

If you have imported a document in Fabasoft Folio, it is quite useful to check if the import has been successful. Therefore, check in a set statement if the object exists in Fabasoft Folio and validate the result.


<Execution action="Import" location="PAGES.Explore.Object List.BUTTONBAR.SelectTool" value="{~importdocs~}An Introduction to Fabasoft app.test.pdf" />
<Set parameter="ImportSuccessful" location='PAGES.Explore.CONTROLS.Object List.ROWS["Name"=="An Introduction to Fabasoft app.test"]' eval="Exists" />
<Validation ok="{~ImportSuccessful~}" />

Count the Rows of a ListPermanent link for this heading

Often it is also necessary to check if a list (object list or compound property list) has the expected amount of rows. In this example you check if the history of a record contains the expected amount of rows.


<Set parameter="Rows" location="PAGES[0].CONTROLS.History" eval="Count" />
<Validation ok="{~Rows~}&gt;=3" />

Validate if Renaming SucceededPermanent link for this heading

Another example is to check if the renaming of a cell in an object list (by using the F2 key) has been executed correctly.


<Execution action="Click" location="PAGES.Explore.Object List[1].Date of Contract" />
<Execution action="Keypress" location="WINDOWS[LAST]" value="F2Key" />
<Execution action="Set" location="PAGES.Explore.Object List[1].Date of Contract" value="01.10.2009" />
<Execution action="Keypress" location="WINDOWS[LAST]" value="ReturnKey" />
<Set parameter="DateOfContract" location="PAGES.Explore.CONTROLS.Object List.ROWS[1].Date of Contract" />
<Validation ok="{~DateOfContract~}==01.10.2009" />