cancel
Showing results for 
Search instead for 
Did you mean: 

Execute a TestComplete script from an .exe with predefined variables?

SOLVED
Occasional Contributor

Execute a TestComplete script from an .exe with predefined variables?

Hey all, I'd like to set up a .exe that automatically runs my test script, and I need the exe to supply a few variables. How would I do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Execute a TestComplete script from an .exe with predefined variables?

Hey,

 

I assume you will run this .exe with cmd so you can run it with cmd in this way:

"C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\TestComplete.exe" "C:\work\testComplete\your_app.pjs" /r /p:project_name /param1:param1Val /param2:param2Val

You can see adding new variables from cmd in this thread:

setting-and-using-variable-within-same-command-line-in-windows-cmd-exe 

 

Additionally you can add values of variables in "TestedApps" of the project or if you use Jenkins' CI you can pass them also as values in cmd.

 

Reading the transmitted values from cmd can be done by using the TestComplete class named BuiltIn

 

BuiltIn.ParamStr(i)...

 

View solution in original post

1 REPLY 1
Highlighted
Community Leader

Re: Execute a TestComplete script from an .exe with predefined variables?

Hey,

 

I assume you will run this .exe with cmd so you can run it with cmd in this way:

"C:\Program Files (x86)\SmartBear\TestComplete 14\Bin\TestComplete.exe" "C:\work\testComplete\your_app.pjs" /r /p:project_name /param1:param1Val /param2:param2Val

You can see adding new variables from cmd in this thread:

setting-and-using-variable-within-same-command-line-in-windows-cmd-exe 

 

Additionally you can add values of variables in "TestedApps" of the project or if you use Jenkins' CI you can pass them also as values in cmd.

 

Reading the transmitted values from cmd can be done by using the TestComplete class named BuiltIn

 

BuiltIn.ParamStr(i)...

 

View solution in original post