Forum Discussion

sarya's avatar
sarya
Frequent Contributor
16 years ago

Command line to run the task in network suite

Hi,



I am trying to run a project from the network suite with a task 'task1' created in it. I want to schedule it using the TC command line but the syntax mentioned in help files does not suggest using the job and the task .If I try to run the whole project,it runs it on the master machine and does not point to the slave .I want the command line directly to point to the job and the task created in the network suite.



Thanks,

Sumedha

3 Replies

  • Hi,



    You need to create a test item which will run the target task in your project and start the entire project via the command line.
  • kmaclean's avatar
    kmaclean
    Occasional Contributor
    I'm coming to this rather late in the game.



    I've create a Network Suite, and registered a host.  I have also created a job that runs my tests remotely, and specified the registered host.  This works fine when I'm executing the tests.  However, is there any way to specify the host via TestExecute (i.e. I want to make multiple calls to the same job, but run it on a different host each time).
  • Hi,



    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: