The cause of failure of LoadRunner logon script authentication and its solving method

Source: Internet
Author: User
Tags session id sha1

Test object: A Web Instant Messaging system (hereinafter called Webim)

Development language: XML

Data communication protocol: WEB (http/html) protocol, Windows sockets protocol

Underlying database: Mysql

Server operating system: Redhad 4

Script implementation function: Log into the system, and then exit the system.

Question 1: Recording developed scripts can be successfully played back, but the logout of the database does not find "logout" users?

Analysis: Only one protocol was selected for recording: The Web (http/html) protocol, and the WEBIM implementation not only used the Web (http/html) protocol, but also the Windows sockets protocol. After locating the "cause" of the problem, the author tries to record a multi-protocol script, which results in playback failure. Playback failed because Webim has an encryption verification process during the logon process. When the script plays back, it submits the last encrypted ciphertext that was SHA1, and the server-side SHA1 ciphertext has changed. resulting in failure.

Workaround:

A, using dual protocol recording scripts

b, develop the DLL file for the SHA1 algorithm and call it in the script.

Question 2: The session ID returned by the server is not captured in the recorded script?

Analysis and scenarios: Webim's development uses XML and Windows Sockets protocols, so as a normal way of thinking, LoadRunner should also use XML and Windows Sockets protocols when recording scripts, but the reality is that The session ID returned by the server was not captured in the recorded script. Since the company intranet Jabberd server has a dedicated test client, the author decided to record the script through this client, because this client and server communication protocol is the Windows Sockets, so the recording protocol also adopted this most low-level protocol. This time, the session ID returned by the server is captured in the recorded script. In order to ensure that the script playback can dynamically obtain this session ID, need to do "association" operation, the author used the Lrs_save_searched_string () function, the script has been processed.

Question 3: How do I invoke a DLL to encrypt the sequence and password returned by the server to produce SHA1 ciphertext?

Analysis and scenario: After the DLL library file is loaded in the script, when the cryptographic function in the call library file encrypts the session Id+password character sequence, it must be in the following format endes (A,B), where a represents the source sequence, and B represents the cipher text. After this process, debug script, you can see the ciphertext.

Problem 4:buf The parameterized ciphertext, the script can not compile through, there is a syntax error?

Analysis and scenario: Discovery of LoadRunner parameterization is performed in accordance with its built-in mechanism, which is compiled to pass.

Later in gen tools->general option found the place to change this mechanism, after the modification, the script compiles again, this time OK.

Issue 5: Error message: Not enough virtual users to assign to this Newpara?

Analysis and solution: in LoadRunner after the user name and password or other data parameterization, do not delete the parameters after the parameterization, otherwise this problem will occur. The author decided to record the script again, parameterize, and modify the script again. It turns out that this is the right thing to do, and the 5 virtual user scripts are correctly passed after the compilation runs.

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.