I'm enthusiastic and passionate about web development and design in all it's forms and love to build application with efficient and simple methods

Wednesday, July 23, 2014

Record Scenario With Jmeter

12:17 AM Posted by Codeinterpreter , , No comments
Many of Us has difficulties to Record Scenario with Jmeter. Most problems appears in configurations and browser connection. I will try to explain step by step to setup Jmeter for recording scenario.


  1.  Right Click in Test Plan > Add > Thread Groups.
  2.  Right Click in Thread Groups > Add > HTTP Request Defaults. And filled your Server name or IP to be recorded by Jmeter.


  3. Right Click in Workbench > Non Test Elements > HTTP Proxy Servers. And fill available port, I used 8080.


  4. Drag HTTP Proxy Servers to below HTTP Request Defaults. Use "Insert Before" options. It should become like this:


  5. Right Click in Thread Groups > Logic Controller > Recording Controller.
  6. Right Click in Thread Groups > Listener > View Result Tree
  7. Right Click in Thread Groups > Listener > View Result in Table
  8. Go to File > Save As Test Plan. Save it.
  9. Open your FireFox browser. Go to Edit > Preferences > Advanced > Network > Settings


  10. Clik OK. And Open Jmeter.
  11. Go to HTTP Proxy Servers and click Start.
  12. Go to Your Browser, Type URL, and do the scenario.
  13. In Recording Controller it will appear some result, Expand it for further details.


            (Example)
  14. To watch Generation Time and more advanced recording, In your Jmeter go to Run start and open View Result Tree, it will collected all data in previous scenarios.

Monday, July 21, 2014

Build Test Plan in Jmeter Apache 2.11

12:44 AM Posted by Codeinterpreter , , No comments
To build Test Plan in Jmeter Apache. We need several step to configuring the process.
  1. Right click in Test Plan > Add > Thread Group
  2. Customize the Thread Group with your desire configurations like number of threads(User),The Ramp-Up Period, and loop count.
     - Number of threads : Number of   Users
     - The Ramp-Up Period : This property tells JMeter how long to delay between starting each user. For example, if you enter a Ramp-Up Period of 5 seconds, JMeter will finish starting all of your users by the end of the 5 seconds. So, if we have 5 users and a 5 second Ramp-Up Period, then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). If you set the value to 0, then JMeter will immediately start all of your users.
     - Loop Count :
    This property tells JMeter how many times to repeat your test
  3. Right click in Thread Group created before and go to > Add > Config Element > HTTP Request
    • Name -- the name of this HTTP request. The name should be descriptive; remember that it is common to have multiple HTTP Request elements in a thread group.
    • Server Name or IP -- the server name or the IP address of the machine running the application being tested.
    • Port Number -- the port number used by the application. Normally, a Web application runs on port 80.
    • Protocol -- the protocol used, either HTTP or HTTPS.
    • Method -- the request method, either GET or POST.
    • Path -- the path to the resource that will handle this request.
    • Parameters -- the list of parameters sent with this request. Use the Add and Delete buttons to add and remove parameters.
    • Send a file with a request -- simulate a file upload to the Web application.
    • Retrieve all images and Java Applets -- download embedded content.
  4. Right click in Thread Group created before and go to > Add > Listener > View Result Tree.
  5. Right click in Thread Group created before and go to > Add > Listener > Summary Report.
    Explanations:

    Label: Recorded HTTP requests.

    Samples: Samples denote to the number of http request ran for given thread.

    Average:  Average is the average response time for that particular http request. This response time is in millisecond.

    Min: Min denotes to the minimum response time taken by the http request.

    Max: Max denotes to the maximum response time taken by the http request.

    Std.Deviation: This shows how many exceptional cases were found which were deviating from the average value of the receiving time.   The lesser this value more consistent the time pattern is assumed.

    Error %: This denotes the error percentage in samples during run. This error can be of 404(file not found), or may be exception or any kind of error during test run will be shown in Error %. In the above image the error % is zero, because all the requests ran successfully.

Sunday, July 20, 2014

Install Jmeter

9:04 PM Posted by Codeinterpreter , , No comments
Apache JMeter is a 100% pure Java desktop application designed to load test client/server software (such as a web application ). It may be used to test performance both on static and dynamic resources such as static files, Java Servlets, CGI scripts, Java objects, databases , FTP servers , and more. JMeter can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types.

Jmeter can do stress test to client/server application such as simultaneously massive user login and process. Jmeter works in protocol level and using Java desktop applications.

 Start Jmeter Installation :
  • Go to terminal and check your Java version by typing "java -version".
    It will give result something like this depending on your Java version.
        java version "1.7.0_60"
       Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
       Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
    If nothing displays, please re-Install Java SE runtime environment
  • Download Jmeter from here, and unpack it.
  • Launch Jmeter.
      -
    If you are using Window, just run the file /bin/jmeter.bat to start JMeter in GUI mode as shown below