Forum Discussion

m_essaid's avatar
m_essaid
Valued Contributor
8 years ago

specifying project in a TestExecute run

Hi,

 

If I read correctly there is no way to specify the project while running a test with TestExecute ?

 

TestExecute can only run a whole Project Suite n which project and items are checked or not ?

 

It's a little bit annoying for parrallel testing...

 

Thanks,


Mehdi

  • I'm assuming you've read this article?

    https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/command-line.html

     

    Because, all you need to do is pass in the project suite as the file name and then the project name.  That is, so long as the project is part of the project suite.  Something like

     

    "C:\Program Files\SmartBear\TestComplete 12\Bin\TestComplete.exe" "C:\My Projects\MySuite.pjs" /r /p:MyProj /e /SilentMode

    The above example is taken straight from the help topic.  This will load the project suite and then execute the project indicated.

    Now, just one note... the project must be part of the project suite.  If you're trying to run a project and have it report under a project suite to which it is not attached, this will not work.  But the above code line should do what you're asking given any project within a given project suite.


  • m_essaid wrote:

    Hi,

     

    If I read correctly there is no way to specify the project while running a test with TestExecute ?

     

    TestExecute can only run a whole Project Suite n which project and items are checked or not ?

     

    It's a little bit annoying for parrallel testing...

     

    Thanks,


    Mehdi


    Umm I'm quite sure it is possible to drill down into the project you want and event the keyword test or script that you want to run. You'll simply have to use the command line (with a lot of arguments). I did it once when I was evaluating TestExecute for the first time to see if it actually worked although that was a while ago so I don't have a sample for you. See the info here for how to use the CLI to do what you want:

    https://support.smartbear.com/viewarticle/90518/

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Finaly I created another project suite and added the project as "existing item"

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Actually, you should be able to pass the MDS file to the TestExecute commandline instead of the PJS file.  That should execute the single project without having to add it to a suite.

       

      From the help:

       

      file_name - Launches TestExecute and loads the specified project (.mds file) or project suite (.pjs) into it.

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    hi guys,

     

    that's almost fine, I ran Projects by calling them specifically.

    but... now I can't visualize the reports in the project suite (indeed, they aren't linked to the project suite but to the project) and I wish I could have them in the shared results of the project suite.

    Is there any way to do that ?

     

    Thanks,

     

    Mehdi

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      I'm assuming you've read this article?

      https://support.smartbear.com/testcomplete/docs/working-with/automating/command-line-and-exit-codes/command-line.html

       

      Because, all you need to do is pass in the project suite as the file name and then the project name.  That is, so long as the project is part of the project suite.  Something like

       

      "C:\Program Files\SmartBear\TestComplete 12\Bin\TestComplete.exe" "C:\My Projects\MySuite.pjs" /r /p:MyProj /e /SilentMode

      The above example is taken straight from the help topic.  This will load the project suite and then execute the project indicated.

      Now, just one note... the project must be part of the project suite.  If you're trying to run a project and have it report under a project suite to which it is not attached, this will not work.  But the above code line should do what you're asking given any project within a given project suite.

      • m_essaid's avatar
        m_essaid
        Valued Contributor

        tristaanogre to be honnest I did not read the manual...

        but your answer is perfect, thank you.

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi,

     

    This time I read the manual but I still have a question :

     

    Assume that I have 4 projects in a project suite : A, B, C and D.

     

    I need a command line that will make TestExecute run project A and B.

    I did not find the way to specify several projects (repetition of the /p: markup, use of pipe, colon...)

     

    Does anyone could help ?

     

    Thank you,

     

    Mehdi

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      You are correct, there's no way to list multiple projects in the same command line.  That is, technically, what a project suite is intended to do.  So, if you want to run two projects in sequence, you'll need to either create a project suite with only those two projects or call them on two separate command line calls.

      • m_essaid's avatar
        m_essaid
        Valued Contributor

        Thanks, but none of theses solutions are good for me.

         

        If I create 2 ProjectSuite, I will need to add all the Stores\Files and maintain them... It's heavy.

         

        And I can't use the Start /wait command because between 2 projects I use a lot cmd runs...

         

        The only thing I could do I to manage to make a powershell script. But it's a pain.