Forum Discussion

sguda's avatar
sguda
Regular Contributor
14 years ago

Accessing Remote station through scripting.

Hi

I developed a load test. Configured the host machine, verified the connection. Created a job to run the test on other's machine.

It executed fine.

Now i want to run the same test through scripting.



I have setup the hopst machine "Indira" visually . 



This is what i coded in my script.



Set station2 = loadtesting.station......("Indira")





Virtualusers.user(i).station = station2



When it is trying to access the station it is giving me this error.



But it is executing  fine visually in the job

4 Replies

  • sguda's avatar
    sguda
    Regular Contributor

    This is the part of code of my script.



    set Station1 =



     



    LoadTesting.Stations.ItemByName("Master")

    set Station2 =
    LoadTesting.Stations.ItemByName("Indira")



    For i = 0 to 5



      Set VirtualUsers(i) = TestInstance.User(CStr(i))

      Set VirtualUsers(i).Task = HTTPTask



      if (i = 0) Or (i = 1) Or (i = 2) Then

         Set VirtualUsers(i).Station = Station1

      else

         if (i = 3) Or (i = 4) Or (i = 5) Then

            Set VirtualUsers(i).Station = Station2

         end if

      end if 

      Set
    VirtualUsers(i).TestInstance = TestInstance



    next



    I have my test set up with 6 virtual users.



    I am trying to do distribution testing , for next 3 users on other machine called "Indira".



    I have set up that host machine visually and verified and the connection was ok. i copied the the project in host machine.



    I have set up the job and executed visually. It is executing the load test and working fine.



    I want to try through scripting b'se i want only few users to run on my machine(Master) and few on host machine.



    while executing this script while assigning user to station 2 it is giving this error message which i attached in previous post.



    Please look into that and help me if any body has any idea why it is not working.

     



  • sguda's avatar
    sguda
    Regular Contributor
    Hello,



    Can anybody give any suggesstion why it is not working.



    Thanks.
  • sguda's avatar
    sguda
    Regular Contributor
    Hi Can anybody give an update on this please.



    Thanks.