TFS Azure: How to configure testcomplete to take the build path, instead of specifying in script
I am trying to run automated tests on our nightly builds and I have specified the path in the command line script, however, the build path is bound to change sometimes. Is there a way testcomplete can be configured to take the build path instead of specifying the path manually in the command line script.
Solved! Go to Solution.
We have a TestComplete Test Adapter than can be implemented into Azure Pipelines projects, this allows you to specify a Search Folder and Test filter criteria to find/run applicable tests. This would be one way to avoid having baked in locations in scripts that launch TC/TE. With this adapter installed it can interact directly with either tool without the need for CLI scripts as well. Below is a link to setup of this adapter. I hope this would be relevant to your use case.
Solutions Engineer @ SmartBear
you could use the azure devops plugins as @npaisley mentioned. (which will actually work as a COM server, not CLI)
you can also continue to use the CLI instead as you are doing.
Im assuming you are doing something like
<path to testcomplete or testexecute exe> <path to project suite file> <a set of runtime arguments like /r /p /e etc.>
where you are asking about how to make that highlighted path to the pjs to run more dependable.
Since you are using pipelines, im going to assume that you are actually pulling the code from a SCM like github etc. (whatever your org uses).
Then, this path can be referred to using Azure's predefined variables such as :
I'm not sure these address my question. My question is regarding the path to the build that is getting tested.
The script I have run is as follows:
"C:\Program Files (x86)\SmartBear\TestExecute 14\Bin\SessionCreator.exe" RunTest /UserName:**** /Password:***** /UseActiveSession /ScreenResolution:1920*1080 /ProjectPath:"C:\Projects\***\60\s\TestComplete\TestCompleteAutomationSuite\TestProjectFMSmokeTest\TestProject-FMSmokeTest.pjs"/ExportLog:"C:\temp\AutoTest.mht"/ExportSummary:"C:\temp\AutoTest.xml" /Timeout:600
The highlighted 60 in project path can be any random number resulting in error if different from what was specified. Is there a way to edit this script or get test execute to get the path dynamically? Also, please see below my set up and advise accordingly. Thanks
this path (in your case something like "c:/agent/_work/60/s) can be referred to using Azure's predefined variables such as :
so something like
of course it's up to you to figure out the relative path of the folders, projects, and paths as it relates to that build directory