Saturday, July 25, 2015

BIRT reports 1: Install BIRT in Eclipse

BIRT sands for Business Intelligent and Reporting Tool which is an Open Source platform for data visualization and reporting. In this post I'm going to explain how to setup BIRT reports in windows Eclipse.

Prerequisites 
  1. You should have install java(It requires to have JVM 6 or higher version ) in your PC and set path variable correctly (JAVA_HOME, PATH)

To install you can choose either download All in one Eclipse or You can install BIRT as new plugin. Yo download All in one Eclipse go to BIRT download page and click on Download Now under All-in-One heading. (Figure 1)
Figure 1 : Download required BIRT

If you continue with All-in-One you can select preferred bit version with different operating systems. (Top right corner under Download Links heading) 

If you need to install it as plugin go to BIRT wiki update page and select your Eclipse version and copy URL then on you Eclipse go to Help->Install New Software.. You can see similar interface to Figure 2
Figure 2: Install New Software Interface
On this interface click on Add button (Top right corner) and provide name for the software and URL copied from BIRT wiki update page and then click OK button.
Then You can see similar interface to Figure 3 and on that interface Click on Select All button and click Next. Then continue the installation steps.
Figure 3: Click on Select All button
After successful installation you can go to File->New->Project then select Report Project under Business Intelligent and Reporting Tool. (Figure 4) After that click next and provide appropriate name for project then click Finish
Figure 4: Select Report Project

Then lets start to create new report in our new report project. To start go to File->New->Other then select report under Business Intelligent and Reporting Tool and click next.(Figure 5)  In next interface provide report name and click Finish.
Figure 5: Select report under Business Intelligent and Reporting Tool
Then Eclipse will prompt message asking to change the perspective in to Report Design click OK and then you can see interface similar to Figure 6.
Figure 5: Report design interface in Eclipse

On next post I will explain how to design report easily with data set and report designing techniques which can use to develop complex reports. 

Sunday, July 12, 2015

Performance load testing with JMeter 1



The Apache JMeter is pure java application that can use to perform functional testing and load testing on applications. This application will help to test on both static and dynamic resources.It can be used to simulate a heavy load on a server, group of servers, network or object to test its strength or to analyze overall performance under different load types. You can use it to make a graphical analysis of performance or to test your server/script/object behavior under heavy concurrent load.

It is supporting following servers and protocols to load and performance testing.
  • Web - HTTP, HTTPS
  • SOAP / REST
  • FTP
  • Database via JDBC
  • LDAP
  • Message-oriented middleware (MOM) via JMS
  • Mail - SMTP(S), POP3(S) and IMAP(S)
  • MongoDB (NoSQL)
  • Native commands or shell scripts
  • TCP
In this post I am going to explain how to test load and performance testing on web application in step by step approach.


Prerequisites 
  1. You should have install java(It requires to have JVM 6 or higher version ) in your PC and set path variable correctly (JAVA_HOME, JRE_HOME)
Step 1 Download and install JMeter
First you have to download JMeter from following location in Apache web site. (For this example I have downloaded apache-jmeter-2.13.zip file) Then extract the zip file and then run Jmeter.bat file in bin folder.


Figure 1: JMeter interface 
In the figure 1 you can see Test Plan icon in left side of the interface.  In this Test plan you can define the configurations where you start setting the testing configuration that are specific to your application. right click on it and go to Add. You can see different kind of features provided by the JMeter to perform testing.

Step 2 Create Thread Group in JMeter
Go to Test Plan and Right Click it then go to Add->Threads (Users)->Thread Group.
Then you can see similar interface to figure 2.


Figure 3: Thread Group view

Then click on the Thread Group and you can see similar interface to Figure 3. In that you can provide any preferred name. In Thread Properties section you can fill two main properties those are Number of Threads and Ramp Up Period. 
There is important section below the Thread Group name section it is "Action to be taken After sampler error". This will specify what kind of action should be taken when error occurred. For this example I put it as "Continue".
Under Thread Properties there are couple of important configurations.
Number of Threads - This specify number of concurrent users 
Ramp Up Period - This specify number of seconds JMeter to add concurrent users.

There is another option Thread properties it's Scheduler. You can specify start, end time, duration and start up delay. (These will only display when user ticked on Scheduler check box)

Step 3 Add request sampler in JMeter
To add request sampler in to JMeter right click on the Thread Group and go to Add -> Sampler  -> HTTP request as show in Figure 4. Then you can see similar interface to Figure 5. In that provide the server id/domain name in front of the Server Name or IP field. For this example I put www.google.com as server so my load testing will test Google site. Then save the request sampler witch added to the Thread group.

Figure 4: Add request sampler
Figure 5: Add HTTP request sampler

Step 3 Add summery report in JMeter
Actually summery report is one kind of listener available in JMeter. Other than the Summery report there are many listeners available in JMeter. (Figure 6)

Figure 6: Different kind of Listeners available in JMeter
To add summery report right click on Thread Group created and go to Add->Listener->Summery Report. Then you can see similar interface to Figure 7 and provide name for the summery report. Then save the summery report.

Figure 7: Summery report added to Thread Group
After save the summery report you can see that report under Thread Group you created.

Step 4 Start the load testing
To start load testing click on the Thread Group created and click green start icon on icon panel. Then in Right top left corner you can see number of Threads running on to your server and the success attempts.
Then you can go to summery report and you can find the result according to the Thread Group you have configured in step 1.(Figure 8)
Figure 8: Summery report for the load test

Hope this post help you to get basic idea about load testing using JMeter and I will add more advanced loaded testing mechanisms using JMeter in my future posts.