If only 1 test in the suite uses test data, then the all test cases in the test suite will/can pass.
If multiple tests needs to use data from the test file only the last row of test data produces passing test cases, all other rows will cause the test cases pulling test data to fail. This is because each test case in the suite that uses test data will loop through the entire test data sheet independently before progressing to the next test in the suite. This causes a failure for each test case using all but the last row of data, because the last step and the first step of the test case are not (typically) logically sequential. This makes test suites no better than test cases.
The same problem may (un-checked) occur if a test case in the middle of a test suite uses test data.
Steps to reproduce:
Create two test cases (e.g. Test 1 and Test 2) and add them to a test suite.
The suite must use the test cases to flow logically through an end-to-end process (e.g.
- Test 1 - login
- Test 2 - update account profile
Each test case should depend on using test data.
Create a test data file with three rows of data (for customer, A, B and C), to suit the full end-to-end test scenario e.g. customer name, username, password, old email, new email
Current behaviour / execution order
1A (fails)
1B (fails)
1C (pass)
2A (fails)
2B (fails)
2C (pass)
Expected behaviour / execution order
The expectation is that each loop through the suite (end-to-end) will use the next row of data from the data file.
1A (pass)
2A (pass)
1B (pass)
2B (pass)
3C (pass)
3B (pass)
Being able to use test cases and test data this way within test suites allows the creation of modular test cases that can be chained together in different sequences in test suites, with each test case utilising the shared test data sheet. This in turn greatly reduces the maintenance required when there is a web site UI change while also providing the benefits of DDT.
I humbly suggest Katalon offer options with a test suite along the lines of - Read the next row of the data file:
- At the end of each test case (individual test looping) - current behaviour
- After last test case in the test suite only (suite looping) - new behaviour
OS - Windows 10
Katalon Studio Version - 5.10.1
Browser versions - Latest Chrome. Latest Firefox
Katalon logs from Windows logs folder: \config.metadata.log