Forum Discussion

rgratis's avatar
rgratis
Frequent Contributor
12 years ago
Solved

Feature Request: Script method to stop execution of current project within project suite run

I've gone through the documentation a few times, and it doesn't seem that there is a way to stop only the execution of the current project within a running project suite.  I do not want the project to stop on just any error, but with TestComplete's given methods, I can only call a stop to the current test item within the project or the entire project suite run.



Usage scenario for this is as follows:

- All projects that need to be run are added to a project suite.  Project suite is run.

- In one project within the suite, there is a error, perhaps in the setup scripts, that is going to cause all the items within that project to fail.

- At this point, the best case would be to log an error and halt the execution of this particular project, thus moving on to the next project in the project suite.  It appears my only options are to continue through the project and let every item fail or stop the entire project suite from continuing.



There are, of course, other workarounds, such as running each project individually via a script rather than trying to run them by running the parent project suite, but I feel that it would be useful to those of us with project suites if we could call a stop to a single project within the suite.

  • Hi,


     


    Actually, you can set a test item's Stop on error option to Project. In this case, if the test item fails, the execution of the current project will be halted. If you run a project suite, the next project will be run. Is this what you are talking about?


     

5 Replies

  • rgratis's avatar
    rgratis
    Frequent Contributor
    Going back to the original issue, I was looking for a way to stop a single project inside of a project suite run.  The recommended solution was using the "Stop On Error" property set to "Project".



    Reviewing what I want to do, even the "stop project on error" wouldn't really work, as it doesn't give a way to clean up after the test run if a project-stopping error occurs.



    I really must renew the request for a Halt/Stop method that will stop a single project within a project suite run.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi,


     


    Actually, you can set a test item's Stop on error option to Project. In this case, if the test item fails, the execution of the current project will be halted. If you run a project suite, the next project will be run. Is this what you are talking about?


     

  • rgratis's avatar
    rgratis
    Frequent Contributor
    That will do what I want if I break up the setup scripts into multiple test items and set only the ones that need to fail the project with that option.



    It would be more intuitive in my case to have a script method to call within my setup script.  It seems like anything that can be done in the TestComplete UI should be able to be done from scripts, but I realize this is a limitation in more areas than just this one...
  • rgratis's avatar
    rgratis
    Frequent Contributor
    I've run into another snag with this.  Is there a way to set the "Stop On Error" value for multiple test items at once?



    My problem is that I do not want the majority of test items to stop when an error is encountered, but the field defaults to "Test Item", which means that once I enable "Stop on error" in the project, they are all going to stop on error unless I go through and set each test item invidivually to "None".  With hundreds of preexisting test items, you can see why I would like a way to set the value of multiple items at once.