This site requires JavaScript to be enabled
IE BUMPER

Product
Version
IncidentLookup using list
Language
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
  Help
IE BUMPER
Categories
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
AND
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).
Wildcards
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Phrases
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

How to schedule unattended TOSCA Test Execution using Windows Task Scheduler

This article explains on how to schedule unattended Tosca Test Execution using Windows task schedular


Situation

There might be a situation in a project where you have to schedule Test Execution, say it a Night Run of a Regression pack, a Smoke Test pack or a project where there is a limitation in using CI tools but a trigger of Test Execution at a particular time is required.  This can acheived by using Windows Task Schedular to schedule a Task and that task's job is trigger TOSCA test exeution

Solution

The solution is divided into 2 parts

i. Create a batch file to trigger Tosca test execution

ii. Configure Windows Task Schedular accordingly

 

i. Create a batch file to trigger Tosca test execution

  •  Create a .bat file, which opens workspace using login credentials and then triggers a .tcs file.Note: Please change value of workspace, login, username, password and file path of your .tcs file accordingly

          

"C:\Program Files (x86)\TRICENTIS\TOSCA Testsuite\ToscaCommander\TCShell.exe" 
-workspace "C:\Tosca_Projects\Tosca_Workspaces\FirstSteps.tws" -login "Admin" "" 
"C:\Files\TCShell\NightlyRun\StartExecution.tcs"

 

  • The .tcs file contains the below information. Note: The value for JumpToNode should be the nodepath of the desired Execution list folder which you want to execute. 

          

UpdateAll

JumpToNode "/Execution/TaskScheduler"

task "Checkout Tree"

task "Run"

CheckinAll

UpdateAll

          

i. Configure Windows Task Schedular accordingly

  •   Open "Task Schedular" in your windows system
  •   Right click on "Task Scheduler Library" and select "Create Task" from the context Menu
  •   A new "Create Task" window opens, under "General" tab, fill fields like "Name", "Description" and make sure you click on Radio button "Run whether the user  is logged on or not" and check "Run with Highest privileges"   
  •   Switch to "Triggers" tab to specify conditions, click on "New" button at the buttom, a new window "New Trigger" opens up, please specify    the Date, time,  occurance etc. according to your Use-case. Once done click on "OK"
  •   Swith to "Actions" tab, click on "New" button at the buttom, a new window "New Action" opens up, select the option "Start a Program"       from "Action" dropdown
  •  Now, for "Programs/Script" to run as an action we have to select the batch file created above using "Browse" option. Once done, click on   "OK", also in subsequent boxes. Please make sure your Task with name is created/present along with list of other task

 

For more information and commands on TC shell, please refer our online manual

Link: https://support.tricentis.com/community/manuals_detail.do?lang=en&version=12.1.0&url=tosca_commander/tcshell.htm

Also, the required files ( .tcs and .bat ) are attached

Thank you

[opt.] Reference

Link1: https://www.youtube.com/watch?v=EInOL6D5f3Q 
Link2: https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7 

Attachments
0 0

Ramesh T

Created: 2020-01-30 12:59:44 , Updates: 1, Last Update: 2020-01-30 13:00:27

Great! It works.

 

0 0

Vinaya G N

Created: 2020-02-10 00:57:47

Dear All,

 

I am successfully able to execute this, but the execution logs are not saved in the execution list I acn see below CMD. Closing Workspace without saving changes. I tired with Task "Save" but no use . Could yopu please help?

 

Vinaya G N

2020-02-10 00:00:06

As I am using Single user workspace, I am not using the commands UpdateAll and CheckiAll

0 0

Satheesh Pyboni

Created: 2020-02-10 07:29:40

Important Note: This execution will take place only if the machine is Active.

Vinaya G N

2020-02-21 04:04:21

We want to run this everyday at 7am when the machine is not active, we are running on server. Could you please help me the best way?

Volker Müller

2020-03-05 14:16:26

Hi,

thats an important information. The desktop of the mashine running Tosca should not be locked, otherwise Tosca is not able to access the GUI.

We use a computer (No 1) to create an RDP connection to the comupter (No 2) running the automation. The execution is scheduled on computer No2 and computer No 1 will checkt the RDP connection is available just before the automation on computer No2 starts.

Thats a litle bit tricki, but it works fine.

Regards,

Volker

0 0

sabitha Bogadula

Created: 2020-03-05 10:11:03 , Updates: 1, Last Update: 2020-03-05 10:17:15

Can you please share sample or let me know how to schedule the script in single user environment? I am getting the below error

"C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\TCShell.exe" -workspace "D:\Tosca\TOSCA\TOSCA.tws" "C:\Users\sabithab\Desktop\TOSCARun.tcs"
Checking License ... License found!
Error: Unknown command 'updateall'!

 

But i didnt give update all command in the bat file

Harish Krishnadas

2020-03-05 09:19:06 , Updates: 1, Last Update: 2020-03-05 09:19:49

Hi Sabitha,

Please use the below command for Single User workspace. The below changes must be made in .tcs file

JumpToNode "/Execution/TaskScheduler"


task "Run"

 

Please let me know in case you face any issues

 

Best Regards,

Harish

0 0

Harish Krishnadas

Created: 2020-03-05 10:15:00

Hi Sabitha,

Please use the below command for Single User workspace

JumpToNode "/Execution/TaskScheduler"


task "Run"

 

Please let me know in case you face any issues

 

Best Regards,

Harish

sabitha Bogadula

2020-03-05 09:23:03

Hi Harish

I used as below

TOSCARun.tcs:

JumpToNode "/Execution/Execution_import200305_1622/ExecutionLists/Sanity_test_in_AIAS/Sanity_in_IE/Sanity"

task "Run"
 

in bat file as below

"C:\Program Files (x86)\TRICENTIS\Tosca Testsuite\TCShell.exe" -workspace "D:\Tosca\TOSCA\TOSCA.tws" "C:\Users\sabithab\Desktop\TOSCARun.tcs"

 

Did i miss anything? It is working fine in common repository.

My Env is in different network so if I run the bat file it fails saying cannot connect to repository(after providing the login details in bat file). So first I start the batch file then i connect my cable to different network. Then it works.

Because of this i wanted to run in single user env so it will not check the common repository.

Volker Müller

2020-03-05 14:12:00

Hi,

after running the execution list, you should also save the result, so the commande "save" is missing.

Regards,

Volker

0 0

Sagar Gaikwad

Created: 2020-03-05 12:48:54

Hi All,

 

In our login screen there is one extra field available(Authontication)

Please find the attachment of screenshot.

 

Regards,

Sagar Gaikwad

 

Attachments
0 0

Aman Kansal

Created: 2020-05-12 14:53:03

Dear Team,

We have a multiuser environment and using LDAP authentication while executing bat file, it always gives login failed error.

https://support.tricentis.com/community/article.do?number=KB0013500 <-- I tried this hack, but no success. Anyone faced same issue ?

Harish Krishnadas

2020-05-12 13:13:30

Hey Aman,

Just to confirm, did you paste "TCShell.exe.config" in "%TRICENTIS_ALLUSERS_APPDATA%\Settings\" after adding required tags?

Also, can you please show us how the code is written in .bat file. It should be like below
 

"C:\Program Files (x86)\TRICENTIS\TOSCA Testsuite\ToscaCommander\TCShell.exe" 
-workspace "C:\Tosca_Projects\Tosca_Workspaces\FirstSteps.tws"  
"C:\Files\TCShell\NightlyRun\StartExecution.tcs"


Best Regards,
Harish

0 0

Khushbu Lamba

Created: 2020-08-24 16:53:03

I want to autosave pdf file generated after  running unattended execution.Save command is not workin.Please suggest

0 0

Vishnu Ram

Created: 2020-09-14 18:56:16

I am trying to trigger execution via batch file. I have written below code in batch file.

"C:\Program Files (x86)\TRICENTIS\TOSCA Testsuite\ToscaCommander\TCShell.exe" -workspace
"C:\Tosca_Projects\Tosca_Workspaces\Salesforce YHA ECOM\Salesforce YHA ECOM.tws" -login "UserName" "Password" 
"C:\Files\TCShell\NightlyRun\ToscaExecution.tcs"

 

I have created one .tcs file with below data.

UpdateAll

jumptonode "/Execution/ExecutionLists/NightRun/smoke"

task "Checkout Tree"

task "Run"

CheckinAll

UpdateAll

Output: When I double click on batch file, it gets stuck to popup window where credentials of workspace is being entered.

Please see attached word file for the screenshot.

 

 

Attachments