Forum Discussion

nish_b's avatar
nish_b
Contributor
5 years ago
Solved

TestComplete Command Line

I want to make the command for execution of TestComplete tests as generic as possible without any hardcoded path. I have below queries regarding the use of Command line interface for TestComplete test execution:

 

Queries regarding command line execution:
1) How to use Project.Path or Project.FileName to get the current machine's current project path in the Command line execution?
2) How to use aqDateTime.Now() for creating a folder with current date and time stamp to get the logs or reports organized in a single folder as per the execution run time and date?

 

I tried to use + to append the above functions' values to the command but it didn't worl. Below is the sample command that I used.

 

TestComplete.exe Project.FileName /r /t: Test1 /el: "C:\Users\test\Documents\TestResults\"+aqDateTime.Now()+"\Test1_Run1.html" /ErrorLog: "C:\Users\test\Documents\TestResults\"+aqDateTime.Now()+"\Test1_Run1_Errors.html" /es:"C:\Users\test\Documents\TestResults\"+aqDateTime.Now()+"\Test1_Run1_Summary.html"

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Project.Filename, aqDateTime, etc.... are all objects/properties that are only present in the runtime execution of the project... they are not valid as part of the commandline as the project hasn't executed yet.  

     

    To do what you want, you'll need to use some other tool like PowerShell or some BASIC within a batch file or something to make your commandline more generic