3.11.2.3 Tips and tricks for using the Test Case library

The Test Cases in the library are organised into actions. In the basic category, you will find the various actions offered by Jubula . The complex category contains some example keywords which are built up of more than one Test Case .

When specifying your tests, you need to find and choose which actions you will need. This takes some practice, but there are some hints which can help you:

High-Level Actions
Jubula executes high-level actions. This means that if you want to select something from a menu using the menupath, for example, you need to look in the category:
Actions (basic)/Select/Menu Bar
and select the Test Case :
ub_mbr_selectEntry_byTextpath
The Test Case finds the menu, opens it, and clicks the item you specify.

Abstract components
There are some actions which are executable on many different components. Clicks, for example can be executed on pratically all components in the interface. You can also check text on labels, combo boxes and text fields. Obviously, it makes sense to specify your Test Cases as abstractly as possible so that they can be reused in more places. This helps keep the maintenance low later.

You will notice in the library that there is no Button category under the Click category. Instead, you will find various click actions specified for Graphics Component (grc). This is because all components which support clicks belong to the Graphics Component group.

In the same way, you will find the category Check/Component with Text. You can use the check actions from this category to check text on any component with text - buttons, text fields, combo boxes, labels.

Parameters
Different actions require different data. Some Test Cases in the library have been pre-configured with data to make test specification easier (look in the category Input via Keyboard/Application/Key Combination for a long list).

Some actions let you choose whether you want to enter data using an indexpath or a textpath. We recommend using the textpath so that you are not dependent on the order of e.g. menu entries or tabbed panes.

To make text-based parameters more robust, Jubula often lets you choose an operator. You can choose between equals, matches, simple match, not equals. Using matches lets you use regular expressions so that you don't have to hard-code the whole text parameter.



Copyright BREDEX GmbH 2012. Made available under the Eclipse Public License v1.0.