I am having different thread groups in my j-meter test plan and I want to
maintain same session id across all thread groups. Can anyone help me here?
You can try extract Session id with Regular Expression Extractor, and then use it in next thread groups
Related
I have a login scenario to be tested for 10000 users, which contains phone# as input and have given in csv file. Im able to perform load testing for 10000 users and able to show the report with total samples, throughput etc post exporting to a file. However issue is customer wants proof that we are giving input as 10000 users and not using loop eg(500 threads * 2 loops). Kindly help with suggestions if we have any option to show that we are using 10000 unique users.
There is a listener called Active Threads Over Time (can be installed using JMeter Plugins Manager) which shows how many users were active during this or that phase of the test
jmeter.log file contains information how many threads were started for this or that Thread Group
.jtl results file contains number of active threads, both overall and in the current Thread Group
HTML Reporting Dashboard contains the Threads Over Time chart
I am going to test database read performance with Jmeter Java Sampler.
Basically, query database 10000 times with primary key as query condition like ID with Thread group and Java Sampler.
I need to load 10000 records into database before executing the Thread Group.
The 10000 records will be looped for the 10000 times database read.
I have looked into the preprocessor of Jmeter. I can insert 10000 records into database in preprocessor, but I do not know how to pass the 10000 IDs to Thread Group or Java Sampler. It is too long to contact IDs as a String parameter.
How I can archive the purpose? Any comment is welcome.
Instead of inserting the data using PreProcessor I would rather recommend preparing the test data in setUp Thread Group. You can write the generated IDs into a file using i.e. Flexible File Writer and then read them back with the CSV Data Set Config
If the database you're testing supports JDBC protocol it makes more sense to use JDBC Request sampler because JDBC Connection Configuration allows using connection pool pattern which most probably your application will be using when talking to the database, the main idea is to set up JMeter to produce the same footprint as the application which will be accessing the database.
I am trying to compare the performance difference between DELETE batch sizes using JMeter.
I have a table which I populate with a large amount of test data. Next, I have a JDBC Request that runs the following statement:
delete from tbl where (entry_dt < '2019-02-01') and (rownum <= 10000);
I want to keep running this until the table is empty, and record the time taken to clear the table.
I will run this thread multiple times to get an average execution time, and repeat this process for different batch sizes.
How should I define my While Controller to achieve this?
I read from other sites that I can use a Transaction Controller to time my process, but I am not familiar with this feature. How should I define my Transaction Controller to achieve this?
Add Transaction Controller to be a top level test element under the Thread Group
Add While Controller as a child of the Transaction Controller and use the following condition expression:
${__jexl3(${count_1} > 0,)}
Put your JDBC Request sampler as a child of the While Controller
Add JDBC PostProcessor as a child of the JDBC Request sampler and configure it like:
That's it, While Controller will iterate until there are entries in the tbl table and the Transaction Controller will record the cumulative time of all JDBC Request samplers executed.
I would do it this way:
Use the "JDBC Request - Get Count" sampler to get the data from the db which has to be deleted
Use a BeanShell Assertion to check if there is more data that can be deleted. Otherwise stop the thread
Execute the request to delete the data
Thread Group should stop Test on error
When doing load testing in JMeter, should I make multiple identical thread groups to simulate multiple users simultaneously performing actions on my site? Or does one thread group with multiple threads/users in it suffice?
Thread Groups is designed to represent a "group" of virtual users which is "grouped" by some factor.
As per Thread Group documentation:
A Thread Group defines a pool of users that will execute a particular test case against your server.
So the answer is one thread group with multiple threads/users in it suffice
For example if you are load testing StackOverflow you will have following example groups of users:
Not authenticated users searching for answers
Authenticated users providing answers
Authenticated users asking questions
Authenticated users writing comments
New users who are signing up
Assuming above setup you will need 5 Thread Groups to represent these 5 different groups of virtual users.
Distribution of users in the same thread group is also possible via Throughput Controller or Switch Controller, see Running JMeter Samplers with Defined Percentage Probability guide for more information
we can increase number of thread/users for simulation hence there is no need to add identical threads
How can I distribute user load across test scenarios in JMeter? For instance, if I am testing an email system for 400 concurrent users, I would like to apportion the total peak user load as follows:
100 concurrent users checking emails
100 concurrent users replying to emails
100 concurrent users composing new emails
50 concurrent users sending emails with attachments
25 concurrent users making changes to their settings
25 concurrent users doing folder operations
I tried to create one thread group per scenario. But, when I add a scenario to one of the thread groups, other thread groups vanish. It looks like I can't have multiple thread groups and add one scenario per thread group.
There are different approaches for implementing the scenario:
Using different Thread Groups for different groups of users
Using single Thread Group and distribute the load using one of the following:
Throughput Controller
Switch Controller
See Running JMeter Samplers with Defined Percentage Probability article for more information on each of the tecnhiques.
I would suggest you to go with Throughput Controller - this site has the clear explanation you have been looking for - http://www.testautomationguru.com/jmeter-user-load-distribution-using-throughput-controller/.