Forum Discussion

slecault's avatar
slecault
Contributor
10 years ago

TestExecute - commandLine - Group of tests

Is there a way to start a group of tests with TestExecute via command line (DOS)?

see image, I would like to TestExecute only the circled keyword tests.

 Clipboard01.jpg

 

I have tried many attempts without success (reading both documentation and some threads)

 

 

 

TestExecute.exe "c:\TC\web\WebSuite\WebSuite.pjs" /r /p:TestWeb /t:"Group1|Start|Renouvellement|Test1" /exit
---------------------------
TestExecute
---------------------------
Invalid command line. The test 'Group1|Start|Renouvellement|Test1' was not found in the project 'TestWeb'.
---------------------------
Help   OK   
---------------------------


TestExecute.exe "c:\TC\web\WebSuite\WebSuite.pjs" /r /p:TestWeb /t:"Test1" /exit
---------------------------
TestExecute
---------------------------
Invalid command line. The test 'Test1' was not found in the project 'TestWeb'.
---------------------------
Help   OK   
---------------------------


TestExecute.exe "c:\TC\web\WebSuite\WebSuite.pjs" /r /p:TestWeb /t:"ProjectTestItem1" /exit
---------------------------
TestExecute
---------------------------
Invalid command line. The test 'ProjectTestItem1' was not found in the project 'TestWeb'.
---------------------------
Help   OK   
---------------------------

TestExecute.exe "c:\TC\web\WebSuite\WebSuite.pjs" /r /p:TestWeb /t:"Group1|Start|Renouvellement|ProjectTestItem1" /exit
---------------------------
TestExecute
---------------------------
Invalid command line. The test 'Group1|Start|Renouvellement|ProjectTestItem1' was not found in the project 'TestWeb'.
---------------------------
Help   OK   
---------------------------

TestExecute.exe "c:\TC\web\WebSuite\WebSuite.pjs" /r /t:"Group1|Start|Renouvellement|ProjectTestItem1" /exit
--- Runs everything...

TestExecute.exe "C:\TC\Web\WebSuite\TestWeb\TestWeb.mds" /r /t:"ProjectTestItem1" /exit
--- Runs everything...

TestExecute.exe "C:\TC\Web\WebSuite\TestWeb\TestWeb.mds" /r /t:"KeywordTests - Test1" /exit
--- Runs everything...

TestExecute.exe "C:\TC\Web\WebSuite\TestWeb\TestWeb.mds" /r /t:"TestWeb|Group1|Start|ProjectTestItem1" /exit
--- Runs everything...

TestExecute.exe "C:\TC\Web\WebSuite\TestWeb\TestWeb.mds" /r /t:"KeywordTests|Test1" /exit
--- Runs everything...
    • slecault's avatar
      slecault
      Contributor

      The article reffered to by Tanya was fine but I was not familiar on running vbs from windows/command line.

      After some more hints from the support team on how to make it work using vbscript:
      The vbs code needs to be inside a standalone file with the extension .vbs
       
      This .vbs file can be anywhere (outside the projectsuite), it will invoke TestComplete/TestExecute
       Thanks
       
       In my case, the final line is:

       

       

      "C:\Folder\RunTestItemGroup.vbs" "c:\TC\Web\WebSuite\WebSuite.pjs" /p:TestWeb /testitemgroup:Renouv1Rx

       

       

       

       

       

       

       

       

       

    • slecault's avatar
      slecault
      Contributor

      My understanding:

       

      I create a group containing the unit with the code RunTestItemGroup.  The extension of my unit is .svb!

      When I will start from command line the RunTestItemGroup, it will start MyTestGroup from MyProject.

       

      Are there other necessary switches like /run?, 

      Also I have change TestComplete.9 to .11 in the code

       

      TestComplete.exe "c:\TC\RunTestItemGroup\RunTestItemGroup\Script\Unit1.svb" "c:\TC\Web\WebSuite\WebSuite.pjs" /p:TestWeb /testitemgroup:Renouv1Rx
  • ml's avatar
    ml
    Contributor

    Did you tried the "/pi:"-command for project-items?

     

    TestExecute.exe "C:\TC\Web\WebSuite\TestWeb\TestWeb.mds" /r /pi:"Renouvellment" /exit
    • slecault's avatar
      slecault
      Contributor

      The /pi is for a project item, according to online doc, the project item is an item like "Scripts, keyword tests, network suite...".  What I need to start is a "test item"

      • ml's avatar
        ml
        Contributor

        There is no option to start Test Items. Would suggest to a, ask the support and b, make a feature request (a will refer to b if there is no solution).