Friday, July 10, 2015

To Avoid Recording Issues Install Apache JMeter Certificate

Some time JMeter not working properly while recording HTTPS sites for that we need to install ApacheJMeterTemporaryRootCA certificate in browser. This certificate is available under apache-jmeter-2.13\bin folder.

Here we learn how to install this certificate in Firefox

Step 1 :

Open Firefox browser and click on option from Menubar.


Step 2 :

Select Certificates Option from Advanced setting option and click View Certificates button.





Step 3 :

 Now go to the Authorities tab from Certificate Manager modal and click on Import button.


Step 4 :

 Now Select ApacheJMeterTemporaryRootCA from opened file browser window.




Step 5 :

 A new Downloading Certificate modal will be opened and select all option from it and click ok.


Note :
For Installing Certificate on Internet Explorer or Chrome we need to follow the below steps :

  • Double click the certificate created
  • Certificate Import or Install Certificate Wizard opens

  • Click Next or Install Certificate
  • Select Second radio button (Place All Certificates in the following store) 
  • Click Browse and select 'Trusted Root Certificates Authorities'. Click Next

  • Click Finish
We can verify our certificate installation in Chrome Settings (under Http/SSL) - Manage certificates.. (Trusted Root Certificates Authorities Tab)

Thursday, July 9, 2015

Recording Load Test Script With JMeter

We have little bit knowledge on different components of JMeter and we know how to create a script. But in real world it is very hard to create a load test script in such a manner, because there is lots of steps and lots of different type of user activity. So it is good if we generate script as per user activity.

Here JMeter provide us this functionality where we record our script as per user action. JMeter comes with recording template for this facility. Though we can create JMeter script without this template, we need to add  HTTP(s) Test Script Recorder (Add ->Non-Test Elements-> HTTP(s) Test Script Recorder) under WorkBeanch and also need to add Recording Controller(Add -> Logic Controller -> Recording Controller) under Thread  Group.  Here we deals with JMeter Template .

Step 1 :

 Open JMeter GUI .

Step 2 :

 Choose Template option from File -> Templates... 
Step 3 : 

 Select Recording Option from Select Template dropdown option.
Step 4 :

 Click on create button then Template modal option closed and JMeter GUI looks like that.

Step 5 :

 Set a port number for recording our script.


Step 6 :

 Set the same port number in browser. We use Firefox as a browser for recording our script so we set port number from Tools -> Options ->Advanced ->Network

Step 7 :

Default selected option in  Target Controller as Use Recording Controller if we want to store our recorded script under Test Plan -> Thread  then select Test Plan-> Thread Group from Target Controller






Step 8 : 

We can group our recorded script when we record our script. We can do this using different type of Grouping option from Grouping dropdown option. Default option in Grouping is Put each group in a new transaction controller .







Step 9 :

 Select URL pattern to exclude from recording script, we need to add the file type here .

Step 10 :

Now we start to recording the script for load testing.


Step 11 :

 If Apache certificate, which is located in JMeter bin folder is not installed in machine the this pop up will be shown but we can click on OK and proceed further.
Step 12 :

  We open Google page in browser and observe that google page opened into the browser and we can observe that HTTP Sampler added under Test Plan ->Thread Group .

We can now record our script after following the above mentioned script.