Forum Discussion

mikev's avatar
mikev
Contributor
14 years ago

Test Execute - Command line

I have a project
Suite. Inside that suite, I have a project. Inside the project, I
have many scripts, but only one of the scripts is a Test Item. From the
TC GUI, I can either run the entire project, or I can run the Test
Item. It all works fine. For my next step, I want to run this test
remotely. So I installed Test Execute on the remote machine. Once I
figured out what was needed, I can launch Test Execute, open up the
Project and select run. When I do that, the test runs just fine. OK,
so now to the command line issue (as I'll be implementing this in
Jenkins as soon as I get this figured out). Straight from the help, I
created a *.bat file just to make sure I have the command line syntax
correct. Here is is:



REM Clears the screen
CLS
@ECHO OFF

REM Launches TestExecute
REM executes the specified project
REM and closes TestExecute when the run is over

"C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "R:\STORM\UserSubsetGrid\UserSubsetGrid.mds /r /e"


REM If errorlevel is equal to or greater than 4, go to unknown
IF ERRORLEVEL 4 GOTO Unknown
IF ERRORLEVEL 3 GOTO CannotRun
IF ERRORLEVEL 2 GOTO Errors
IF ERRORLEVEL 1 GOTO Warnings
IF ERRORLEVEL 0 GOTO Success

:Unknown
ECHO Unknown return code
GOTO End

:CannotRun
ECHO The test 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

:End


When I run the bat file, the cmd window appears, and I can see that Test Execute is
running. However, nothing happens at all. The paths are correct, so I
don't know what I'm doing wrong. Ideas?





2 Replies

  • Hi Mike,


    Try moving /r /e out of the second parameter:


    "C:\Program Files (x86)\Automated QA\TestExecute 8\Bin\TestExecute.exe" "R:\STORM\UserSubsetGrid\UserSubsetGrid.mds" /r /e

  • Irene,

     For some reason I didn't see your response in my email.  In either case, I figured it out, and your solution is the answer.  You can't enclose the run options in the double quotes.  Thanks for your help!