Forum Discussion

clay's avatar
clay
Contributor
7 years ago
Solved

Multiple project items on a command line?

We are generating command procedure files dynamically and running test sets via the TestComplete command line interface.

 

Is it possible to execute a sequential set of arbitrary project items within a single command line?

  • Not multiple items, no... It's one project item per line.  This is where a framework structure that executes tests based upon data rather than on internal test complete structures seems to work best... to run a particular set of tests, you just need to configure the data.  I've done it with Excel files, CSV files, and SQL data.  You might want to investigate engineering this kind of structure to indicate what you want to run.

4 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    If I'm not mistaken since you can specify a Test Item to run, you could put them all in a group, otherwise it would have to be each line for each test.

     

    What I have done actually is to just run a project in it's entirety, but have our test plan create by a jira plugin called TestFlo, we have identifiers that link the test cases to automation assets and we pull all expected tests to be ran via the jira REST API. Then when each test item starts, we check if it's include int he test plan and run it, if it's not log a message and skip it. 

     

    Much like tristaanogre relying on data to drive which tests you want to run. 

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Not multiple items, no... It's one project item per line.  This is where a framework structure that executes tests based upon data rather than on internal test complete structures seems to work best... to run a particular set of tests, you just need to configure the data.  I've done it with Excel files, CSV files, and SQL data.  You might want to investigate engineering this kind of structure to indicate what you want to run.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    One more possible approach is to enhance the ATR.js script (https://support.smartbear.com/viewarticle/54655/) so that it parses the delimited list of test items passed in the command line and execute them in the loop..

    The sample command-line might look like this (test items are ~-delimited):

    C:\ATR.js TestComplete "C:\Projects\TestProjectTestForRunFromCommandLine.pjs" /p:TestProjectTestForRunFromCommandLine /t:"ProjectTestItem1~ProjectTestItem2~ProjectTestItem3"

  • clay's avatar
    clay
    Contributor

    All good thoughts.  I will leave this open a little while longer to see if there are any more ideas.  Thanks, again, to everyone.