Forum Discussion
YMinaev
Staff
14 years agoHi,
You can pass the name of the target host in a custom command-line parameter (for example, <path to TE>\TestExecute <project suite path> <parameters which control what to run> /host:<name or IP>).
In your code, when you need to change the host, parse TE's command line by using the ParamCount and ParamStr methods (see the "BuiltIn.ParamCount" and "BuiltIn.ParamStr" help topics). Obtain the host name and assign it to your host like this:
You can pass the name of the target host in a custom command-line parameter (for example, <path to TE>\TestExecute <project suite path> <parameters which control what to run> /host:<name or IP>).
In your code, when you need to change the host, parse TE's command line by using the ParamCount and ParamStr methods (see the "BuiltIn.ParamCount" and "BuiltIn.ParamStr" help topics). Obtain the host name and assign it to your host like this: