Forum Discussion
tarleaa
14 years agoContributor
Hi Alex,
It surely helped.
So, let's see if I get this right:
I have a responseBody that needs checking if it contains a certain string. So, I identify the request that contains the response, click de "Raise Event" checkbox, add the OnLoadTestingResponse for it, and use the following code to search for the string:
function PingEvent_OnLoadTestingResponse(Sender, User, Request)
{
var Request = LoadTesting.HTTPTask("LiveData_PingTest").Connection(0).Request(2).ResponseBody.Contents;
if (aqString.Find(Request, "Welcome") != -1)
{
Log.message("string found");
}
else {Log.Error("string not found");}
}
So this searches within every virtual users responseBody for the given string, corect?
Thanks,
Andrei
Related Content
- 6 months agomacheshmeh
- 2 years agoianlop
- 11 months agoIso_Yura
- 4 years agomcbane
Recent Discussions
- 6 hours agoSvetaG