Forum Discussion

tc_2018's avatar
tc_2018
Contributor
6 years ago

Working command line does not work in batch file

Hello Everyone,

 

My command line below works perfectly when running on CMD. However, when I put it a batch file, it does not execute my test. It only opens my test suite.

 

c:\Program Files (x86)\SmartBear\TestComplete 14\x64\Bin>TestComplete.exe " C:\Works\MyProjects\SmokeTest.pjs" /r /p:SmokeTestOne /t:"KeywordTests|MyTests"

 

PS: I did follow this post but not successfull.

 

Thanks for your input!

  • You can't run the batch file from TestComplete like that... you need to call TestComplete within the batchfile as the part of the command line as indicated.  Then simply execute the batch file.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Can you provide us with the line from command file that does not work?

     

    • tc_2018's avatar
      tc_2018
      Contributor

      AlexKaras wrote:

      Hi,

       

      Can you provide us with the line from command file that does not work?

       


      REM Clears the screen
      CLS
      @ECHO OFF
      REM Launches TestComplete,
      REM executes the specified project
      REM and closes TestComplete when the run is over
      "C:\Works\DriverLicense\DLS_SmokeTest.pjs" /r /p:DLS_SmokeTest /t:"KeywordTests|MyTests" /run /exit
      
      IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
      IF ERRORLEVEL 1000 GOTO AnotherInstance
      
      ...
      
      ...
      
      :End



      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        You need to actually reference the TestComplete tool.  

         

        REM Clears the screen
        CLS
        @ECHO OFF
        REM Launches TestComplete,
        REM executes the specified project
        REM and closes TestComplete when the run is over
        "C:\Program FIles (x86)\SmartBear\TestComplete 14\bin\TestComplete.exe" "C:\Works\DriverLicense\DLS_SmokeTest.pjs" /r /p:DLS_SmokeTest /t:"KeywordTests|MyTests" /run /exit
        
        IF ERRORLEVEL 1001 GOTO NotEnoughDiskSpace
        IF ERRORLEVEL 1000 GOTO AnotherInstance
        
        ...
        
        ...
        
        :End