Ask a Question

How to skip current test script execution of a batch of test scripts when running test script fails?

rovin
Occasional Contributor

How to skip current test script execution of a batch of test scripts when running test script fails?

I am using testcomplete keyword data driver framework where test scripts gets invoked through driver script and driver scripts runs only those scripts which are placed in excel sheet. There is situation

1)when multiple test scripts are run in a batch and if one of the test scripts gets failed due to an error then entire execution of the remaining test scripts stops.

2) Another thing is if I disable the stop on error check box then it keeps on searching for next objects written in flow of particular test script?

 

 

Can some one help me on this big issue as its a stopper for me?

2 REPLIES 2
tristaanogre
Esteemed Contributor

Point 2 in your post is the best starting point, disabling the "Stop on error".

 

But once you do that, then you need to modify your tests so that they are "smarter" and will stop execution if they run into certain kinds of errors.  You should add code to detect whether a component is available before you interact with it and, if it's not, raise an exception to halt that particular test case.  


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Nimith
Contributor

Hi Rovin,

 

I too agree to what @tristaanogre mentioned. In your case since you use excel as the driver, you would need to control the execution through your scripts.

 

I would also like to suggest you to try to use the Test Complete's "Test Item" option.

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/test-items.html

 

Here you could build groups/set and also have scripts added in as a child so that only if the parent script passes, then the child scripts under them would get executed. Else they wont. You will have a better control over your execution. 

 

cancel
Showing results for 
Search instead for 
Did you mean: