Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Posts Tagged ‘jmeter’

ERROR- jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError Java heap space

August 10th, 2010 No comments

We  had talked about Ramp up period in Jmeter and Load testing with JMeter in last posts

We get this error when testing with load of 1800 concurrent users.

Http request

Number of threads(users) = 1700
Ramp up period(in seconds) = 0
Loop Count = 1

In Jmeter logs , I found this error

ERROR – jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError: Java heap space

When  load testing with Jmeter , the no of concurrent threads you can create is also dependent on your desktop or laptop. I have a 2GB laptop and had closed all the services , still 1700 was the a maximum number of users we could test.

Categories: Programming / tutorials Tags:

Ramp up period in Jmeter

August 5th, 2010 10 comments

Ramp up period property in jmeter is not very clear to new comers. From the documentation

The ramp-up period tells JMeter how long to take to “ramp-up” to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.

Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).

Here are some examples of ramp up time which we have used

Number of threads(users) = 11
Ramp up period(in seconds) =  110
Loop Count = 1

Every 10 second(110/11) one request hits the server.
Starts with one request initially Read more…

Reading data from CSV or excel file in JMeter

July 14th, 2010 14 comments

Apache JMeter is one of the best open source load testing tools available in market. We had covered Load Testing Using Apache Jmeter in our previous post.

In this post I will go into some more details as how you can read data from csv or text file for Jmeter. This is helpful when you are doing a load test and need unique user id or any other parameter.

CSV Data Set Config settings in Jmeter console

CSV data set in jmeter

CSV data set in jmeter

This file will reside in bin directory of your Jmeter directory.

userid is the variable you will be using in your url for eg

http://www.abc.com/welcome.jsp&userid=${userid}

How your Myfile.csv file will look like ?

1234
1245
1257

and so on

if you want multiple parameters,  you can have comma separated values like

1234,88
1245,99
1257,44

Load testing using Apache JMeter

May 25th, 2010 5 comments

JMeter is a desktop application used to load test functional behavior and measure performance. It is used to test performance both on static and dynamic resources (files, Servlets, Perl scripts, Java Objects, Data Bases and Queries, FTP Servers and more).

JMeter supports HTTP, HTTPS, FTP, SOAP, POP3, JDBC, thus enabling its use to test most of the applications. It has record and playback capability which enables easy test case creation. But, it can directly record only HTTP requests and supports HTTPS spoofing which is not completely reliable.

Steps to setup JMeter and create test plan :-

  1. Download the latest version of JMeter from the website http://jakarta.apache.org/
  2. Run the batch file in JMeter folder -> bin -> jmeter.bat

Below is the snap shot of the Apache JMeter Tool.

Apace Jmeter Read more…

Categories: Programming / tutorials Tags: , ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes