Forum Discussion
What you have is, actually, aside from using CrossBrowserTesting, the best way of doing what you want to do.
- marinb9 years agoContributor
So does that mean that adding a Project.TestItems.CurrentIteration would be a very nice property to have? Since we already have a CurrentItem...
Or even better, add a supported browsers variable to test items and have a checkbox 'repeat for each browser'.
- tristaanogre9 years agoEsteemed Contributor
Honestly, I don't see the need to go that route. You're running the loop through all your supported browsers and executing all your tests. Doing anything else I think just muddies the waters, IMO.
What do you intend to "improve" by making such changes? Perhaps with an understanding of that goal, I'll understand better what you are looking to do.
- marinb9 years agoContributor
Well, we have dozens of test cases and every test case now has to be put in a loop.
Our project contains a test item called ''FrontEndTests' , which in turn contains subfolders containing all the testcases sorted by functionality.
If there was a way to simply repeat that single test item for various browsers, that would be much cleaner.
I could of course collect the various test cases in a function and only have that function contain the loop, but we don't have that test item page for nothing. It's lacking as it is (no way to execute a single test item in the list by using parameters in test execute for example. You either test the entire batch or you execute a single function somewhere in a script).
Any improvement would be welcome. Such as the current iteration for example, which would allow you to set variables for each iteration).
Take this example:
- you can't choose to only run 'Tenants_Backend' or 'Members' inside the AccessControl_Backend. You either have to run everything or -for example- that single script POST_Members - API_POST_Members .
And each and every test has to contain the browser loop. Unnecessary extra for statements imho.
Why not improve it and make it more powerful? That tiny little currentIteration variable already gives a great amount of power to each repeating test because it enables you to set a different set of parameters for each and every iteration.
And TestComplete already knows this information otherwise it wouldn't know if it reached its number of iterations.