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"
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
You can definitely pass in arguments from the command line:
There is section at the bottom that describes how to do so.