There are 4 thread groups that run different tests simultaneously (mostly http requests). In one thread group I need to run two http requests at once. How to do it? JMeter is not allowing to nest thread groups.
If you need to run 2 requests at once for the same thread (VIrtual User) , you need to use this plugin:
https://github.com/Blazemeter/jmeter-bzm-plugins/blob/master/parallel/Parallel.md
You can install it with plugin manager.
Related
Due to the limitation of Test Users Ids, we were only running the test with 3 Test Ids, these Test Ids can have max 1 session, if we login manually on another browser or machine it will kill the existing session.
Based on this limitation, I used Setup Thread Group to login, Teardown Thread Group for Logout and Thread group where I searched a few Items. On this Thread Group, I was successfully able to execute 20 users Load test where users were searching items and I was able to achieve the throughput target, even though the users' login session was 3, but problems occurred after 20 min of test when a session of Test user ids expire and Thread Group starting giving error.
My requirement is to run a load test for 1 hr with 20 user load on Thread Group, is it possible to recall setup Thread group so that I can achieve my requirement or if you have any other approach please suggest.
Theoretically it's possible to use Inter-Thread Communication Plugin to conditionally call something in another Thread Group, but I don't think setUp Thread Group is a good candidate because it's executed before the main Thread Group.
It worth switching to "normal" Thread Group and the easiest solution would be just letting it run continuously and re-login each 19 minutes so the session would be "refreshed", the delay can be introduced using Constant Timer of Flow Control Action sampler.
In the main Thread Group you can either introduce some "Startup delay" in order to let the first Thread Group to login:
or use the aforementioned Inter-Thread Communication Plugin if you need to start main threads right after logging in without any extra delay
I am trying to perform load testing for my Web Application. Have created a Test plan with 16 scenarios using a single thread group. I have added multiple sampler requests under each scenario and used throughput controllers for each of these.
But when the test is run, I noticed that the scenarios are running sequentially whereas i Want the scenarios to run in parallel.
Can someone help me with this please.
This is how JMeter works. Each thread (virtual user) starts executing Samplers upside down (or according to Logic Controllers)
When you add more threads (virtual users) there will be some concurrency, as it evidenced by __threadNum() and __time() functions output:
So just provide enough threads (virtual users) and loops (iterations) on Thread Group level and you will get the concurrency you're looking for
My case is-
I have to login in a website and then have to fecth a data.
For that I have created one thread group and created two HTTP request , one for login and one to fetch data.
But I want login HTTP request to HIt one time and data fetching to hit for many Virtual users.
But There is one common thread group for both.
Please help How I can sort out this?
If you need to run all requests after login in parallel, you may use Parallel Controller plugin:
Install JMeter Plugin Manager: Download plugins-manager.jar and put it into lib/ext directory, then restart JMeter.
Open menu Options -> Plugins Manager
Install Parallel Controller & Sampler plugin.
Add the Parallel Controller to the Test Plan: Right click on Thread Group -> Add -> Logic Controller -> bzm - Parallel Controller
Add your request samplers inside Parallel Controller.
Choose your Thread Group and set the number of threads (users) and loop count.
Each thread will execute the test plan in its entirety and completely independently of other test threads. Multiple threads are used to simulate concurrent connections to your server application.
So, if you want to run login sampler just once, set:
Number of Threads (users) to 1
Loop Count to 1
There are also different types of Thread Groups. Check official documentation for more information
JMeter threads (virtual users) are totally independent from each other, they use Thread Local Storage pattern for storing session information and variables therefore if you login with one user - it will be able to fetch the data, the second user will not be able to fetch the data if he isn't logged in.
If you're absolutely sure that you want to share the same login session across multiple virtual users and perform login only once consider the following test setup:
setUp Thread Group with 1 virtual user and 1 loop to perform login
Inter-Thread Communication Plugin to store the session information (i.e. Cookies) and pass it to the normal Thread Group
Normal Thread Group with as many users as you need using the data from the setUp Thread Group
Check out SynchronizationPluginsExample.jmx test plan for reference implementation.
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
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.