Performance Testing, LoadRunner Tips&Tricks

This site is moving to a bigger space @ LoadRunner TnT

Working with Java – Introduction

LoadRunner provides the capability of load testing Java-related applications. In this article, we will provide a brief introduction to working with Java related applications in LoadRunner.


[1]
Before we start choosing Java-related protocols to perform recording, you will need to understand the protocol that the Java application is using to communicate with the server. It maybe the case where the Java application is communicating via HTTP rather than RMI-Java, etc… Refer to the concept in a previously written article, "Protocols: What Protocol to use?". Take note that it is the fundamental of using LoadRunner correctly.

If you have identified that the application is communicating with a Java related protocol, you can safely proceed to choose the relevant Java protocol.


[2]
For Java related protocol, the recording works in the same way as .NET and COM/DCOM protocol. All of them share the same characteristics but I will specify to just Java and only Java recording. Pure Java scripting will be excluded in this article.

Unlike .NET and COM/DCOM, Vugen provides an interface to manage and filter the classes and methods via the GUI which is very convenient to the user. Hopefully, Mercury/HP may consider that in future.


[3]
Java recording is not as straight-forward as popular (simple) protocols such as Web (HTTP/HTML) and the following lists out the items to take note when working with Java.

Classes and Methods

1. You will need the knowledge of the classes and methods prior recording; and usually this information is held by the developers.

2. The need to know the classes and recording is crucial because, LoadRunner (Vugen) implements a hooking mechanism to hook the traffic on the classes. Not knowing or minimal knowledge will definitely delay the recording.

3. LoadRunner does have a default hook for Java but if you have additional classes that you need to record. The knowledge of the classes will come important here.

4. Also, by defining all classes to hook, is a wasteful effort as you maybe recording classes’ activity that is not useful to the load test. They may comprise of GUI clicks or client activities.


JDK and JRE

1. You will need to know the JDK of the application. By default, Sun Microsystems JDK (SDK) works with LoadRunner.

2. You can check with Mercury/HP on the support for other JDKs (IBM, etc.). However, usually they are not supported.

3. The least supported JDK is JDK 1.3 for LoadRunner 8.1. Take note that the recording is still very dependant on the JDK version installed. That is, if your application is JDK 1.6, you will have to install that version on the recording machine.

4. JRE is insufficient for the recording to be successful. JDK is required to be installed.


Recording-specified

1. Vugen implements an API that hooks into the selected classes and record the traffic. Therefore, as pointed earlier, knowing the correct classes to hook is crucial.

2. GUI classes or client-side activities maybe recorded via the hook. However, this is not recommended as it does not contribute to the load generation towards the server.

3. For recording specifies, I’ve written another article that specifies the steps and the implications of each step in this article, "Working with RMI-Java" .


Scenario Execution

1. Prior the scenario execution in the Controller, ensure that JDK have be installed on the Load Generators. The scripts sent (refer to the article, "General: Scenario Execution" for more information) are Java scripts, and require JVM to run.


[4]

Documentations

If you like to know more information from the official provider, you can refer to the Vugen User Guide that is provided in each installation of LoadRunner in PDF format. Specifically the following chapters:

1. All chapters in Part II: Working with Java Language Protocols
2. Chapter 18: Developing Corba-Java Vuser Script
3. Chapter 19: Developing RMI-Java Vuser Scripts.


Sample

Also, if you like to get a feel of working with Java protocol, I would recommend using the sample example provided with every installation of LoadRunner. It will at least get you understand what will happened and the expected output when recording Java language applications.


[5]
In summary, we’ve covered the workings of Java language protocol in LoadRunner, things to watch out and additional resources to pertaining to the topic. It should be sufficient for you to work with Java language protocols at minimal difficulty.


Related Topic:

Content Page – Protocols

Labels: , , , , ,


Bookmark this article now! AddThis Social Bookmark Button



technorati del.icio.us reddit digg



Powered by Google

Enter your email address:

Delivered by FeedBurner


Add to Technorati Favorites


XML

Powered by Blogger

make money online blogger templates

Powered by FeedBurner

Blog Directory

Top Blogs

Software Blogs -  Blog Catalog Blog Directory





© 2007 Performance Testing, LoadRunner Tips&Tricks | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.
Learn how to make money online | First Aid and Health Information at Medical Health