Jmeter Cache Manager - null exception - performance

I have created a web test for simulating a browser behavior that I will use for load test.
Version: Jmeter 2.12
My Test plan
HTTP Request Defaults
Ultimate Thread Group
-HTTP Cache Manager
-HTTP Cookie Manager
-Once Only Controller
Login function
-Random Controller
Random Http requests
Response Assertions
If I have Use cache control/Expires header when processing GET requests unchecked there are no problems.
When I tick "Use cache control..." I get a lot of errors?
Sampler request:
Thread Name: jp#gc - Ultimate Thread Group 1-5
Sample Start: 1970-01-01 01:00:00 CET
Load time: 0
Latency: 0
Size in bytes: 418
Headers size in bytes: 0
Body size in bytes: 418
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.lang.NullPointerException
Response message: Non HTTP response message: null
Response headers:
HTTPSampleResult fields:
ContentType:
DataEncoding: null
Request
Null
Is this the normal behavior? Are thh pages not requested since they are in cache? Should I then remove my assertions? (I use response assertion, contain text) What assertion could I use?

This is a known issue in 2.12, that was fixed in 2.13. See: https://bz.apache.org/bugzilla/show_bug.cgi?id=57579
If you want to still use, 2.12, as a workaround you can add this line to your jmeter.properties file
cache_manager.cached_resource_mode=RETURN_200_CACHE

Related

jmeter showing error when HTTP request is made

I am totally new to JMeter, when I tried to test a website.
The test result was like this
Thread Name: Thread Group 1-1
Sample Start: 2018-06-19 10:18:49 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 1176
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 1176
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Expected closing bracket for IPv6
What might be the issue?
Looks like improper HTTP Request sampler configuration, for instance you put some not supported character into "Server Name or IP" field. Well-behaved request should look like:
Another option is placing the full URL into "Path" field like
However the best option will be just recording your test scenario using JMeter's HTTP(S) Test Script Recorder, this way JMeter will generate appropriate HTTP Request samplers which you will be able to replay with increased number of threads. See Apache JMeter proxy Step-by-step guide for comprehensive instructions.
Alternatively you can use JMeter Chrome Extension - in this case you will not have to set up proxies and worry about SSL certificates.

Response message: Non HTTP response message: no protocol: Response code: Non HTTP response code: java.net.MalformedURLException

Try to execute a script using Jmeter 3.0.I am getting error for eg. If I applied load of 50 users, Ramp-up period 10, loop Count: 1
Thread Name: Thread Group 1-2
Sample Start: 1970-01-01 05:30:00 IST
Load time: 0
Connect Time: 0
Latency: 0
Size in bytes: 729
Headers size in bytes: 0
Body size in bytes: 729
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: Non HTTP response code: java.net.MalformedURLException
Response message: Non HTTP response message: no protocol:
Response headers:
HTTPSampleResult fields:
ContentType:
DataEncoding: null
Can anyone help me why this type of error is showing?
I tried few requests for the above URL in JMeter 3.2. It seems like there is no issue in the URL. Please make sure the configuration of HTTP sampler as shown below.
HTTP Sampler Configuration
You can use Redirect Automatically option also.
Output
Jmeter; how to solve the error 'Non HTTP response message: unknown protocol'
If it is an https protocol include it in the text box and if not, you can leave it blank.
Type the url of the page in the text box labelled server name.
You can include the path if there is, in the path text box.
See image in the link below;
https://i.stack.imgur.com/PPum7.png

how to run the recorded jmeter test plan

Thread Name: Thread Group 1-1
Sample Start: 2015-01-12 12:11:16 IST
Load time: 0
Latency: 0
Size in bytes: 1080
Headers size in bytes: 0
Body size in bytes: 1080
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.net.URISyntaxException
Response message: Non HTTP response message: Expected closing bracket for IPv6 address at index 14: /
Response headers:
HTTPSampleResult fields:
ContentType:
DataEncoding: null
I am trying to execute the recorded JMeter test plan... but its showing the error as shown above. Can anyone help me how to sort it out??
Perhaps recording issue or something connected with i.e. clash with HTTP Request Defaults.
By the way, there is an option for recording JMeter scripts right from Google Chrome browser via JMeter Chrome Extension which doesn't require to worry about proxies, SSL certificates, cookies, excluding usual patterns from recording, etc. perhaps it may be easier to use.
Error is "Response code: Non HTTP response code: java.net.URISyntaxException"
This is means url is not getting passed correctly.
Solution is,
Remove http:// from your server/ip in your http request.
While running look at the request sent. it should be http://server and not http://http://server

Jmeter keeps failing

I have a simple web application that checks the price of books. The web application is called books. I am using Jmeter to test some performance aspects about my application. I have created a thread group in which I have a simple controller in which I have a sampler Http request. I have the following tree in Jmeter
Thread Group
Simple Controller
Get Books
In the get books I pass in the following values in the parameter(price) and the value is 40
When I run the tests I get this error message
Thread Name: Thread Group 1-1
Sample Start: 1970-01-01 10:00:00 EST
Load time: 0
Latency: 0
Size in bytes: 1098
Headers size in bytes: 0
Body size in bytes: 1098
Sample Count: 1
Error Count: 1
Response code: Non HTTP response code: java.lang.IllegalArgumentException
Response message: Non HTTP response message: protocol = http host = null
Response headers:
HTTPSampleResult fields:
ContentType:
DataEncoding: null
Not sure what I am doing wrong. The tomcat server is running the application works fine. I am really new to Jmeter so not that good with it.
Check Server name, port number, method and path are correct. Do not add http:// in server name.
If the method is GET, try to access the url through browser and check response is same.
Check if all the request headers are handled.

jmeter response code 204 and can't get content

I am doing a websocket stress test through jmeter2.9.
When I send a request and response with a "light" json. the result is ok.
But when the response json contains a base64 png(about 360kb) . jmeter return code 204 No content (probably timeout).
Is my jmeter need some config here, or something else wrong.
If someone know something about this please teach me.
complete info:
Thread Name: threadgroup 1-1
Sample Start: 2013-07-17 15:36:06 CST
Load time: 20000
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 204
Response message: No content (probably timeout).
Response headers:
SampleResult fields:
ContentType:
DataEncoding:
Check if you are using Cache manager, there seems to be a (bug) in Jmeter that sets the response code to HTTP Code '204' ("No Response") while, there is no outgoing request, the information is retrieved from the Cache, try disabling cache manager and lets see if you can reproduce it then.
This could be because of the unhandled exception, response being larger than the maximum message size specified in the plugin code, etc. The exception which you see will be thrown if no response has been received from the server after predefined timeout.
Here is another WebSocket plugin for JMeter which might work for you
Link: https://github.com/maciejzaleski/JMeter
Features:
Supports HTTS/HTTPS (ws/wss) version of the WebSocket protocol
Option to ignore SSL certificate errors
Streaming allows for a single connection to remain open for the duration of the test
Response has to match predefined regular expression
Response timeout
Response message back log (build the Sampler response from multiple server messages)
Connection could be closed if server sends a mesage matching predefined regular expression

Resources