I’ve created a data driven test case, but it iterates through each person before moving to the test case. I need the entire test suite to cycle. Here is my scenario.
I need to to login to the site.
I need to “impersonate” a user so that I have all their data and information.
While impersonating that user, I want to execute multiple test cases (these are separate files).
I have a test case to Login. We always log in as the same user.
I have a test case to Impersonate a user (this would be analogous to a login)
I have additional test cases I want to run such as validating links, reading sales data, populating forms.
My Impersonate User test is set up with a CSV, but that test runs dozens of times, for each user in my CSV file, before moving in to the next test.
So, it runs Test 1, then Test 2 (15 times), then runs Test 3.
The way I want it to run is:
Test 1, Test 2 (with a specific user), Test 3
Test 1, Test 2 (next user in CSV file), Test 3
Test 1, Test 2 (next user), Test 3.
I need the entire test suite to loop, once for every user in the CSV file.
How do I create a test suite that runs multiple times, once for each person I have in a CSV file, rather than running that single test for each user in the CSV file, before moving on to the next one?