Forum Discussion

tclotworthy's avatar
tclotworthy
Contributor
9 years ago

Trouble Getting Conditional Goto to Work Properly

I have a test case with a conditional goto that does not behave as I expect. Below is the relevant output  from theTestCase Test Step Data Report. Step 478 correctly recognizes to transfer to UpdateP...
  • TanyaYatskovska's avatar
    9 years ago

    Hi Tclotworthy,

     

    I suppose you get this issue because of the fact that your test steps are disabled. I would recommend that you use another approach (without using Groovy) – you can use DataSource feature to simulate running your test in a loop. Please see below of how you can do this:

    1. Enable all your test steps.
    2. Add the DataSource test step to your test as the first step.
    3. In the DataSource tab:
      1. add any property;
      2. Choose Grid in the DataSource combobox;
      3. Click Insert rows and specify how many times you want your test to be executed (50).
    4. Add the DataSource Loop step
    5. Specify the DataSource you’ve just created and your first test step in a circle (CreatePID in your case)
    6. You should get the following structure in the Navigator pane:
    DataSource
    CreatePID
    CheckCreatePID
    …..
    GetPID
    DataSource Loop

    Does this approach work for you?