Forum Discussion

cokyn's avatar
cokyn
Contributor
12 years ago

Run NetworkSuite with parameters

Hi,



I have written script which will install various clients on PC. The script is run with 2 parameters "apppath" and "client".

The script is started from the command line by the following command:



"<TC path>\TestComplete.exe" "<Path to project>\Installation.pjs"  /r /project:Installation /test:"Script|Unit1|ProcessCommandLine" "AppPath=<shared network folder>\PLIS-2.1.7.5993.exe" "Client=GCLIENT"



AppPath is the same for all clients, the "Client" parameter can have the following values GCLIENT,WEBCLIENT,TCLIENT - it depends on which client you want to install on PC.



Now I would like to create a NetworkSuite and run this script on remote computers but I am struggling with how to set parameters for NetworkSuite. The idea is that our TeamCity server is going to run the script after each build and the script will install the same version of the application but with different clients on the appropriate PC's.



I was able to create a testsuite and set both parameters as variables and then send this test suite to a host and execute it, but I need that performed from command line. It should looks like:



Host1:"<TC path>\TestComplete.exe" "<Path to project>\Installation.pjs"  /r /project:Installation /test:"Script|Unit1|ProcessCommandLine" "AppPath=<shared network folder>\PLIS-2.1.7.xxxx.exe" "Client=GCLIENT"



Host2:"<TC path>\TestComplete.exe" "<Path to project>\Installation.pjs"  /r /project:Installation /test:"Script|Unit1|ProcessCommandLine" "AppPath=<shared network folder>\PLIS-2.1.7.xxxx.exe" "Client=WEBCLIENT"



Host3:"<TC path>\TestComplete.exe" "<Path to project>\Installation.pjs"  /r /project:Installation /test:"Script|Unit1|ProcessCommandLine" "AppPath=<shared network folder>\PLIS-2.1.7.xxxx.exe" "Client=TCLIENT"



Thanks in advance

Martin







4 Replies

  • Ok, simple question - Is it possible to run script with parameters as NetworkSuite? Can anybody help me please?

    I assume a lots of people have to struggle with this problem.
  • Thank you for your "help" !



    I finally resolved this problem. I run pre-script which set local variables from inserted parameters. Then I run network testsuite that works with those variables.





  • I found in the following article http://support.smartbear.com/viewarticle/27205/ wihin the Test section that "








    Note:

    If Test specifies a script routine, that routine must have no parameters.

    "

    So how is it possible to run routine with parameters in NetworkSuite (the routine ProcessCommandLine in my case)?



    Cuold anybody help me please?