Ask a Question

Bat file set up to run -Task Scheduler

TK6666
Contributor

Bat file set up to run -Task Scheduler

Hi there

Please see attached my path were my test execute files sit and the bat file that i have created to run automate tests.Please could you advise me if the path that  i am using is correct in my bat file

sorry I am not technical at all but doing record and play back for a desktop application and encountering some issues'.Can someone willing to maybe get on a zoom or teams call with me by any chance to try and assist me?

Were test completes sits

C:\Program Files (x86)\SmartBear\TestComplete 15\x64\Bin.TestComplete.exe

 

My Project suit below

C:\Users\Tina\OneDrive - DATASCOPE\Test Complete\WHClient\WHClient

TK6666_0-1664800072709.png

This is the batch file i created to run the test automatically but it is not working

"C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe" C:\DSTests\WHClient\WHClient.pjs /run /exit /Project:"Project_WH Client" /test:Launch_HTML_5
pause

 

This is the error i get.

 

TK6666_1-1664800248639.png

Please help me get this right

 

Thank you

Tina kanniah

15 REPLIES 15
rraghvani
Champion Level 3

Here's my example and project setup to launch Windows Notepad.

 

Tested application,

rraghvani_3-1664807971802.png

Keyword test,

rraghvani_2-1664807917956.png

Execution plan,

rraghvani_1-1664807875037.png

Location of project and TestExecute command,

rraghvani_5-1664808485864.png

 

I can see you have a project in C:\Users\Tina\OneDrive - DATASCOPE\Test Complete\WHClient\WHClient. Do you also a project in C:\DSTests ? You need to ensure that the project and test names are correct

 

TK6666
Contributor

Thank you so very much for this. @rraghvani .It is highly appreciated. I will follow and give this a try.

And then is this the same bat file that you would use when setting up the task scheduler to run tests at a specific time?

Hi @rraghvani .Yes i do .So i created the DStests folder to make it easier and i have copied the files over from C:\Users\Tina\OneDrive - DATASCOPE\Test Complete\WHClient\WHClient. to C:\DSTests folder.

Would i specify C:\DSTests\WHClient\WHClient\Project_WH Client.pjs?

TK6666_0-1664809267318.png

 

rraghvani
Champion Level 3

1. Get the command to work using the correct parameters in the command prompt.

2. Create a batch file with the commands in step 1, and run the batch file

3. Create a task schedule to run the batch file.

rraghvani
Champion Level 3

You can either run the .pjs or .mds file, see TestComplete Command Line. Just run the command, and see if it runs the automations that you expect.

 

 

TK6666
Contributor

Hi @rraghvani 

Please hlep as you have been the most helpful thus far.

 

I know want to change my bat file so that it calls my project and runs all the test under the execution plan.

Please help as to advising how would this file change to look?Now how i got just running one test but need to it now run all the test under the execution plan

"C:\Program Files (x86)\SmartBear\TestExecute 15\x64\Bin\TestExecute.exe" "C:\Users\Tina\OneDrive - DATASCOPE\Test Complete\WHClient\WHClient.pjs" /run /exit /Project:"Project_WH Client" /test:Launch_UInMain
pause

rraghvani
Champion Level 3

As I had mentioned from a previous post,

 

Here are some command line examples,

 

  • Runs all enabled projects in project suite:

TestComplete "C:\Project Flow\Project Flow.pjs" /run /exit /DoNotShowLog /ExportLog:"C:\Temp\Project Flow\index.html"

 

  • Runs specific project in project suit:

TestComplete "C:\Project Flow\Project Flow.pjs" /run /exit /DoNotShowLog /ExportLog:"C:\Temp\Project Flow\index.html" /project:TestProject2

 

  • Run specific unit and routine:

TestComplete "C:\Project Flow\Project Flow.pjs" /run /exit /DoNotShowLog /ExportLog:"C:\Temp\Project Flow\index.html" /project:TestProject2 /unit:Unit1 /routine:Test3

 

Do read TestComplete Command Line, as there's plenty of useful information.

Thank you so much ,much appreciated, I came right with this one and your took your advise.

I just need to figure out how to set up the emails for this test log to be sent out automatically to a group of developers @rraghvani ,

rraghvani
Champion Level 3

Once my automation is finished, an email is sent with a location of the results - it's on a shareable network drive that developers and testers can access.

 

If you look at the command line arguments (e.g. /ExportLog:"C:\Temp\Project Flow\index.html"), you can export to results to a specific location.

cancel
Showing results for 
Search instead for 
Did you mean: