Forum Discussion

rovin's avatar
rovin
Occasional Contributor
6 years ago

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

  • tristaanogre's avatar
    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.  

  • 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.