Print

Groups

To group your test steps and influence the test execution, you can choose between three different groups. Each group has its own behavior, so make sure you use the correct group type for your situation.

Groups can be executed, duplicated, transformed into page actions, cleared from results or deleted. If you’ve used variables, JOSF asks you to enter or validate the values per unfulfilled variable.

1. Descriptive group

To group test steps together, without any precondition to run the group, place them in a descriptive group. This is the most commonly used group to order your test case in neat and orderly fashion.

2. Conditional group

A conditional group also holds test steps, but has one key difference; it accepts an condition. A condition can be either a test step or a comparator.

Conditional test step

The group will be executed if the result of the run step is either PASS or INFO (so not a failing step). Otherwise, the group will be skipped entirely.

Example; Sometimes there is a pop-up after logging in

Imaging an application in which we log in, but sometimes there is a pop-up after logging in. This could be due to a time-driven event in the application, or a collateral consequence of a previous ran test case. A conditional test step can check the presence of the pop-up and (if present) perform necessary actions to close the pop-up.

Comparator

The comparator accepts a first and a second value and a comparator. The first and second value are compared by the given comparator and if the result is success, the group will be executed. Otherwise, the group will be skipped entirely.

ComparatorAccepts
is equal toText, dates, numbers
is greater thanDates, numbers
Is greater than or equal toDates, numbers
Is less thanDates, numbers
Is less than or equal toDates, numbers
Is not equal toText, dates, numbers

3. Repeating group

A repeating group contains test steps, but unlike the conditional group, it uses a repeater to determine how many times the group should execute. Each iteration updates an iteration index, which increments by 1 (starting at 0 by default) and is stored in a buffer named group-index unless otherwise specified. You can change both the buffer name and the starting value.

In the current version of JOSF, three types of repeaters are available:


Repeating based on a test step
You can select a specific test step whose result determines whether the group will run again. After the group executes, the chosen test step is run to decide if another iteration should occur.

  • If the test step result is PASS or INFO, the group will run again.
  • If the result is FAIL, the repetition stops.
    With this type it’s also possible to:
    • Set a maximum repeat count to prevent infinite loops.
    • Use a test step that always passes for fixed iteration counts.

Repeating based on a datasheet
Instead of a condition, the repeater uses the rows of a datasheet. Each iteration, the values from the current row are placed into the buffers, and the group executes using that data set.
Options include:

  • Track results – View the outcome of each iteration in detail.
  • Stop after fail – Stop all further iterations if a step fails in the group.

In this document