Hello Protractor JS experts!
Using Protractor I can have functions running before each test using the onPrepare function. I can also set multiple tests to run with multiple browsers.
But what would be ideal for my scenario is to have a single test run multiple times, and the amount of times this would have to run will depend on the length of an array. This array will hold the test parameter that is the only thing changing in the specific test.
So basically that's two questions:
onPrepare function and thus knowing how many times to repeat the test?To explain further my scenario: I am getting data from a database connection in each test, every time querying different IDs. This connection is currently being done in every test file for every different ID I need to query.
What would improve my scenario: Have the IDs set in an array ONCE, by querying the IDs I need ONCE from the config file. Once the array is populated, the config file will run a single test repeatedly for each unique ID as its parameter (passing this ID using the browser. for example?)
Thank you!