User these days go online for almost everything from getting in touch with friends to finding a job to buying stuff. And with more and more people accessing the web services, performance really becomes a good check point. Nobody likes to click a link and then wait for like ages. In-fact most people stop visiting a site if it takes longer than about 10 seconds to load a page.

So how do we check the performance of the web service(website/web apps)? Well there are a lot of tools available out there for it. One such tool that is also open source is Jmeter.

Now there are already so many tutorials on how to download and set up Jmeter, so you can just go ahead and Google it. So now lets talk about how to use Jmeter the way I do.

  1. Open Google Chrome browser and go to the web store.
  2. Now search for an extension - "Blazemeter" and install it.
  3. You will see a black and golden Blazemeter icon beside the address bar in the extensions list as shown in the image below.
  4. Click on the Blazemeter icon and it will open the Blazemeter performance test recorder panel.
  5. Note, that you might want to login. The relevance for it is explained in step 11 and 12. So if you do not have a Blazemeter account go ahead and sign up. Its totally free.
  6. Once you are logged in, click on the Start Record link( a red circle inclosed in red border).
  7. Now every action you perform in the browser will get recorded.
  8. Go ahead and open the website you want to check for performance or load.
  9. Perform all the actions and scenarios you need to test.
  10. Once you are done, again click on the Blazemeter icon to open the recorder and click on the Stop recording link next to the Record link.
  11. Now that your test has been recorded, you will want to download it to run it in Jmeter. Now this is why you need to be logged in with the Blazemeter account.
  12. Now click on the ".jmx" link in the recorder. It will ask you to select the domain that need to be added with the test. Go ahead and select the link and download the ".jmx" file(Considered as test plan in Jmeter).
  13. Now open Jmeter, and from the file browser open the downloaded jmx file.
  14. This will list the test plan you recorded using Blazemeter.
  15. Now you can edit the test plan and the threads(numbers of virtual users).
  16. Add some listeners to the test plan, run the test and wait for the results. Tada...

Blazemeter-1

 

Jmeter also has a built in recorder, but there's a difference in how it works and the way tests recorded with Blazemeter work. You see jemter simply takes all the http requests and hit them onto the server all at once. So if you have recorded a test with built in recorder, what it will do if get every individual http request and treat it independently. So when you're testing a web page for a load of 100 users, what it will do is get all the images links and referenced files and make 100 requests for each of them independently. Whereas, Blazemeter groups all the links in a page so that it generates more realistic load since in this case its like 100 users accessing a web page simultaneously rather then accessing individual image or link from that page.

So, that is how I like to do performance testing. I record all my test scripts using Blazemeter's Chrome Extension and then import those scripts in Jmeter and generate the required load.


Share you thoughts

To share your thoughts, you can simply fill in the form below and send me an email with your favorite email client/app.


Comments