Setting Data Iteration at Test Suite Level so that the Test Suite finishes a flow and then goes to the next row

I created a TS with 15 TC. Data bound all the TC using the TS level data binding feature. Now I realise that the TS will run each TC for all the rows and then move the next TC.
I read through similar posts for this issue and see that the only option right now is to create a parent TC and then use the Call TC feature to call each of the TC in it. But if I do that then I cannot use the data binding feature. I will have to load the excel in code and set my variables to those values.
Just before I go ahead and do these changes I wanted to see if this is the only option or if there were any new features added so that

  1. Data iteration is now allowed to be set at Test Suite level
  2. Data Binding is now allowed at TC level
  3. Script code to set Data Iteration at TS level

TIA

I also can create as many TS as the workflows I have, say 10, and then in each TS, I set up data binding for each TC and set the Data Iteration to be a different row. So the TS runs only on that row.

you can bind the test data to the control testcase and pass the values to the variables defined in the actual testcases when calling the test script.
supposed you declare var1, var2 .. varN in the control testcase (which are binded to the testdata) you will call the actual testcases something like:

WebUI.callTestCase(findTestCase("Test Case ID"), ["key1":var1, "key2":var2, … , "keyN":varN], FailureHandling.OPTIONAL)

where key1, key2 .. keyN are the variables declared at called testcase level.
they can have the same name so you don’t have to do much refactoring, e.g "var1": var1.

"var1" will be identified as the key in the called testscript, and var1 will be evaluated to the value of the current run of the caller script.

Thanks @bionel for the reply. I already declared the variables for each of the TC. So was trying to avoid redoing it, but looks like I that is what I have to do now. Will update once I finish doing it all… quite a pain as I have so many variables already for some of the testcases.

Sometime we have to learn from mistakes :slight_smile:
I understand your pain, but take the good part, your further projects will be much clever planned!

This problem seems to crop up quite often…

@ThanhTo do you think the docs could be improved by adding a section that makes this clearer?

I won’t name it a problem but mostly lack of understanding or… preliminary testing.
Most of the popular testing frameworks will behave exactly the same with data driven tests (spock, pytest… or feel free to name others).
Will iterate over the data until one testcase is ended and jump to the next one.
There are reasons behind this, and the most important principle is ‘tests has to be mutual independent’.
Therefore it is expected that each and every test should consume his own dataset.
A row-by-row iteration to an entire suite make sense only if one test depends on the previous one, which is a bad aproach imho.
However there may be corner cases where such behaviour is desired, and this is understandable.
Each framework has his own meanings to achieve it, but since it is not a default behaviour, each has workarounds.

But yeah, I agree, won’t harm to clearly state in the doc about the default behaviour.

@Russ_Thomas @bionel @ThanhTo
This is definitely my learning curve. Maybe along with the docs, if it can be shown as a note when creating a TS, that would be great too, just a suggestion.