Tuesday, September 26, 2017

How to generate Report Dashboard in JMeter





Steps to Create Report Dashboard in JMeter

1) Create a JMeter(.jmx) file as per the requirement , if it has large number of users ,then go for Non GUI Mode as discussed in the previous post ,otherwise run it from the JMeter GUI Mode Itself.
2) While Creating add a Listeners in the JMX File.
3) After completing the Load / Performance Test , go to the Listeners and Save the data as .csv file , if the Load / Performance Test is done from the GUI Mode.
4) If it is ran from the Non GUI Mode , then open the same JMX File in JMeter and Add Listeners in that.
5) Then Browse the JTL from the Listeners and the data will be shown in the JMeter.
6) Save that as .csv File by clicking "Save Table Data".
7) Then open reportgenerator.properties from JMeter > Bin Folder , Copy all the content from the properties file.
8) Open user.properties from the same path as mentioned above and Paste all the content and then "Save".
9) Now run the below mentioned command in the command prompt.
10) jmeter -g "Path of .csv file" -o "Path for Reports"(Dont Create as "ReportD"),
as it will be automatically created from JMeter itself ).
11) Finally Reports will be generated in the "Path for Reports/ReportD".

Next Topic will be followed in up coming posts😊😊😊.


Thanks

A M Balaji



How to Solve "Out of Memory Error" in JMeter


                



There are 2 ways to solve this issue
1) Increasing Heap Size.
2) Running JMeter in Non GUI Mode.

How to increase Heap Size in JMeter

1) Open jmeter.bat File(JMeter > Bin ), Search for "Heap" in the File.
2) You will be finding some thing as "HEAP=-Xms512m -Xmx512m".
3) In this , change the second part as -Xmx1024m(Depends on your system RAM,can be given upto 80% of the RAM Size).
4) Then start JMeter by double clicking the jmeter.bat file .

Running JMeter in Non GUI Mode

1) Before running JMeter in Non GUI Mode , Make sure you have not added any "Samplers" in JMeter
2) Do all the stuffs in JMeter to do Load / Performance Testing , Such as Recording HTTP Requests, Threads(Users) as per the requirement .
3) Save the JMeter File in JMeter > Bin Folder  .
4) Open the Command Prompt and Navigate to JMeter > Bin Folder
5) Then type the command as "jmeter -n -t YourFile.jmx -l YourFile.jtl"
Where, -n indicates Non GUI Mode
             -t indicates JMX File
            -l indicates Log File(JTL File)

Next Topic will be followed in up coming posts😊😊😊.


Thanks

A M Balaji

Friday, September 15, 2017

Basic Elements required to do Load/Performance Testing in JMeter



                    



Below mentioned elements are required for JMeter Basic Load / Performance Testing.

1) Test Plan
2) Threads Group > Recordings
3) Workbench > Http(s) Test Script Recorder
4) Basic Listeners
1) View Result Tree
2) Summary Report

Here Test Plan and Workbench will be Shown when the JMeter is freshly opened (Open JMeter using jmeter.bat for Windows in JMeter > Bin Folder) and (for Linux jmeter.sh).

User can add above mentioned elements manually one by one (or) Click the "Templates" which is located in the Menu Bar,Which will create all Basic Elements of JMeter to do Load / Performance   Testing.

Test Plan : A test plan is the top level body of JMeter, explains sequence of steps execute at run  time.

Threads Group: The name,Thread Groups represent a group of Threads. Under this group, each   thread simulates one real user requests to the server.

Thread Group will be having 3 Properties :

       1) Number of threads - the number of users you are going to test.
   2) Ramp-up time -  The time set by the users to execute the no. of threads.
   3) Loop count - How many times the test should be looped.
   
Recordings : Here the script will be recorded automatically , when user records the Request from Mobile(Look at the Post 2 and 3) for Automatic Recording.

Workbench > Http(s) Test Script Recorder : From Here only user will start the JMeter Proxy to record the Script under "Recordings" ( Look at the Earlier Post).

View Result Tree : Here user can see the request and responses for each and every  Http Requests which is recorded.

Summary Report : Here user can see the Min,Max and Avg Response time , Errors and such other information for each and every request.



Next Topic will be followed in up coming posts😊😊😊.

Thanks

A M Balaji



Record Scripts from IOS Native Mobile Apps using JMeter

                                                             

                     


Step 1: Both Laptop and IOS Device should be same network, i.e) Both should be in same WIFI

Step 2: Check the IP of the Laptop,by typing IPCONFIG in the command prompt.   

Step 3: In IOS Device, goto Settings > WIFI , then Tab on the connected WIFI.

Step 4: After that tap on the "Manual" Option.

Step 5: Next give the IP Address in the "Server"(Which is taken from the Laptop Using IPCONFIG) and "Port" as 8888(Default Port for JMeter).

Step 6: Next open the JMeter 

    1) Click on the Templates in the Menu bar and then select "Recording"(default)
        and select OK

    2) Then select http(s) Test Script Recorder from the Workbench and Check the port , 
         it should be 8888 

    3) Then click on the Start Button to record the script for the specified App.

    4) Check whether the script in recording by clicking on the
        Thread > Recording Controller.

    5) If it is not recording , then restart both the Device and JMeter.

    Note : When user clicks on the Start Button in http(s) Test Script Recorder ,
               new popup will open with the certificate(Valid for 7 days) which will be seen in
               JMeter > Bin folder.

 

                            For IOS Mobile Configuration Check the Below Mentioned Image

                                                          

                                        


        Next Topic will be followed in up coming posts😊😊😊😊😊

     

      Thanks

      A M Balaji

Wednesday, September 13, 2017

Record Scripts from Android Native Mobile Apps using JMeter

                                                             

                    

Step 1: Both Laptop and Android Device should be same network, i.e) Both should be in same WIFI. 

Step 2: Check the IP of the Laptop,by typing IPCONFIG in the command prompt.   

Step 3: In Android Device, goto Settings > WIFI , then Long Press on the connected WIFI, then select the "Modify Network" Option in that.

Step 4: After that tap on the "Advanced Options" , then select the Proxy as "Manual".

Step 5: Next give the IP Address in the "Proxy hostname"(Which is taken from the Laptop Using IPCONFIG) and "Port" as 8888(Default Port for JMeter) and then Save it.

Step 6: Next open the JMeter 

    1) Click on the Templates in the Menu bar and then select
        "Recording"(default) and select OK

    2) Then select http(s) Test Script Recorder from the Workbench and Check the port , 
         it should be 8888 

    3) Then click on the Start Button to record the script for the specified App.

    4) Check whether the script in recording by clicking on the
        Thread > Recording Controller.

    5) If it is not recording , then restart both the Device and JMeter.

    Note : When user clicks on the Start Button in http(s) Test Script Recorder ,
               new popup will open with the certificate(Valid for 7 days) which will be seen in
               JMeter >  Bin folder.
 
   The above mentioned steps(from Step 6 > Step 3) will work if the Android App is
   "HTTP". If the Testing App is with "HTTPS", Then install the Generated Certificate
    in the mobile device (Certificate will  be seen in the JMeter > Bin folder).

                       For Android Mobile Configuration Check the Below Mentioned Image


                                        


        Next Topic will be followed in up coming posts😊😊😊😊😊

    

      Thanks

      A M Balaji

Tuesday, September 12, 2017

JMeter Introduction




Introduction


JMeter is an Open Source testing software. It is 100% pure Java application for load and performance testing. JMeter is designed to cover categories of tests like load, functional, performance, regression, etc., and it requires JDK 6 or higher. This tutorial will give you great understanding on JMeter framework needed to test an enterprise level application to deliver it with robustness and reliability.

                                                 

  Prerequisites


Before Installing JMeter , Java to be installed in the machine where JMeter is going to be Installed.

How to Install Java in the Machine.

1) If the Machine is 32 Bit , Download 32 bit Java and install in the Machine and then set the environment variables for java . Set JAVA_HOME in Environment Variables
2) Command to verify the java installation in the machine , type the below command in the command prompt. Link to download Java is Click Here
                         1) java -version
                         2) java -d32 -version or java -d64 -version

The second  command is to verify whether installed java version in 32 bit or 64 bit.

3) Then download JMeter ,to download Click Here.

4) After Downloading , extract the ZIP File in Drive(Preferably C: , Because Java will be installed in C Drive by default).

5) After extracting , go to bin folder , double click ApacheJMeter.jar or jmeter.bat file for windows and jmeter.sh for linux to start JMeter.


Next Topic will be followed in up coming posts😊😊😊.

Thanks

A M Balaji