Using LoadRunner to determine the return status of an HTTP server

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.