Thursday, January 26, 2017

Read jmeter Results (Non Gui mode)




If you look at the above screens, load started with some 20 active users then once it reached 300, it remain constant for some time and then the users are removed so that again it reaches 0.

During this process you will see below field values:

Summary  Timetaken  Req/sec Avg(response) Min(response) Max(Response) Err(%)

Summary - No.f o requests submitted till now.
Timetaken - Time completed till now
Req/sec - No. of requests submitted per sec. Here it is 64.9/s
Avg - Average response time. Here it is 759 mill sec i,e 0.7 Responses/sec
Min - Response with less Response time is 2 mill sec.
Max - Response with max response time is 33057 mill sec
Err - No. of requests that has error response. Here it is 141. 0.10% when compared with 100% reqs.

Test Results (10 TPS):

Duration of Test in Seconds
No of Request
Avg. Tps
Response Time in milliseconds
Error count
No. of Request with response Time>300ms
SLA Breach % for 300ms
No. of Request with response Time>500ms
SLA Breach % for 500ms
No. of Request with response Time>700ms
SLA Breach % for 700ms
Average
Minimum
Maximum















Wednesday, January 25, 2017

jmeter on GUI mode


1/25/17

jmeter on GUI mode is something that you will not see GUI(interface), so for non GUI mode you have run jmeter from server.

Command to run jmeter from server(command prompt) is:

<jmeter software path> -n -t <jmeter script path> -l <jmeter results folder file path>

Ex:

Friday, January 20, 2017

Thursday, January 19, 2017

Errors faced with Jmeter




  1. Getting error "problem loading xml" when try to open .jmx file in Jmeter
    • Solution: http://jmeter.512774.n5.nabble.com/Problem-loading-XML-td5722816.html    ----- worked
    • Explanation: 
      • Your test plan have a Stepping ThreadGroup sampler.
        This sampler comes from jmeter plugins (jp@gc).
        If you try to open a test plan where you have this Stepping ThreadGroup included and your jmeter do not have the plugins installed then you cant open the test plan.
        Please install the plugins then it will work.
      • Download SteppingThread plugin(https://jmeter-plugins.org/) and place it it /lib/ext
      • SteppingThread: 
      • JMeter have only one out-of-the-box option for threads (users) scheduling: simple ramp-up. But many users, especially with HP LoadRunner experience miss more flexible thread scheduling algorythm. Stepping Thread Group adds to JMeter thread scheduling similar to LoadRunner's.
        In JMeter version 2.4 new plugin type was introduced: custom Thread Groups. Stepping Thread Group is the first custom thread group in the world.
        However, time goes by and probably better alternative has been offered: Concurrency Thread Group

        Features


        • preview graph showing estimated load (see example screen below)
        • initial thread group delay to combine several thread group activities
        • increase load by portions of threads (users) with ramp-up period
        • configurable hold time after all threads started
        • decrease load by portions

  1. Error while loading TestPlan - "Unexpected Error - see log"  --- Java Null Pointer Exception
    • Solution: http://nonfunctionaltestingtools.blogspot.com/2015/01/jmeter-error-while-loading-testplan.html    --- working
    • Explanation:
      • Download Extras plug in. 
      • The JMeterPlugins-Extras contains additional plugins for extended testing and complex testing. Also it does not require additional libraries to run. 
      • https://loadfocus.com/blog/tech/2015/07/how-to-install-jmeterplugins-extras-and-jmeterplugins-extraslibs/

  1. Getting error- Target server failed to respond, while running script
org.apache.http.NoHttpResponseException: The target server failed to respond 
                at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:95) 
                at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:61) 
    • Solution: 
      • uncomment hc.parameters.file=hc.parameters in user.properties
      • Set this in hc.parameters: http.connection.stalecheck$Boolean=true
    • Source: http://jmeter.512774.n5.nabble.com/NoHttpResponseException-td5721811.html

  1. Getting error: Response code: Non HTTP response code: java.net.ConnectException.  Response message: Non HTTP response message: Connection timed out: connect
    • Faced this error when the protocol(http) value is "http" instead of "https" (that is in the url used for API)
      • Situation: I had a situation where I was asked to change the end point url that had http instead of https. 
      • Solution: Later I found that if the url has http instead of https, jmeter GUI will not run. Instead you should run jmeter script from the server(from command prompt). 
    • Sometimes, only some threads will have issue. Trying to hit Rest API web service through Jmeter for a range of users. (20, 30,50,80 users). 80% of the request samples get processed, but around 20% of the samples error out with below message under sampler Result. Source: http://stackoverflow.com/questions/30164200/getting-response-code-non-http-response-code-java-net-connectexception-for-som
  1. When I run jmeter scirpt on silver/gold, I got this error: Permission Denied ---working fine
Silver:
/axp/open/risksim/dev/skulkar/apache-jmeter-3.0/bin/jmeter -n -t /axp/open/risksim/dev/skulkar/Perftesting/Simple_Config_Element_server.jmx -l /axp/open/risksim/dev/skulkar/Perftesting


O/p: risksims@lppbd0030[(IPC1-Silver-EDGE) /axp/open/risksim/dev/skulkar/Perftesting]$ /axp/xxx/apache-jmeter-3.0/bin/jmeter -n -t /axp/xxx/Perftesting/Simple_Config_Element_server.jmx -l /axp/open/xxx/Perftesting
-bash: /axp/xxx/apache-jmeter-3.0/bin/jmeter: Permission denied

Resolution:  Looks like the jmeter does not have right permissions on silver/gold, so need to change the mode using:
chmod 777 filename
Ex: chmod 777 /axp/xxx/apache-jmeter-3.0/bin/jmeter


  1. Next error after the above one got resolved. When I run jmeter scirpt on silver/gold, I got this error: Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445

/idn/xxx/apache-jmeter-3.0/bin/jmeter -n -t /idn/xxx/apache-jmeter-3.0/scripts/Simple_Config_Element_gold_server.jmx -l /idn/xxx/apache-jmeter-3.0/Results/CapMgnt_results.csv

Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445