Iteration of Items in Jubula

332 Views Asked by At

I would like to repeat a Test Case in a loop and access an increasing counter in the repeated case.

Is there any way to do this in Jubula?

I created a Repeat loop in a Test Case to loop some Test Steps, there is a table whose row should be iterated by one each time.

It looks a bit like this

2

There are 2 best solutions below

0
Milos On BEST ANSWER

Use the variable. b

Set the variable to the initial value before your repeat.
ub_app_storeValue module - VARIABLE_NAME: Counter, Value: 1

Then apply the value of variable $Counter in your ROW parameter.

Add the increment command at the end of your repeat loop.
ub_app_storeValue module - VARIABLE_NAME: Counter, Value:?add($Counter,1)

Milos

3
Adam Horvath On

There's no "repeat" Test case in Jubula.

But you can achieve iteration with Data Sets; create a dummy Excel Data file with as many rows as many times you want the test-case to be repeated. Then associate it to your Test Case in the Properties view.

You can create a column with increasing numbers in it and access it in your Test Case, this way it will function as a counter.