Using LoadRunner to determine the return status of an HTTP server
The first approach is to use LR's built-in function, Web_get_int_property.
Example:
#include "web_api.h"
Action ()
{
int Httpretcode;
Web_url ("NetEase",
"Url=http://www.163.com",
"Targetframe=_top",
last);
Httpretcode = Web_get_int_property (Http_info_return_code);
if (Httpretcode = = 200)
Lr_log_message ("The VUser successfully accessed the NetEase page");
Else
Lr_log_message ("The VUser failed to access the NetEase page");
return 0;
}
The second method: is the most primitive way to take the HTTP server data, and then use the correlation function analysis AH.
In fact, all the things can be obtained from the server's return data through the correlation function, and then self-analysis, hehe. A less appropriate example: you need a set of furniture, you can go to the furniture market to pick, of course, you can buy their own wood raw materials and tools, hands-on processing. That's what's best for you.
Analysis of the problem of dynamic parameterization:
In fact, the first time to see this problem, I did not immediately reflect, and then carefully think about, understand. It is the data that needs to be parameterized is not static, is dynamic. For example, from the database selected.
To solve this problem, we should select the data from the data source (such as the database) in advance, and then make the parametric selection directly at the time of execution. Conversely, if during the execution of the program, the selection of data, will likely bring a strong pressure on the database server, because each virtual user to participate in the concurrent execution of the database to take a look at the database will be what a severe test ah.
The discussion between friends or colleagues is to deepen the understanding of the problem and increase the knowledge, the most direct way to expand the field of vision, strengthen communication, keep in touch.
Reference article address: http://www.rickyzhu.com/2007/03/23/case-one-of-loadrunner/
Using LoadRunner to determine the return status of an HTTP server