Ask a Question

How so i run the load test by scripting using the load test scenario.

sguda
Regular Contributor

How so i run the load test by scripting using the load test scenario.

Hi I have created a Load test scenario(QA_Login) with Num : 6 virtual users, ramp up : Add 1 VU every 5 sec's,

checked : run concurrently, Browser: recorded, Task: QAFA_Login, Work station: Master,  Connection speed : Max speed, Start delay : 0, Connect host feild checked.



How do i set all these properties if i have to create Virtual users in the script and run concurrently.





Also please tell me how can use the existing load test scenario and set Login id: test1 and password; test1 and station as master for first 1,2,3 VU'S and Login id: test2 and  password: test2 and station as station2 for 4,5,6 VU'S. Please let me know.



I looked at connections and requests,

For connection5 and request 2, i saw in the response body the parameters

txtUserName : test1

 


txtUsrPassword: test1



So please let me know how can i set these values what i want and run the load test in bothe cases of creating VU'S in the script and using the load test scenarion i already have.



will be waiting eagerly for the response.



 
5 REPLIES 5
sguda
Regular Contributor

RE: How so i run the load test by scripting using the load test scenario.

To make things clear i want to change the login is and password parameters in the response body of connection 5 and request 2.



Please tell me how can i do that.
sguda
Regular Contributor

RE: How so i run the load test by scripting using the load test scenario.

Hi



I am sorry about the previous post, actually it is in request body of the post type request, i need to change the parameters for last 3 VU'S.



Thanks.
sguda
Regular Contributor

RE: How so i run the load test by scripting using the load test scenario.

This is the request body of coneection 5 and request 2.







__LASTFOCUS=&ctl00_ContentPlaceHolderScripts_RadScriptManager1_TSM=%3B%3BSystem.Web.Extensions%2C+Version%3D3.5.0.0%2C+Culture%3Dneutral%2C+PublicKeyToken%3D31bf3856ad364e35%3Aen-US%3A1247b7d8-6b6c-419f-a45f-8ff264c90734%3Aea597d4b%3Ab25378d2%3BTelerik.Web.UI%2C+Version%3D2009.3.1314.35%2C+Culture%3Dneutral%2C+PublicKeyToken%3D121fae78165ba3d4%3Aen-US%3A603d133a-f943-435d-a80d-57457cc55f4a%3A16e4e7cd%3A86526ba7%3Ab7778d6c&__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUINzk4OTY3NzcPZBYCZg9kFgICAw9kFgYCA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YfBSgrBAM4cHQfBhsAAAAAAEBlQAEAAAAfBwUQcmlUZXh0Qm94IHJpUmVhZB8IAoIOZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUXY3RsMDAkUmFkRm9ybURlY29yYXRvcjGLWAJgz7fD4HSU9yeCBktLToeWuA%3D%3D&__EVENTVALIDATION=%2FwEWBgKQtfKBBALt0KWSBQLz3MWBCgKXjtWvBgKxvYOdDgLCxOKbA4rGOTOZuqlyncL2kW0AplYVE9nn&ctl00_RadFormDecorator1_ClientState=&ctl00_ContentPlaceHolderContent_txtUserName_text=aprilg&ctl00%24ContentPlaceHolderContent%24txtUserName=aprilg&ctl00_ContentPlaceHolderContent_txtUserName_ClientState=&ctl00_ContentPlaceHolderContent_txtUsrPassword_text=aprilg&ctl00%24ContentPlaceHolderContent%24txtUsrPassword=aprilg&ctl00_ContentPlaceHolderContent_txtUsrPassword_ClientState=&ctl00%24ContentPlaceHolderContent%24btnLogin=Login







So i am using this code to change parameters and stations for VU's and for the load test scenario i have.(QA_Login).




Sub Param_LogInId

  Dim VirtualUsers(6) 

  set TestInstance = 



 



LoadTesting.Tests.TestByName("QA_Login").CreateTestInstance

  set Station1 =
LoadTesting.Stations.ItemByName("Master")

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

 


 




 


  For i = 0 To 5

      Set HTTPTask = LoadTesting.HTTPTask("QAFA_Login")

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

      Set VirtualUsers(i).Task = HTTPTask

      Set VirtualUsers(i).TestInstance = TestInstance

      Set request = HTTPTask.Connection(5).Request(2)       

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



 



          Set VirtualUsers(i).Station = Station1

          request.BodyVariables.Item("txtUserName") = "aprilg" 

          request.BodyVariables.Item("txtUsrPassword") = "aprilg"

      else

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

              Set VirtualUsers(i).Station = Station2

              request.BodyVariables.Item("txtUserName") = "gailc"

              request.BodyVariables.Item("txtUsrPassword") = "regina01"

          end If

      end if 

  next 



 



 



 





  call TestInstance.Run("QAFA_Login")



end sub





The load test is executing No problems. But i ma not sure whether it is picking up the login id and password i am passing through this code for the virtual users 4, 5, and 6 .

How do i know that.



In this case if i give a different connection number or request num it doesn't fail as i expected b'se that request from other connections doesn't have these parameters i am passing through this code.



So how do i confirm, please let me know.

 


 


 


 



 



 




 


 


 



 



 


  


sguda
Regular Contributor

RE: How so i run the load test by scripting using the load test scenario.

If any body has anyidea how to acheive the above mentioned, please share. that will be great.
AlexanderM
Staff

RE: How so i run the load test by scripting using the load test scenario.


Hi Sri,





Please check the latest reply in another thread that you started:

http://www.automatedqa.com/forums/forum/post.aspx?mode=singleThread&thread=e50536d2-2ac2-40c5-ad67-a...
-----

Alexander
Customer Care Manager
cancel
Showing results for 
Search instead for 
Did you mean: