Forum Discussion
Per the documentation above, you can specify the .pjs file and it should run every project in the file.
You could also specify each project individually insuccession.
file_name
Launches TestComplete and loads the specified project (.mds file) or project suite (.pjs) into it
Attached the scrpt/. This is how I am trying to do .
REM Clears the screen
CLS
@ECHO OFF
REM Launches TestComplete,
REM executes the specified project
REM and closes TestComplete when the run is over
start /wait "C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\TestExecute.exe" "C:\Users\nisgupta\Documents\TestComplete\IS\Infrastructure\HSC\SECCProjectSuite\SECCProjectSuiteHSC.pjs" /r /e
start /wait "C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\TestExecute.exe" "C:\Users\nisgupta\Documents\TestComplete\IS\Student\FASBS\HSC Financial Aid SBS\HSC Financial Aid SBS.pjs" /r /e
IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
IF ERRORLEVEL 1000 GOTO AnotherInstance
IF ERRORLEVEL 127 GOTO DamagedInstall
IF ERRORLEVEL 4 GOTO Timeout
IF ERRORLEVEL 3 GOTO CannotRun
IF ERRORLEVEL 2 GOTO Errors
IF ERRORLEVEL 1 GOTO Warnings
IF ERRORLEVEL 0 GOTO Success
IF ERRORLEVEL -1 GOTO LicenseFailed
:NotEnoughDiskSpace
ECHO There is not enough free disk space to run TestComplete
GOTO End
:AnotherInstance
ECHO Another instance of TestComplete is already running
GOTO End
:DamagedInstall
ECHO TestComplete installation is damaged or some files are missing
GOTO End
:Timeout
ECHO Timeout elapses
GOTO End
:CannotRun
ECHO The script cannot be run
GOTO End
:Errors
ECHO There are errors
GOTO End
:Warnings
ECHO There are warnings
GOTO End
:Success
ECHO No errors
GOTO End
:LicenseFailed
ECHO License check failed
GOTO End
:End
Finally I figured out.
Here we can mention the following commands in bat file when running multiple projects in sequence
"C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\TestExecute.exe" "Path to the Project1.mds" /run /exit
"C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\TestExecute.exe" "path to Project2.mds" /run /exit
We can also continue running the GUI tests if close the RDP connection. The details are in the link below.
https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html
To disconnect from Remote Desktop, run the following command on the remote computer (in the Remote Desktop window) as an Administrator:
%windir%\System32\tscon.exe RDP-Tcp#NNN /dest:console
RDP-Tcp#NNN is the ID of your current Remote Desktop session, for example, RDP-Tcp#0. You can see it in the Windows Task Manager on the Users tab, in the Session column.