Jmeter Tutorials - One Page for All Your Jmeter Queries

//
Jmeter - A performance testing open source tool with huge online support. Jmeter is evolving from day to day and it has occupied almost 40 percent of the market share. Jmeter is developed in Java and has a lot of advantages when compare with any other performance testing tools.

We can use Jmeter for different types of Testing. 
Performance Testing (Mainly), Load Testing, Volume Testing, Stress Testing, Functional Testing and Regression Testing.

Some of the advantages of Jmeter are:

  • Jmeter has many features firstly unlimited virtual users that we can simulate.
  • Open source tool with large online community.
  • We can integrate Jmeter with selenium and we can run selenium functional testing scripts with Jmeter.
  • We can integrate different Jmeter plugins with Jmeter according to our requirement and we can also develop plugins in Java for Jmeter.
  • Jmeter supports multiple protocols Web (HTTP/HTML), JDBC, FTP, JMS and LDAP.

How to install Jmeter in Your PC:

Installing of Jmeter is very simple. Before installing of Jmeter you need to install JVM 6 or higher. You can download the latest jdk from this link 

You can download Jmeter binaries from the following website in the .zip format and extract in any of the folder and go to the bin folder and click on the icon with name "ApacheJmeter" which is an executable jar file as shown in the following image.


Once you click on the obove Icon the Jmeter application will be launched as shown in the following image.

Jmeter has many options we cannot learn all these options at one go. As you work on this tool you will learn them slowly. We will discuss some of the main options and you can explore additional options by yourself.

Here I am listing all the options that Jmeter has

Test Plan 

Threads (Users)
Thread Group
Setup Thread Group
Teardown Thread Group

Jmeter PPTs That Might Help You:

Read More

Difference Between HTML and URL Mode in Loadrunner

//
What is the difference between HTML and URL Mode?

HTML Mode:

HTML Mode is the default recording mode available in Loadrunner for Web (HTTP/HTML) scripts. When you record an application in HTML mode it will not record all the resources, but it will keep in extras as shown below and when the same script is executed it will parse all the urls one by one in extras and It will take some time to parse all the urls. Please find an example of HTML Mode below for Bing.com.

Bing.com in HTML Mode:

Read More

You will get 50 Vusers License From Loadrunner 12 Community Edition.

//
HP has changed his way of doing business with their products. It is trying every possibility to get the business and to give the competition to other tools.

Jmeter, Neoload and some of the top tools are also giving a huge competition to the HP Loadrunner. HP is also rapidly upgrading the Loadrunner to meet the latest technology upgrades and the competition.

HP has come up with Loadrunner 12 community edition, where you will get 50 Vusers license to performance test your application. You can test your app on any protocol with the 50 Vusers. This helps you a lot before finalizing in buying the license of Loadrunner. Sometimes we buy the license and get to know that we can't do the performance testing with the Loadrunner where this will become the hectic. 

Here is another good news now, you can purchase the vusers license with your credit card or PayPal, which was not there earlier. HP has come up with a website called pronq.com where we can buy the licenses easily.

By the way which tool you prefer for performance testing of an application? Loadrunner, Jmeter, Neoload, IBM Rational......etc.
Read More

Flex Protocol in Loadrunner - Recording | Correlation | Jars | Errors

//
Overview of Flex Protocol:

What is Flex:
Flex emulates a client and server application method. Flex uses different technologies to develop Rich Internet Applications using Flash Player. Adobe Flex is a powerful framework, using we can develop powerful interactive applications. These flex applications are set of MXML and some other files combinely play the script on the flash player or also called swf files.

Examples: Share market graphs, that change dynamically over the internet. Usually, these type of applications are developed using Adobe Flex.


Recording: We usually record this application with multi protocol web and flex protocol. 


Correlation in Flex Protocol: For regular web functions we use the web_reg_save_param function for correlation. For flex we use lr_xml_get_values and lr_xml_find functions to capture the values from the response. The name itself indicates that we are capturing xml values from the response.


The main value which we do correlation in Flex protocol is DSID.

Once you record the script in Flex protocol search for the DSID in the script, the one which comes first is where the dynamic DSID value generated. Sometimes the script generates DSID multiple times. So, we need be careful while doing correlation.

We need to use lr_xml_get_value function to correlate this value. If you are new to this function, go to response of that request and go through the xml path and find the DSID value in XML path, right click and click on save parameter. It will automatically create lr_xml_get_values.

A typical DSID value looks like this "8129988E-DC65-8CF6-B808-98760876GE98".

Please find the attached screenshot for your reference.


Jar Files in Flex Protocol: You need to use some common jar files for flex protocol in Loadrunner 11.4 and earlier versions. From Loadrunner 11.5 there is no need to use jars. The common jars are.

Flex-messaging-core. jar

Flex-messaging-common. jar
Flex-messaging-opt. jar
Flex-messaging-proxy. jar
Flex-messaging-remoting. jar

Make sure to map the jars in the correct path and upload in the controller. If you do changes to the path make sure they are updated in your run time settings as well. You can also update the jar paths in.usr file in vugen.


Issues and how to fix them: The Java version plays a vital role during the scripting part. Make sure you use the same Java version for all your scripting part and the execution part. If we use different Java version the xml paths will change, validation and the correlations will fail.


How to set Java path and Jars: You can set your Java path and jars in runtime settings of the script.


How to download jar files for Flex: Click Here



Read More

How many load generators do we need for Performance Testing

//
It's one of the regular questions that will be asked as to how many load generators do we need in Loadrunner or any other tool. It depends upon the testing tool that we use and the configuration of our system (Example: CPU, Memory, Operating System etc.).

Without knowing the exact load generators sometimes the performance testing results may vary. For example, if we need four load generators instead we ran the test with only two load generators and the load generator machines will get slower and the permance testing results may vary.

Recently I have gone through an article where the HP Loadrunner team beautifully explained about how many load generators do we need for our test.

We need to follow these steps to calculate how many load generators do we need. 

  1. First, we need to record the script and enhance the script to work with multiple users and iterations.
  2. Once the script is ready, upload the script to controller and run the script with one user using a few minutes delay before the start of the script and observe any increase in RAM when the vuser starts. This is the First Vuser memory.
  3. Now run the test with five users and with five iterations and execute the test.  Keep the same starting delay and add next vuser with one minute delay and observe how much increase in ram for every vuser and do average for the last four vusers RAM  and do not count the first vuser RAM usage.
  4. Now we need to find how much Total RAM we have in our machine and give 750 MB to 1000 MB for system resources.
  5. Find what is the 75 percent of remaining RAM after allocating RAM for system resources. For example, if the system has 4 GB of RAM, and 1 GB for system resources and in 3GB find what is the 75 percent of RAM, which will be 2250 MB, Here I have calculated 1GB equals to 1000MB.
  6. Now subtract the first vuser memory.
  7. Divide with average of the last 4 Virtual vusers.
  8. and at last add the +1 (This is the one vuser first we have subtracted).

Load Generators Calculation Formula
Load Generators Calculation Formula
Hope it helps, and Please note it just a reference it may not work for some of the protocols like Citrix, RDP, any protocol with the term GUI in it, and QTP\UFT scripts.

Do you know: From Loadrunner 12 we have Load generator calculator. Check in your loadrunner 12 installation.

Reference: http://h30499.www3.hp.com/t5/HP-LoadRunner-and-Performance/The-Protocol-Complexity-Matrix-and-what-it-means-for-your-load/ba-p/6559424
Read More

How to Monitor a Vugen Script in Sitescope

//
Hi guys,

The HP Sitescope team has explained about how to upload a Vugen script to Sitescope and Monitor the script in Sitescope.

Suppose your application is loading slowly and you are not sure where exactly the problem is. Then you can run your script in Sitescope and it will show you where exactly the problem is.

Many people do not know that there is an option in the controller as well where it will show the breakdown of the transaction.

Hope this video helps you.




Read More

How to Integrate Sitescope with Loadrunner - Screenshots Attached

//
The integration of Sitescope with Loadrunner is a simple task that can be done in two minutes.

Launch the controller
Go to System Resource Graphs
Click on Sitescope
Click on Add Measurements
Add the Host Address or IP address of the machine that Sitescope installed as shown the following image.
If it is prompted for the Username and Password give the credentials as required.

Integration of Sitescope with Controller
Integration of Sitescope with Controller
If the controller is connected to the Sitescope you are able to see all the counters that the Sitescope has in your machine as shown in the following image.

Adding Counters
Adding Counters
Once you successfully add the Sitescope you will see all the monitors / counters that the Sitescope has.

Add the measurements that you want to require and click on okay. Here I have added CPU utilization.

CPU Utlization
CPU Utlization


Read More

Step by Step Procedure on How to add Alerts in Sitescope

//
Adding alerts in Sitescope is very easy. Before adding the alerts in Sitescope we need to go to the properties as shown in the below image and change the threshold values as required.

Alerts Screenshot and click on properties
Alert Properties Screenshot
Once the threshold setting has been set.  Click on Alert tab and click on * button and a new pop up opens give an alert name and select the alert action as shown in the following image.
How to Setup Alert
How to Setup Alert

Alert Actions: We have different alert actions one of the popular alert action is Email. For example, if the CPU reaches 80 percent trigger an email alert to the required members. We have already set threshold limits at 80 percent as shown in the first image. Now, we will set the remaining settings as shown in the following image.

Once you click on the email action the following image opens.

Email Alert Setup
Email Alert Setup
Once the above settings as shown in the image are set and click on save. You will see as shown in the following image.

Alert Tab Final
Alert Tab Final



Read More

How to add Monitors in Sitescope – Its Simple and Easy

//
Adding monitors of any server or any application:

First, we need add the server to Sitescope and then we can create group and add the monitors. For how to add servers in Sitescope you can go to this link.

Creating Groups

Create Group: Creating group helps to group the monitors of a particular server in a particular group. For example, here I have created group name as ‘Linux Server’.

For creating groups click as shown in the following Image.

Create Group
Create Group
and give the group name as show in the image. I have given group name as Linux Server and Click on okay as shown in the following image.

Create Group Snapshot 2
Create Group Snapshot 2

Adding Monitors

Once you create the group we can add the monitors in this group as shown in the following image.

Right click on the group name and Click on new monitor.

Add Monitor
Add Monitor
 and now add the monitor that you want to monitor for example here I am adding CPU as shown in the following image. Here we can search for the monitors that are required.

Add Monitor Snapshot 2
Add Monitor Snapshot 2
And once you add the monitor. You need to select the server name as shown in the following image. 

Select Server Name
Select Server Name
And click on save and test. Once it is successfully added you will see the following image.

CPU Utilization Monitor
CPU Utilization Monitor
Deleting Group or Monitor:

Just right click on group or monitor and click on delete.

Read More

How to add Operating Systems or Servers to Sitescope

//
How to add Windows or Linux Servers to Sitescope:

In order to monitor a server first we need to add the server to Sitescope. For example, if you install Weblogic on a windows server, first we will add that server or operating system to Sitescope and then we can able to monitor that server as well as the Weblogic Application and its counters.

I will show you how to add a Windows machine and a Linux machine to the Sitescope. 

Adding Windows Machine to Sitescope:

1. Click on Remote Servers Tab on Sitescope
2. Click New Microsoft Windows Remote Server.
3. Enter the IP address of the machine.
4. Give the credential for the machine.
5. Click on save and test.

It will add the server to Sitescope. Once we add the servers we can easily add the monitors / counters that we needed.

Note: In order to add server, you need to have administrative privileges, username and password of that server or operating system.

Adding Linux Machine to Sitescope:

Adding Linux Server to Sitescope
Adding Linux Server to Sitescope
Click on Remote Servers
Click on Unix Remote Servers:
Click on New Unix Remote Server:
Enter the IPadress of the machine and give the credentials of the machine, i.e. username and password and select operating System as Linux and the method as SSH.

Please note that you can connect through three methods from Sitescope to Linux server.

SSH
Telnet
Rlogin

If you are connecting through SSH / Telnet / Rlogin you need to activate the same process on your Linux server before adding. Sometimes the process might not be running on your Linux server this leads to getting errors while adding Linux server to Sitescope.

You can also add a Linux server using private or public key. We have a separate option for adding SSH private or public key. Go to advanced settings while adding through SSH we need to add the SSH private key path at ‘key file for ssh connections’ option and the default path to add private key is C:\SiteScope\groups\indentity.  Please note that we need to create this identity file manually in this path.

Sitescope Advanced Settings
Sitescope Advanced Settings


Read More