LR runs Java vuser

Source: Internet
Author: User

Java vuser is a custom Java virtual user script, which can use the standard Java language.

Select Java vuser in all protocols

Usually write initialization in initCode, Write business processes in the action, and write release processes and other code in the end.

 

 I.JavaApplicability of virtual users

It is not suitable for performance testing of recorded business function pointsSuch as HTTP file downloads and video playback.

Performance testing of application systems developed based on Java(For example, the coreAlgorithmOr business execution efficiency, business modules that cannot be recorded in Java applications)

Test points that cannot be recorded are often used: Web applications with controlsProgram, Which is related to media playback and file download.

 

 

II.Configure the Script Development Environment

First, install JDK and configure environment variables.

In computer properties-advanced system settings-advanced-environment variables, set path, classpath, java_home

 

 

Iii. Problems Encountered

Error: failed to find java.exe.

Please add the <JDK> \ bin to the path and try again. [msgid: MERR-22968]

Warning: Extension java_int.dll reports error-1 on call to function extperprocessinitialize [msgid: MWAR-10485]

Error: thread context: call to service of the driver failed, reason-thread context wasn't initialized on this thread. [msgid: MERR-10176]

Find out the cause: when detecting whether JDK is successfully installed, JDK can run normally, and LoadRunner installation has no problems. In this case, locate the problem of combining the two, first, you can identify the classpath in the environment variables in Java environment settings-> classpath in vuser-> Run-time setting, but the above error will still be reported.

When looking for the problem, I found that loadrunner11 did not provide any instructions. This version is a 64-bit software. If there is no instructions, it should be a 32-bit software by default.JDK should also be a 32-bit JDK.The 64-bit operating system is compatible with 32-bit software. I immediately installed the 32-bit JDK and restarted the server, delete all variables in Java Environment Settings> classpath in vuser-> Run-Time Setting and run the script again. The error disappears.

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.