Forum Discussion
Quick answer is "yes"... but there are many ways of doing this. You could set up another function that calls those three test cases within a loop and execute that function as your "suite", you could set up Test Items where each of the three test cases are child items of a parent test item which has an count setting indicating how many times you do it in the loop.
Is there in built function within test complete or could you please provide a sample as how to run scripts in loop.
That would be very help full. Thank you.
- tristaanogre7 years agoEsteemed Contributor
This screenshot shows a very simple way of doing so. If I have two keyword tests that I want to run and I want to loop them through three times, I can do something like this
For some situations this works. You can find out about this at http://support.smartbear.com/testcomplete/docs/working-with/managing-projects/project-editor/test-items-page.html
The draw back of this method is that there is no programmatic control over the loop. You are simply looping the test cases multiple time. You would have to have the first item run a test that would actually set certain parameters that the other two tests would use to get each time through the loop to run differently.
I prefer looping in code using while or for loops if I need to loop something. But while you gave an example of what you want to do, it's still a very general example. I'm assuming you know how to write while or for loops in code so, if you can clarify if there is something more you want to achieve, I'll certainly try to help. Perhaps a more concrete example of what you are attempting to achieve.
Related Content
Recent Discussions
- 14 hours agotramuntana
- 3 days agoSlickRick