Performance testing tool-LoadRunner (Part)

Source: Internet
Author: User
The following section summarizes the FAQs and practical work experience of various forums. It is part of the <LoadRunner> section of the performance testing tool.

FAQs
1. monitor server resources?
In the Controller scenario, select the Windows resources node under system resource graphs in graphs, right-click windows resources, and choose add measurements from the menu to add the name of the machine you want to monitor. Note that the monitored server must start the remote registry service.
2. Error "the IP wizard does not support DHCP-enabled network cards. Your network card is either DHCP-enabled or configured with invalid Settings"
This is because IP spoofer does not support dynamic access to IP addresses.
3. The multi-IP running mode cannot be found.
You must set the EXPERT mode in cotroller to set the multi-IP Mode.
4. Fixed the issue of garbled characters in the LR editor.
In loadrunner7.8, set the support charset option in tool> record Options> advanced in virtual user generator.
5. loadrunner7.5 a solution to support IE6
In IE, select tool-> Internet, switch to the Advanced page, set http1.1, and use http1.1 through proxy connection.
6. modify the code generated by the Winsock protocol and parameterize
The parameterized data of the socket script is stored in data. ws.
We recommend that you record the same service twice, compare the data. ws in the two scripts, and find the parameters to be parameterized.
7. How to Deal with think time in the analysis results
You can set filter for analysis, and filter to slightly remove think time.
8. LoadRunner's experience in ftp mode Testing
What is PASV mode (passive mode transfer )? How does he work?
FTP usually has two connections, one is the client and the server transmission command, and the other is the data transmission connection. FTP service programs generally support two different modes: Port mode and PASV mode ).

Assume that the client is C and the server is S.
Port mode:
After client C connects to server s, the port mode is used, then client C will send a command to inform server s (client C opens a local port n waiting for you to connect to the data ), when the server s receives the PORT command, it connects to the port n opened by the client, which is generated.
PASV mode:
After client C connects to server s, server s will send a message to client C. The message is (server s opens a local port M, So connect to me now ), after receiving this information, client C can connect to the M Port of server S. After the connection is successful, the data connection is established.

Actions ()
{
Char actest [100];
Char actest2 [100];
Char * pctest3;

// Generate the sending string
Sprintf (actest, "kkkhhhh \ r \ n ");
// Specify the sending string
Lrs_set_send_buffer ("socket0", actest, strlen (actest ));
// Send. The "buf0" parameter here is invalid because lrs_set_send_buffer is run before.
Lrs_send ("socket0", "buf0", lrslastarg );

// Receives the returned string
Lrs_receive ("socket0", "buf1", lrslastarg );
// Put the returned string in the Variable
Pctest3 = lrs_get_received_buffer ("socket0", 0,-1, null );
// Perform operations on the data in the returned string
If (pctest3 [0] = 'k ')
{
Lrs_set_send_buffer ("socket0", pctest3, strlen (pctest3 ));
Lrs_send ("socket0", "buf0", lrslastarg );
Lrs_receive ("socket0", "buf1", lrslastarg );
}

// Wait for a while
Lr_think_time (6 );

Return 0;
}

PASV Mode

Data. WS:

Send buf25
"Type I \ r \ n"
Recv buf26 20
"200 type set to I. \ r \ n"
Send buf27
"Asv \ r \ n"
Recv buf28 50
"227 entering passive mode (119,104,133, 58) \ r \ n"
Send buf29
"Retr startweblogic \ r \ n"
Recv buf30 74
"150 binary data connection for startweblogic (10.3.9.3, 2707) (53 bytes). \ r"
"\ N"
Recv buf31 53
"CD./user_projects/mydomain \ n"
"Nohup startweblogic. Sh & \ n"
Recv buf32 31
"226 binary transfer complete. \ r \ n"

Actions:
Lrs_send ("socket4", "buf25", lrslastarg );
Lrs_receive ("socket4", "buf26", lrslastarg );
Lrs_send ("socket4", "buf27", lrslastarg );
Lrs_receive ("socket4", "buf28", lrslastarg );
Lrs_send ("socket4", "buf29", lrslastarg );
Lrs_create_socket ("Fig", "TCP", "localhost = 0", "remotehost = 10.19.119.104: 34106", lrslastarg );
Lrs_receive ("socket4", "buf30", lrslastarg );
Lrs_receive ("socket6", "buf31", lrslastarg );
Lrs_close_socket ("socket6 ");
Lrs_receive ("socket4", "buf32", lrslastarg );

Pay attention to the buf27 and issue the PASV command. The server returns the port number "133,58", 133*256 + 58 = 34106 on the buf28, so the client has this sentence "lrs_create_socket (" socket6 "," TCP "," localhost = 0 "," remotehost = 10.19.119.104: 34106 "", the port number 34106 is calculated in this way. Each time lrs_create_socket is run, the port number must be obtained from the PASV response packet.

Non-PASV Mode

Data. WS:
Send buf28
"Type I \ r \ n"
Recv buf29 20
"200 type set to I. \ r \ n"
Send buf30
"Ort 10, 3, 9, 3, 11, 96 \ r \ n"
Recv buf31 30
"200 PORT command successful. \ r \ n"
Send buf32
"Retr startweblogic \ r \ n"
Recv buf33 74
"150 binary data connection for startweblogic (10.3.9.3, 2912) (53 bytes). \ r"
"\ N"
Recv buf34 53
"CD./user_projects/mydomain \ n"
"Nohup startweblogic. Sh & \ n"
Recv buf35 31
"226 binary transfer complete. \ r \ n"

Actions:
Lrs_send ("socket4", "buf28", lrslastarg );
Lrs_receive ("socket4", "buf29", lrslastarg );
Lrs_create_socket ("socket7", "TCP", "localhost = 0", "backlog = 1", lrslastarg );
Lrs_send ("socket4", "buf30", lrslastarg );
Lrs_receive ("socket4", "buf31", lrslastarg );
Lrs_send ("socket4", "buf32", lrslastarg );
Lrs_receive ("socket4", "buf33", lrslastarg );
Lrs_accept_connection ("socket7", "socket8 ");
Lrs_close_socket ("socket7 ");
Lrs_receive ("socket8", "buf34", lrslastarg );
Lrs_close_socket ("socket8 ");
Lrs_receive ("socket4", "buf35", lrslastarg );

Note that "256" in buf30 is the port number listened to by the client, and 11*2912 + 96 =. Before that, the client started lrs_create_socket. That is to say, this 2912 is the listening port number generated during lrs_create_socket, and then sent to the server to connect the server. To run this script properly, You must retrieve the listening port of socket7 after lrs_create_socket and put it in the "ORT, 3, \ r \ n" Package (modify 11 and 96 ), send to the server.
9. Specify the scenario running time
Set the start time and then start scenio

From: http://bbs.51testing.com/thread-402-1-1.html

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.