Forum Discussion

kimmatsumoto's avatar
kimmatsumoto
Contributor
9 years ago

TextExecute- command line to only execute a Group

I need help writing a TestExecute command line to only execute a Group and 2 test items- all my attempts have failed.

I've attached my project and identified which items/group I want to execute via command line.

 

Thanks,

Kim

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Unfortunately, as far as I can tell, you cannot execute Test Items (what you have indicated) from the command line.  You can, however, execute a routine/function in a script code unit from the commandline.  From the help:

     

    TestComplete Command Line

    • /project:project_name  /unit:unit_name  /routine:routine_name

      TestComplete will run the specified script routine. Project_name specifies the name of the project to which the routine belongs. Unit_name specifies the name of the unit holding the desired routine. Routine_name is the name of the script routine to be called. The routine to be called must not use parameters or return any values. Project_name and unit_name should be the same as the project and unit names shown in the Project Explorer.

       

       

     

    So, what I would recommend is that you create just a simple script routine in some unit of code somewhere that all it does is execute those pieces you want to run from command line.  You don't need to link that routine to a test item so it doesn't need to clutter up your main test.  You can then use the syntax I've pasted above to run that routine from the commandline and get your test executed.