最近有人问到在windows计划任务中添加TC命令行调用的问题,其实TC的帮助文档中有一些命令行调用TC的例子可以参考,摘录如下:
Examples
Below are several examples of running TestComplete via the command line.
Note: The sample command lines below may split into two or more lines. This is a visual effect that depends on the width of the help viewer’s window. When specifying a command line for TestComplete, type all command-line arguments into the same line.
The following command runs TestComplete, loads the specified project suite (MySuite.pjs) and launches test items of the MyProj project:
"C:/Program Files/Automated QA/TestComplete 7/Bin/TestComplete.exe" "C:/My Projects/MySuite.pjs" /r /p:MyProj
The following command runs TestComplete, loads the specified project suite (MySuite.pjs), launches all projects that are enabled, waits until the run is over and then closes TestComplete:
"C:/Program Files/Automated QA/TestComplete 7/Bin/TestComplete.exe" "C:/Work/My Projects/MySuite.pjs" /r /e
The following command runs TestComplete, loads the specified project suite (MySuite.pjs), and runs the tests associated with the NetworkSuite project item of the MyTest project:
"C:/Program Files/Automated QA/TestComplete 7/Bin/TestComplete.exe" "C:/Work/My Projects/MySuite.pjs" /r /p:MyTest /pi:NetworkSuite
The following command runs TestComplete, loads the specified project suite (MySuite.pjs), and launches the Main script routine located in the Unit1 unit of the MyProj project:
"C:/Program Files/Automated QA/TestComplete 7/Bin/TestComplete.exe" "C:/Work/My Projects/MySuite.pjs" /r /p:MyProj /u:Unit1 /rt:Main