exp1
14 years agoOccasional Contributor
Request.ResponseBody Problem
Hi,
I want to learn bottleneck for login operation above 70 concurrent vusers.In order to learn it, I wanted to get response bodies for aspesific warned request . All warned requests response body content comes like it is hardcoded. I want to learn real problem why responsebodies corrupted.
This my script code;
function getResponseBody()
{
var myRequest;
myRequest=LoadTesting["HTTPTask"]("Task")["Connection"](1)["Request"](25);
myRequest["ResponseBody"]["SaveToFile"]("C:\\folder\\request107Body.dat");
Files["Add"]("C:\\folder\\request107Body.dat");
}
All html page is encoding with UTF-8 but in html body charset encode type looks " charset="iso-8859-9" that.
how can I get response body cleary?
May I when get responseBody encode with utf-8 solve my problem how can I do that?Actually I checked encode type of TC its enabled "Auto".
My original RequestBody of lenght is 86 kb.It is not so big.
At the same time when I get response body OnLoadTesting Event Handler if Request got warning ResponseBody looks hardcoded like attachment file.So I can't understand why request got warning.
OnLoadEventHandler Code;
function GeneralEvents_OnLoadTestingResponse(Sender, User, Request)
{
var FileName;
// Checks whether the event is generated for the desired request
if(Request["RequestID"] ==107)
{
// Make up the name of the file that will hold the response contents
FileName = "C:\\Response_User" + User["Name"] + "_Request" + _
aqConvert["VarToStr"](Request["RequestID"])+ "_" +
aqConvert["DateTimeToFormatStr"](aqDateTime["Now"](),"%Y%m%d%H%M%S") + ".dat"
// Saving the response contents to a file
Request["ResponseBody"]["SaveToFile"](FileName);
}
I want compare responseBodys(original&onload body) but it is different because dynamicly changed for every Vuser.
We send project but still no response about this problem.And we need as soon as fix this problem.
I want to ask one more question,
When I load 250 user with same account(e-mail,password)which account on task(traffic) load test run fine.For all Vusers request return true.But when I add variables to task via parameters I got warnings.
PS:Website saves cookie for a week and in a week if same user want to login User goes to directly mainpage.Does not need to write e-mail and password.May be they don't need create new query for same user?What can you say about that?
I want to learn bottleneck for login operation above 70 concurrent vusers.In order to learn it, I wanted to get response bodies for aspesific warned request . All warned requests response body content comes like it is hardcoded. I want to learn real problem why responsebodies corrupted.
This my script code;
function getResponseBody()
{
var myRequest;
myRequest=LoadTesting["HTTPTask"]("Task")["Connection"](1)["Request"](25);
myRequest["ResponseBody"]["SaveToFile"]("C:\\folder\\request107Body.dat");
Files["Add"]("C:\\folder\\request107Body.dat");
}
All html page is encoding with UTF-8 but in html body charset encode type looks " charset="iso-8859-9" that.
how can I get response body cleary?
May I when get responseBody encode with utf-8 solve my problem how can I do that?Actually I checked encode type of TC its enabled "Auto".
My original RequestBody of lenght is 86 kb.It is not so big.
At the same time when I get response body OnLoadTesting Event Handler if Request got warning ResponseBody looks hardcoded like attachment file.So I can't understand why request got warning.
OnLoadEventHandler Code;
function GeneralEvents_OnLoadTestingResponse(Sender, User, Request)
{
var FileName;
// Checks whether the event is generated for the desired request
if(Request["RequestID"] ==107)
{
// Make up the name of the file that will hold the response contents
FileName = "C:\\Response_User" + User["Name"] + "_Request" + _
aqConvert["VarToStr"](Request["RequestID"])+ "_" +
aqConvert["DateTimeToFormatStr"](aqDateTime["Now"](),"%Y%m%d%H%M%S") + ".dat"
// Saving the response contents to a file
Request["ResponseBody"]["SaveToFile"](FileName);
}
I want compare responseBodys(original&onload body) but it is different because dynamicly changed for every Vuser.
We send project but still no response about this problem.And we need as soon as fix this problem.
I want to ask one more question,
When I load 250 user with same account(e-mail,password)which account on task(traffic) load test run fine.For all Vusers request return true.But when I add variables to task via parameters I got warnings.
PS:Website saves cookie for a week and in a week if same user want to login User goes to directly mainpage.Does not need to write e-mail and password.May be they don't need create new query for same user?What can you say about that?