Pass TestComplete variable to Jenkins.
- 7 years ago
So, just to be clear... you want something like this:
C:\Program Files (x86)\SmartBear\TestComplete 12\bin\TestComplete.exe "C:\MyProjects\MyProject.pjs" /r /e /myVariable="12345"
where the value that is in red you want to populate the variable value in TestComplete, yes?
The answer is---- You can't out of the box. You need to write code in TestComplete to read the commandline, find the parameter, read it, parse out the value, and assign it to your variable.
Besides... didn't you just mark this thread as having a solution? Is it not working? What are you trying to do that is not covered in the below thread?
https://community.smartbear.com/t5/TestComplete-General-Discussions/command-line/m-p/168961#M31263 - 7 years ago
As said in the previous thread you have to assign your command line argument value to your Project.Variables.<variableName>, just grabbing the argument does not set the value to anything, you have to this yourself.
Something like if you're pasing /arg=val for example.
Project.Variables.var1 = BuiltIn.ParamStr(<positionOfArgument>).split("=")[1]