This site requires JavaScript to be enabled


Dear Tricentis qTest users,

If you would like to submit a Tricentis qTest ticket,

please use this support request form.

Tosca Version
IncidentLookup using list
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
Finds a match if both terms exist in a document (an intersection of sets).
NOT, minus (-), or exclamation point (!)
Excludes documents that contain the term after NOT (a difference of sets).
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Quotation marks (")
Use quotation marks to search for an exact phrase with multiple terms.
For examples and more information look at our Knowledge Base: Advanced Search On The Support Portal

Wait Loop for Batch Job Execution on Command Prompt


Tosca version 10.0

In my application, I have multiple batch job execution that should get invoked one after the other in a sequence and the time taken by each batch job execution varies.  In one such scenario where I have a step which has execution of 3 batches, the first takes about 10-15 seconds to comlete, 2nd takes about 1.5 - 2 minutes and 3rd takes about 20--25 seconds.  Each should start only after completion of the previous.  Earlier, the team who were working on the script had added a static wait time of 80 seconds after each batch job invoke which I wanted to change and make it dynamic wait.  I introduced a wait loop (While Loop) and added a condition using Window Operation - Caption *cmd.exe*, Operation - Verify Window Exists and in the loop, Window Operation module -- Caption - *cmd.exe*, operation - Wait On Close.  This loop will run until the window exists and exit on completion of the batch on command prompt.

Issue facing:

From the Tosca Documentation, I see Verify Window Exists is no longer a valid property in 10.0 and was used in earlier versions. Is there any other option that I could use to verify?

The Wait On Close has a default Synchronization value of 40seconds and due to this, if command prompt doesnt close within the first cycle, the end result of Wait on Close appears as failed while it does set to Passed in the while loop 3 or 4 in which ever cycle, the cmd.exe closes post execution.

To me as a user the end result of the test case is pass but to a business user who will see the execution in Tosca, the result is failed, is there any other approach that I could take here to put a dynamic wait?



1 0

Johannes Zwart

Created: 2017-10-13 11:07:04 , Updates: 1, Last Update: 2017-10-13 11:08:06

Hi Anand,

An updated version of the TBox Start Program Module  should exist (for 10.0 also) that has a parameter WaitForExit. This parameter ensures your batch is indeed finished when the test step finishes. If you don't have this parameter, you should be able to upgrade the module, or create a new project, export this module from there, and import it in your main project.

Starting at at least Tosca 10.1, functionality exists that will upgrade all of your modules to the newest version, which is why I would recommend keeping up to date with Tosca.

Kind regards,

Johannes Zwart

Anand Seshadri Krishnan

2017-10-13 09:45:35

Many thanks.. The solution worked perfectly for us.

Johannes Zwart

2017-10-13 10:34:57

That's good to hear, Anand! I'm happy I could be of assistance!

1 0

Anand Seshadri Krishnan

Created: 2017-10-13 11:09:20

Many thanks for the suggestion Johannes.  I will surely give this a try.


Tosca is the perfect solution

Optimize - Manage - Automate

Download Trial