Forum Discussion
tdichter
14 years agoOccasional Contributor
Hi,
thanks alot for the tip Nikita, with this command line I am able to execute the scripts on the test execute machine.
Jared, I went over the lilnk you sent, it works fine - however, I want to provide more than one custom command line parameter, and it looks like only one is parsed by the "BuiltIn.ParamCount()"
This is the command line to send to Test Execute:
C:\Documents and Settings\Administrator>"c:\Program Files\Automated QA\TestExecute 8\bin\TestExecute.exe" C:\Test_complete_proj\VSS_2\VSS_1.pjs /r /p:VSS_1 /u:vss_script_1 /rt:main_1 /method_name=view_dirs /unc_path=\\\\1.5.2.1\\testing
in the method main_1, I print to the Log the parameters:
function main_1() {
BuiltIn.ParamCount()
param_count = BuiltIn.ParamCount();
Log.Message("param count is: " + param_count );
for (var i = 0 ; i < param_count; i++ ) {
Log.Message("param in counter # " + i + " is: " + BuiltIn.ParamStr(i));
}
}
in the log messages - I see only the "/method_name=view_dirs" - but not the "/unc_path=\\\\1.5.2.1\\testing"
When I replace the parameters order in the command line, I.E:
C:\Documents and Settings\Administrator>"c:\Program Files\Automated QA\TestExecute 8\bin\TestExecute.exe" C:\Test_complete_proj\VSS_2\VSS_1.pjs /r /p:VSS_1 /u:vss_script_1 /rt:main_1 /unc_path=\\\\1.5.2.1\\testing /method_name=view_dirs
I see the "/unc_path=\\\\1.5.2.1\\testing" and not the "/method_name=view_dirs"
I added the script's Log messages prints in the image attached.
Can you please let me know how can I transfer as many arguments as I can to the command line using this approach?
Thanks,
Tomer
thanks alot for the tip Nikita, with this command line I am able to execute the scripts on the test execute machine.
Jared, I went over the lilnk you sent, it works fine - however, I want to provide more than one custom command line parameter, and it looks like only one is parsed by the "BuiltIn.ParamCount()"
This is the command line to send to Test Execute:
C:\Documents and Settings\Administrator>"c:\Program Files\Automated QA\TestExecute 8\bin\TestExecute.exe" C:\Test_complete_proj\VSS_2\VSS_1.pjs /r /p:VSS_1 /u:vss_script_1 /rt:main_1 /method_name=view_dirs /unc_path=\\\\1.5.2.1\\testing
in the method main_1, I print to the Log the parameters:
function main_1() {
BuiltIn.ParamCount()
param_count = BuiltIn.ParamCount();
Log.Message("param count is: " + param_count );
for (var i = 0 ; i < param_count; i++ ) {
Log.Message("param in counter # " + i + " is: " + BuiltIn.ParamStr(i));
}
}
in the log messages - I see only the "/method_name=view_dirs" - but not the "/unc_path=\\\\1.5.2.1\\testing"
When I replace the parameters order in the command line, I.E:
C:\Documents and Settings\Administrator>"c:\Program Files\Automated QA\TestExecute 8\bin\TestExecute.exe" C:\Test_complete_proj\VSS_2\VSS_1.pjs /r /p:VSS_1 /u:vss_script_1 /rt:main_1 /unc_path=\\\\1.5.2.1\\testing /method_name=view_dirs
I see the "/unc_path=\\\\1.5.2.1\\testing" and not the "/method_name=view_dirs"
I added the script's Log messages prints in the image attached.
Can you please let me know how can I transfer as many arguments as I can to the command line using this approach?
Thanks,
Tomer
Related Content
- 3 months agoMarius78