Understanding problem of the use testsuites on data-driven testing

First of all, yes I studied the wiki and found some useful sites:

https://docs.katalon.com/katalon-studio/tutorials/data_driven_testing.html#data-driven-tests-execution
https://docs.katalon.com/katalon-studio/docs/design-a-test-suite.html

But I guess I have a generell understanding problem of the testcase (TC) and test suite (TS) design by using a data-driven test environment.

At my current design I have three TCs:

TC1: Start browser and login on webpage
TC2: Doing the real TC like editing a formular and saving the edits
TC3: Logout and close browser

When I add the TCs into a TS and set up for data-driven-testing (Login credentials are stored in an excel sheet) and start TS execution every TC is running for each Login user.

I mean, I have three users: john, mark, julia the TS execution looks like:

TC1 → john
TC1 → mark
TC1 → julia
TC2 → john
TC2 → mark
TC2 → julia
TC3 → john
TC3 → mark
TC3 → julia

But I want to execute all TCs in a row for each user.

TC1 → john
TC2 → john
TC3 → john

TC1 → mark
TC2 → mark
TC3 → mark

TC1 → julia
TC2 → julia
TC3 → julia

My current solution is to create workflow TCs where I add TC1-3 and than add the workflow TC to the TS and therefore I get the needed execution. But it feels not ok for me.

Would it be a better idea to not set up the login steps as a TC, but instead as an keyword?

Thanks for any help

hi,

are you using custom keyword where excel is read?
which object type your excel data is returned?
you can use index to store read value
if your excel will return values as a list, like

excelValues.get(0) //there could be John
excelValues.get(1) //there could be Mark
excelValues.get(2) //there could be Julia

so in
TC1
List excelValues = new ArrayList();
excelValues = CustomKeywords.‘excelHelper.ExcelUtil.ExcelHelper’()
excelValues.get(0) //there could be John
TC2
List excelValues = new ArrayList();
excelValues = CustomKeywords.‘excelHelper.ExcelUtil.ExcelHelper’()
excelValues.get(0) //there could be John
TC3
List excelValues = new ArrayList();
excelValues = CustomKeywords.‘excelHelper.ExcelUtil.ExcelHelper’()
excelValues.get(0) //there could be John

and so on

but it depends on how your custom keyword is implemented

Hi Timo,

my Problem is not to get the testdata-values, my problem is the execution.

I use the build in data-binding function of katalon, see here https://docs.katalon.com/katalon-studio/docs/manage-test-data.html#create-an-excel-test-data

Or do you mean I have to handle the testdata-values only in the Testcases and not in the Test Suite?

Thanks

hi,

“Or do you mean I have to handle the testdata-values only in the Testcases and not in the Test Suite?”

yes

1 Like

Ok, thanks. I will modify my TC, so that they use the testdate and not the Test Suites.