Forum Discussion

ManiSaxena11's avatar
ManiSaxena11
Occasional Contributor
9 years ago

how can we load projects in project suite using batch file in Testcomplete

Hi,

 

I want to create a batch file from where I can load the desired Test Projects into the project suite and then execute that project suite.

 

We are actually trying to create a Framework where the batch file will check in excel that do user wants to execute it or not and as per to that it will load that test Project in Project Suite and after that we need to execute that Project Suite.

 

Could you please help on this.

 

Regards

Mani

4 Replies

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Colin_McCrae wrote:

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


      Colin_McCrae's response is a good one in that it describes what command-lines and such are available to run TestComplete.

       

      However, your original post seems to imply that you want to add projects to a project suite dynamically via batch file.  I'm not sure that's possible. 

       

      One way of looking at a project and project suite in TestComplete is that the Project/Project Suite architecture like the application you run.  When you run the project via testcomplete, you are compiling the code and executing it.  In an actual application, you can't just add new code units and new modules to the code AFTER it's already been compiled.  Even if you want the application to use DLL's and such externally, the application needs to be told that BEFORE it's compiled... 

      Now, that said... while you can't add projects to a project suite dynamically... you can call projects individually via the command line. 

       

      So, let's say you have your excel file with your list of projects you want to run. You'll have to write some sort of parser or powershell script or something to read through that excel sheet and pick out the project file names.  Then, for each project you want to run, you'll call a command line something like this:

       

      C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\TestComplete.exe C:\ProjectPath\MyProjectName.MDS /r /e /SilentMode

      As mentioned, the code to make these command line calls and to read through your Excel sheet will have to be done OUTSIDE of your TestComplete project. Perhaps you can implement some sort of CI application... perhaps something like Bamboo or Jenkins or something like that... which would do that kind of decision process for you and then call the TestComplete commandlines.

       

      P.S. Hey, Colin_McCrae... if I'm correct, you should receive, potentially, 2 different e-mail notifications for this message... one for the original post, and one for my additional edits I just made.  Double check... and I don't think it's necessarily one that you are tagged in, but simply one that you are configured to receive notifications for...