LoadRunner recording an HTTPS script

Source: Internet
Author: User

LoadRunner recording an HTTPS scriptoriginal 2017-07-10 love test Future

With the company's development, the company's original SVN server storage content continues to increase, capacity can not meet the follow-up requirements, first of all we think of the server to expand, however, because of various reasons the server can not be expanded, so the company decided to replace the new SVN server, Before we do the data migration and environment deployment, we need to perform a performance test on the server to understand the server performance after deployment, and to test the HTTPS Web pages for performance testing.

We can record an HTTP webpage with LoadRunner, but when we record HTTPS webpage, we find the certificate error can't record and other problems, we should consider whether LoadRunner can record https script. After reviewing the data, we found that LoadRunner can record https script completely, and recorded HTTP webpage more steps, mainly add certificate, protocol two aspects. The following is a summary of the HTTPS script recording during this performance test.

First, obtain the certificate

The data transmitted by the HTTP protocol is unencrypted, so it is very insecure to use the HTTP protocol to transmit private information. To ensure that these private data can be encrypted, Netscape designed the SSL (Secure Sockets Layer) protocol to encrypt the data transmitted by the HTTP protocol, which led to the birth of HTTPS. HTTPS protocol is a network protocol built by the SSL+HTTP protocol which can encrypt transmission and authentication, and is more secure than HTTP protocol. So it involves a lot of important information using HTTPS links.

Servers that use the HTTPS protocol must have a digital certificate that they can make themselves or apply to the organization. The difference is that the certificate you issued requires client authentication to continue access, and the certificate requested by a trusted company does not pop up the prompt page. This test will prompt the certificate is not trusted to continue to access the interface.

A certificate acquisition can be made available to development or acquired by itself, obtaining first access to the address to be tested, and then exporting the certificate from the browser, Export the format default. cer file, which needs to be converted to LoadRunner recognized. PEM mode (directly modifying the suffix name to. PEM can be used, you can try to modify), other conversion methods you can find the Niang help solve.

How to get the IE browser:

Inetenet Options--Content--Certificate--Find the appropriate certificate and export

Second, the certificate import

Import the certificates obtained from the browser or development into the LoadRunner, and configure the recorded address and port number protocol.

1. Enter the Configuration interface

Here are two ways to enter the configuration interface:

New recording: Start recording---Options---portmapping

or tools--recording options open the Settings screen

Open the interface as shown in.

2. Capture Level Selection

Capture level is selected by default as Socketlevel data, and the selection LoadRunner for capture level is explained in the following paragraph, when different browsers choose different types of recording. This script needs to select Winlnet level data when using IE browser. Firefox chose the third, not the third type of recording is blank, the script cannot be recorded.

A, Socket leveldata.
Capture data using trapping on the socket level only. Port Mappings Apply inthis case (default).

b, wininetlevel data.
Capture data using hooks on the WinINet.dll API used by certain httpapplications. The most common application this uses these hooks is internetexplorer. Port mappings is not relevant for the this level.

C, Socket Leveland WinINet level data.
Captures data using both mechanisms. WinINet level sends information forapplications this use WinINet.dll. The Socket level sends data is only if itdetermines the it did not the originate from WinINet.dll. Port mapping applies todata that does not originate from WinINet.dll.

3. Content Configuration

Click New entry New, here is the specific content:

TargetServer: Set address svn.qwerty.com can also be IP such as 192.168.0.1

Port: Port number for example 1234

ConnectionType: Select SSL

Focus on the SSL configuration of several options, SSL Verison includes the SSL protocol, as well as the TLS protocol, here you record what protocol to choose what protocol, the last option to import the certificate, the certificate we downloaded into the LoadRunner, Click Select Import Certificate to import.

4. Open run-timesettings>preferences (on request)

1. Use IE browser to record

Winlnetreplay instead of scokets (Windows Noly) is ticked (this is set as the digital certificate is obtained in the browser), and if a digital certificate is parameterized, the entry is not checked. By default, our scripts are played back through the sockets port, and in some cases the replay is rejected by the server, so you can swap the script with the Winlnet engine. IE is also based on the Winlnet engine, so compatibility is better, other browsers may be sockets.

After the configuration is complete, the script is recorded, when the script is recorded with LoadRunner, the HTTPS script can be recorded, but the user name and password are not recorded, so the replay is unsuccessful and the script needs to be changed then we need to add the Web_set_user function. This function allows us to enter account verification information.

Web_set_user ("Useradmin",

Lr_decrypt ("password"),

Clear text password, the following is the LoadRunner recorded password, both of the password can be used

Lr_decrypt ("591e5543c21012e4f3d92abc206d91"),

"svn.qwerty.com:123456");//address and port number

The following is an IE recorded script

Add Web_set_user function, can play normal playback and can run through, solve the problem can not be recorded to the user information.

2. Firefox recording

Firefox can record to login information, lack of protocol type, we need to add a protocol type of function script can run through,

Web_set_sockets_option ("Ssl_version", "TLS");

The role is to increase the use of protocol specific types, so that the script can work.

The above is the test process encountered problems and solutions, I hope to help everyone to solve the problem of LoadRunner to HTTPS script recording.

LoadRunner recording an HTTPS script

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.