Forum Discussion
I am attaching the zip file of my Load test developed and the logs.
But now I am trying to acheive this in 2 ways to allow uniques values to those Last Name and SSN Fields.
1. when I tested the firststep as Keyword test( where i increment the values everytime for Last Name and SSN to be unique) and then perform load test from second step. In this process, after executing the keyword test, it is keeping the step 2 of the browser application open and it starts running the load test but it is failing the test when I see the log.
The keyword test is Test3, the load test it excutes aftre that is FAFSA_11_12.
2.The second way is I developed the load test (FAFSA_Ind1_11_12) and the task :FAFSA_Ind2_11_12. The test is running is fro 40 minutes.
In my script (Inc_RunLoadTest, subroutine: Load_Test), I am using this logic to increment the unique values.
The code i am using is :
Sub Load_Test
' Get the scripting interface to the test
'Set the task***************************************************************
Set TaskVar = LoadTesting.HTTPTask("FAFSA_Ind2_11_12")
'Set the Load test to be executed*******************************************
Set LoadTest = LoadTesting.Tests.TestByName("FAFSA_Ind1_11_12")
'Increment the Last Name****************************************************
Project.Variables.G_LastName_Num = Project.Variables.G_LastName_Num + 1
Project.Variables.G_LastName_Str = aqConvert.IntToStr(G_LastName_Num)
Project.Variables.G_LastName = aqString.Concat(Project.Variables.G_LastName_Prefix,Project.Variables.G_LastName_Str)
'Increment the SSN************************************************************
Project.Variables.G_SSN_Num = Project.Variables.G_SSN_Num + 1
Project.Variables.G_SSN_Suffix = aqString.Format("%04i",Project.Variables.G_SSN_Num)
Project.Variables.G_SSN = aqString.Concat(Project.Variables.G_SSN_Prefix, Project.Variables.G_SSN_Suffix)
'************************************************************************************************************
Set request = TaskVar.Connection(16).Request(2)
' Set Cnt = request.ContentDisposition.Item()
request.BodyVariables.Item("ctl00_ContentPlaceHolder1_grdFAFSA_ctl00_ctl06_RadTextBox1_text") = Project.Variables.G_LastName
request.BodyVariables.Item("ctl00_ContentPlaceHolder1_grdFAFSA_ctl00_ctl22_RadMaskedTextBox1_text") = Project.Variables.G_SSN
' Set Cnt = request.ContentDisposition.Item("ctl00_ContentPlaceHolder1_grdFAFSA_ctl00_ctl06_RadTextBox1_text")
' Set Cnt = request.ContentDisposition.Item("ctl00_ContentPlaceHolder1_grdFAFSA_ctl00_ctl22_RadMaskedTextBox1_text")
' Run the test
LoadTest.Execute
End Sub
This way the load test is executing. I see the script logic is incrementing the values. i am updating the values in request body of the request. But looks like it is not doing that, I saw the log that is warning or failing and not giving appropriate response times.
Can anybody suggest what i am doing wrong or how i can acheive this.
Or can i do this with parameterization.