I have a strange problem in 2.6 jmeter. I have a really simple test plan with couple of http samplers with cache and cookie managers on the thread level. Whenever "Use concurrent pool" is enabled for http samplers, I see the following warnings in the log:
jmeter.protocol.http.sampler.HTTPSamplerBase: Existing CacheManager HTTP Cache Manager superseded by HTTP Cache Manager
jmeter.protocol.http.sampler.HTTPSamplerBase: Existing CookieManager HTTP Cookie Manager superseded by HTTP Cookie Manager
This repeats a huge number of times for each thread and may hang jmeter. But if the "Use concurrent pool" setting is disabled then everything is fine. There are no additional cookie or cache managers on the sampler level. I can not do without Cookie manager's functionality in my test plan.
My test plan looks like this:
Test plan
---Thread Group
------Cookie Manager
------Cache Manager
------Response assertion
------HTTP sampler
--------Header Manager
------HTTP sampler
--------Header Manager
------Aggregate report
You have multiple Cookie and Cache managers in scope and this is causing this warning to appear. To remove the warning you should remove the additional, extraneous managers.
Eg.
Test Plan
---Thread Group
---HTTP Cookie Manager
-------Sampler
HTTP Cookie Manager
The above setup will cause this warning as both managers will be in scope for the sampler.
This:
Test Plan
---Thread Group
---HTTP Cookie Manager
-------Sampler
Will not cause the warning but will still produce the same results.
I found that when had a "HTTP Request defaults" config element setup with "use concurrent pool" enabled I always got these warnings. Disabling that setting cleared up warnings, doesn't explain the why? however.
Related
Our Application is live event based application which creates 2-3 web-socket connection and it is a web-based application which makes both HTTP calls and Web-socket calls.
I have created a script for Https calls as unfortunately Jmeter does not support web-socket recording so I trying to insert web-socket calls manually with the help of web-socket Sampler but not sure which will be the best sampler for same as my request has access token in it.
I tried with Web-socket request-response sampler I am getting 200 OK but their is no data response from server when I compare it with browser developer tool i could see some messages flowing..
Can anyone let me know if I am doing something wrong or missing anything? OR what can be done to solve it.
I believe JMeter WebSocket Samplers by Peter Doornbosch is what you're looking for.
As per Features section:
integrates with JMeter's Header Manager to set additional HTTP headers on WebScoket upgrade request
so you will be able to add HTTP Header Manager, configure it to send Authorization header with the value of Bearer followed by your token and the Sampler will pick it up.
With regards to which one to choose - it depends on the nature of your application and how does the communication with the backend looks like, check out your browser developer tools to see whether requests/and responses are coming via a single connection or a new one is being established for each frame and so on.
More information: JMeter WebSocket Samplers - A Practical Guide
I am writing load test script for an SAP-based application in jmeter. I am getting 500 internal Server.
I saw that the request looks same which I have on the browser network tab and the one I provided in JMeter. The only difference is in the request header, that I am not providing any SAP-passport in my request. I am not to see the SAP-Passport in the response of any previous request's response so that I can extract that and use in future requests.
Please tell me if I am assuming correctly that the SAP-Passport is the issue, if yes then how can I get that and use in the request. Also if there is a way to get any static SAP-Passport.
Its a blocker for me and its on priority, please help.
As far as I can see from Single Sign-On with SAP Passports article it is a matter of adding a client certificate to JMeter.
Obtain SAP Passport root certificate somehow (i.e. export it from your browser)
Add it to JMeter. This can be done in 2 ways:
Using SSL Manager
Using JMeter system.properties file
Check out How to Set Your JMeter Load Test to Use Client Side Certificates guide for comprehensive instructions on both approaches.
For the application server set as clustering in glass fish. I have sent request through jmeter and all the requests hits to only one server . Expected was requests should be distributed to multiple servers in the cluster. But if sent requests manually clustering is working. Please help to sort out this issue
There could be different clustering load balancing mechanisms, as far as I can see from the GlassFish Server High Availability Administration Guide:
Cookie Method
The Loadbalancer Plug-In uses a separate cookie to record the route information. The HTTP client (typically, the web browser) must support cookies to use the cookie based method. If the HTTP client is unable to accept cookies, the plug-in uses the following method.
Explicit URL Rewriting
The sticky information is appended to the URL. This method works even if the HTTP client does not support cookies. To implement explicit URL rewriting, the application developer must use HttpResponse.encodeURL() and encodeRedirectURL() calls to ensure that any URLs in the application have the session information appended to them.
So depending on your Load Balancer configuration you need to
Either define either different cookies in the HTTP Cookie Manager
Or make sure different threads send requests to different URLs i.e. via HTTP URL Re-writing Modifier
In any case it is recommended to add DNS Cache Manager so each virtual user would resolve the underlying IP address of the application under test on its own.
I am doing load testing in jmeter. I have recorded the script using jmeter recording of my application. When i am running the script then response time is greater than the response time comes in browser.
I have used the concurrent pool in Http Request Header but its not working for me because i have different http requests.
So Is there any way that we can send the parellel http requests of Sampler for same user.
Please help! Thanks in advance.
Try "clean" browser session - delete all cookies, cache, etc. - response times will stop being different - all you need is just to add HTTP Cache Manager to your Test Plan
If it doesn't help - it may be AJAX. JMeter doesn't have built-in mechanisms for simulating AJAX requests so it needs to be worked around.
See How to Load Test AJAX/XHR Enabled Sites With JMeter guide for different options highlighted and explained.
we are working on performance testing using JMeter, Can any one please provide information how to keep the Session alive using jmeter for 3 minuts or more.
To keep session alive , you need to check option "Use KeepAlive" in your http sampler.
You can just add a HTTP Cookie Manager at the Thread Group level, so as to ensure that all HTTP requests will share the same cookies.
Right click your Thread Group, and then add Config Element -> HTTP Cookie Manager.
More details about HTTP Cookie Manager: http://jmeter.apache.org/usermanual/test_plan.html