Forum Discussion
Dmitry_Nikolaev
Staff
15 years agoHi Sri,
But i have created the load test " QA_Login" visually with Num of virtual user's , ramp up scenario, with run concurrently options checked and browser emulation, speed etc.
In this case, you just need to assign the modified tasks to the users in your code:
Sub Param_LogInId
set TestInstance = LoadTesting.Tests.TestByName("QA_Login").CreateTestInstance
For i = 0 To 5
Set HTTPTask = LoadTesting.HTTPTask("QAFA_Login")
Set request = HTTPTask.Connection(5).Request(2)
if (i = 0) Or (i = 1) Or (i = 2) Then
request.BodyVariables.Item("txtUserName") = "aprilg"r
request.BodyVariables.Item("txtUsrPassword") = "aprilg"
else
if (i = 3) Or (i = 4) Or (i = 5) Then
request.BodyVariables.Item("txtUserName") = "gailc"
request.BodyVariables.Item("txtUsrPassword") = "regina01"
end If
end if
Set TestInstance.User(i).Task = HTTPTask
next
call TestInstance.Run("QAFA_Login")
>>> Also please specify how can i use onloadtestingrequest to get the request body and post it to log.
Please tell me which step of the suggested help topic makes problems. Did you manage to create a handler routine for the event?
Regarding the errors you get: I need to see your project suite and the results of the test execution. Please zip the project suite folder and send me the archive:
http://www.automatedqa.com/support/message/