Sending concurrent http requests per sec through Jmeter - jmeter

preparing test plan to send multiple http request. However, jmeter waits to send another batch of request till it gets response from first batch.
I want to send 10 concurrent requests per sec. If i run 1 mins, i should have 600 requests in the then. However, since jmeter waits to send another 10 concurrent requests till it gets response from previous 10 requests, I can't send 10 concurrent requests.
any pointer would be appreciated.

The easiest option is to go for Concurrency Thread Group which tries to maintain the defined concurrency level by kicking off new threads if current amount is not enough to conduct the required throughput. So basically you need to install Concurrency Thread Group via JMeter Plugins Manager and migrate your Sampler(s) there.
More information: Advanced Load Testing Scenarios with JMeter Part 4 - Stepping Thread Group and Concurrency Thread Group

Related

Is it possible to simulate Once Only login but 100 concurrent users with JMeter

I'm testing a web application that only allow 5 active sessions. I want to simulate 100 concurrent REST API calls. But the below script doesn't work.
Jmeter script
Is it possible to simulate Once Only login but 100 concurrent users with JMeter?
You don't seem to be understanding what does Once Only Controller do.
It runs its child(ren) during only first iteration of the Thread Group, it doesn't execute them at the same time.
If you want to run 100 requests at the same moment - take a look at Synchronizing Timer
If in your setup 5 requests are successful and other 95 are failing you could consider logging in somewhere in setUp Thread Group and then pass the JMeter Variables holding the authentication context to the main Thread Group so all 100 threads would share the same login details.

All threads in jmeter gets completed but the console info is updating for more than 2 hour

I run a performance test with load 25 users with jmeter integrated with jenkins.Once the build is triggered all my thread groups are completed but the console process is running for close to 2 hours.
image here
In your image I see 500 users, not 25.
Also I see that 498 users have finished and 2 are still running.
I cannot state for sure why they are running, it's more a question to you. I can think of the following reasons:
You're not following JMeter Best Practices
JMeter lacks resources and got stuck i.e. in endless garbage collection (which is a subset of point 1)
JMeter waits for response from the server and the server fails to respond. By default JMeter's HTTP Request samplers don't have any timeout defined and it means that JMeter will wait forever, so make sure to set reasonable connect/response timeouts, the setting lives under "Advanced" tab of the HTTP Request sampler (or better use HTTP Request Defaults so you could set the timeout for all the HTTP Request samplers in one shot)
If nothing helps you can check what exactly threads are doing and where they're stuck by taking a thread dump

Using jmeter not all requests processed in database, but in jmeter listener shows all requests hits the server

Using jmeter, I have 10000 users need to hit the server and to respond back with in 40 sec.
During execution (in distributed mode) only 600 users really hitting (Checked in db) in server.
But in AGGREGATE REPORT it shows all requests hits the server.
What is the issue behind this? why the number of requests hits the server isn't consistent between db and jmeter listener?
Probably your test configuration is a little bit wrong.
JMeter acts as follows:
JMeter starts all the threads (virtual users) within the bounds of ramp-up period specified in the Thread Group configuration
Each thread (virtual user) starts executing samplers upside down
When there are no more samplers to execute and no more loops to iterate the thread is being shut down.
You can check how many threads were actually active using Active Threads Over Time Listener or the same chart of the HTML Reporting Dashboard
So you may run into a situation when some samplers have already done their work and some haven't been yet started. Basically you need to provide enough loops to make sure all 10k threads will be up and running for the required test duration.
See JMeter Test Results: Why the Actual Users Number is Lower than Expected guide for more information.

How to run multiple request sequentially in Apache Jmeter

I have an Application where i have to do load test.Its like i have request A and B,and i have to test with 10 users and request should go like first request - A,B ,second request - A,B with ramp up period 0.
Could Any one help on this.I tried doing with Simple controller but the request are sent randomly and fring error
Check the box for "Run Thread Groups Consecutively" in your test plan. It will send your request A and B for first users then for second users and so on.
See this:
If you really need to wait until 1st user is done before starting 2nd one the fastest and the easiest solution would be setting Number of Threads to 1 and loop requests A and B 10 times in your Thread Group configuration.
If for any reason you need to have 10 concurrent users but executing requests sequentially you can go for Inter-Thread Communication JMeter Plugin which allows synchronizing JMeter threads (even residing in different Thread Groups)
The recommended way of installing JMeter Plugins and keeping them up-to-date is using JMeter Plugins Manager

jmeter how make all http request sampler in one thread group run concurrently?

i have one thread group in jmeter and in it i create several http request sampler and when i run this thread group,i found that seems all these http request executed one by one from "view rults tree". So i what to know how can all these http request run concurrently?
My thread group and test plan only need to be executed once one minute,and i use a bat file to run ,command is :
call C:\apachejmeter\bin\jmeter.bat -n -t C:\apachejmeter\app1.jmx -l d:\restmon\restmon.jtl
your prompt reply would be deeply appreciated!!!!!
This is how JMeter works:
JMeter creates threads defined in Thread Group
Threads start executing samplers upside down (default) or according to logic controllers
When there are no samplers to execute and no loops to iterate thread is being shut down
There are several ways to control concurrency:
Playing with ramp-up and run time
Using Synchronizing Timer which is capable of pausing threads until required number is reached and releases them at the same moment of time
Switching to Ultimate Thread Group which provides some extra options to control the load scenario.
I think that Synchronizing Timer is what you're looking for.

Resources