Hello! Quick question regarding how data driven test structure works.
Let's pretend I have test A which logs into a website. Test B will now now use test A using 'test as a step' to get to the webpage and do additional things on the page.
Now let's say I want to want to use different accounts for test A to log into the website so test A is now data driven. However, the content on the website changes for each different account so if I turn test B data driven as well, I need to verify certain elements that correspond to the account that was used to log in.
If I follow this workflow however, and use data driven test A as a 'test step' inside test B, test A will run through all of it's data driven iterations before running anything in test B.
I want each the data for test A and B to be executed in tandem so the flow becomes:
log into account 1, verify on the website data belonging to account 1
log into account 2, verify on the website data belonging to account 1
How it currently works however, given my test flow, is:
log into account 1
log into account 2
verify on the website data belonging to account 1,
verify on the website data belonging to account 1
..which is not what I want. The only alternative I can think of is not using 'test as a step' to bypass the way the data driven logic is currently behaving. If there is any other way to switch up the order of how data driven tests work, please let me know, thanks!