JMeter - Using 8 instance but graph generates for only 1 instance - jmeter

We are using JMeter for performance testing. To generate 1000 user load we are using 8 instance(125 X 8 =1000) of JMeter. All works fine, but at the end of execution, graph generated is of first instance only. I want graph of all 8 instance. What can be done in this matter. Please help.

Option for GUI mode: http://code.google.com/p/jmeter-plugins/wiki/ActiveThreadsOverTime
Option for non-GUI mode: http://code.google.com/p/jmeter-plugins/wiki/ConsoleStatusLogger
Hope this helps...

Create a Simple Data Writer Sampler and save all your results out into one file. After the test has finished, you can import that results file into ANY of the viewers in Jmeter. This would give you a graph for the entire test.
You want to avoid having "real-time" viewers while running a load test (visual graphs, aggregate report, tree view, etc.) as they are very memory intensive.

Related

In Summary report csv,how to add Average, Min and Max when running from console

When I run the test in GUI, i see the Average, Min, Max in GUI. But when I run in console, is there a way to add these to the csv file?
These values are being calculated so you will be able to see the values only when you open .jtl results file after test finishes in the listener of your choice, i.e. Aggregate Report or Summary Report.
If you want to see the interim statistics while your test is being executed you have the following choices:
JMeter Summarizer output. JMeter reports some numbers into stdout while your test is being running
You can get some extended information if you run your JMeter test using Taurus tool as a wrapper
Both console and web interface options are available, in order to see current test execution stats in browser start your test like:
bzt yourtest.jmx -report
And finally you can use Backend Listener to send your results into database, message queue or web service and use custom plotting application to print out either raw or parsed statistics, here you are limited only by your fantasy:
More information:
JMeter: Real Time Results
How to Use Grafana to Monitor JMeter Non-GUI Results
JMeter produces some basic fields/result_field. JMeter doesn't create everything you see in different types of Listeners.
You can give this a try.
Create a plan
Generate atleast 100 samples (As large amount of data is required for some listeners), using a single sampler (request)
Use as many Listeners as you want of different types (say 15 types of listeners)
Run the plan....
Now in the filename field of all the listeners give series of names of files like a1.jtl a2.jtl
and so on....
see the screen shot
enter image description here
Now again run the plan. Go to the files and open them in some good editors like notepad++.
For your surprise you will find the same data in all the files irrespective of the type of listener generating the file.
Crux of the matter is : JMeter gathers only handful of information from the run, the rest information which is shown in different Listeners is COMPUTED by the JMeter.
So you can read the *.jtl file into any of the listener.
In JMeter, the new way since 3.0 to have results is to use the Web report generated at end of test:
http://jmeter.apache.org/usermanual/generating-dashboard.html

Can SmartMeter run a scenario written in JMeter?

I've a simple scenario written in JMeter. Now I want to use SmartMeter instead of JMeter, but I don't know if I have to create a new scenario/test or if can reuse the old one?
I speak about http://www.smartmeter.io/
In an environment of SmartMeter Editor we can run the Test 1:1, then it is virtually identical run as in JMeter 2.12 and it does not use distributed mode. But we can watch the test in the Runner tab and after the test to generate the report (if the listener "et#sm - Controller Summary Report" is included the test).
For a distributed mode we recommend using SmartMeter Thread Group "et#sm - Distributed Lazy Stepping Thread Group", which creates users at the moment of their involvement in a testing process and they are also automatically distributed to generator servers with exact deviation between them and keeping the number of VU from the settings.
You also need to add a component of listener "et#sm - Controller Summary Report" to store the results and display informations in SmartMeter runner.
Further adjustments are voluntary, but I can only recommend them:
To use assert "et#sm - Better Response Assertion" which works much more efficiently and faster ; To retrieve values ​​from the response exploit "et#sm - Boundary Points Extractor" etc.

Plotting JMeter test results dynamically in HTML chart

I want to be able to run a JMeter test for thousands of users and plot the results dynamically using a JQuery based charting library like HighCharts i.e. the response from every virtual user must be plotted in near real time to show a stock ticker like chart which gets updated dynamically. I am OK running the test in Non-GUI mode.
I have tried the following,
- Run the JMeter test in non-GUI mode and write the response to a file. What I notice is that the results get written to the file in a buffered manner which means even if I have a program monitoring the file for new records, I wont get it in real time.
I am looking for suggestions on how this can be achieved
1. Do I need to write a custom JMeter plugin? In this case how will it work?
2. Is there some listener which can give me the desired data
3. Can this be done via post processor?
I have seen real time reporting being done on some cloud based load testing websites which use JMeter, so I'm sure it can be done, but how?
There is some buffering when writing to a file, but it shouldn't be more than a few seconds worth of data.
I'd go with the route of reading the log file into something like statsD using something like logstash.net and from there you can probably find an existing solution that pushes it to a chart.
You can disable buffering by adding this in user.properties file:
jmeter.save.saveservice.autoflush=true
This impacts slightly performances for test that have low or no pauses.
To do what you want you could use this kind of library:
http://www.chartjs.org/

Simulate millions of users with JMeter

I have a system that should be able to handle millions of users requests concurrently. In order to check how the system handles the load, I setup a cluster of JMeter servers (slaves), and one controller (client).
I have a database of all users (~10M), and I need each request sent to be from a different user.
I am wondering how I can implement such a thing in JMeter. Basically, I thought about dividing a range of users (let's say 100,000) per each slave, and then within a given slave, each request should read a new user from the local 100,000 list, and delete it. Thus, I will eventually send a request from every user.
The thing is while this idea sounds logical theoretically, I do not exactly know how to implement it using the JMeter terms. Also, I am not sure how to read from database in the test, although I could theoretically read it in advance into a text file, and have each slave contain the text file with its 100,000 users portion.
I can setup a very large cluster of machines, so scale will not be the issue here. Just how to set it all up.
The best way to provide Jmeter with a list of parameters is to use a CSV file:
http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config
You can configure the CSV dataset config to do make every thread use a different line in the CSV. Each engine will need to have it’s own unique CSV file, because the sharing mode does nto work between engines in distributed testing (you can try to automate this part, this can be interesting to do :) ).
This is how your script should look like:
1. Thread Group
1.1 HTTP sampler (login)
1.1.1 CSV dataset config
1.2 second http sampler
etc...
The login sampler will use the parameters loaded by from the CSV file, so for every ’login’ it will use a different line.
Distributed testing is pretty simple:
http://jmeter.apache.org/usermanual/remote-test.html
Keep in mind that running 100K concurrent users on a single Jmeter load engine will be hard (Jmeter consumes resources on the server, so you will need lots of CPU and memory). So you should also monitor the engines.
Also 1M users will cause a lot of data that the engines will send back to the console, so you might need to start a bunch of distributed tests in parallel, and at the end aggregate the results.
Cheers,
This is can be implemented by doing the following steps:
Taking the user credential dump and saving it to a csv file
split the csv file. copy 1 file to each Jmeter slave, in the same location on all the
machines e.g. "C:\Loadtest\"
from the controller, give the path of your csv file in "CSV Data Set Config".
Run the Test.
By doing the above steps, Jmeter controller will start execution of the test by pointing all the Jmeter Slave nodes to use the CSV file in the same location "C:\Loadtest\".
But the trick here is that all the machine will be using different set of users.
Hope this will help.

Is it possible to use alternative Listeners in JMeter after the tests are done?

I'm familiarising myself with JMeter and I've thought of something that's either pretty cool or a very dumb idea.
Whilst reading about Listeners I noticed the following:
Note that all Listeners save the same data; the only difference is in the way the data is presented on the screen.
And this:
Graph Results MUST NOT BE USED during load test as it consumes a lot of resources (memory and CPU). Use it only for either functional testing or during Test Plan debugging and Validation.
So I was wondering: if all listeners receive the same data; why not save that data in a CSV or even XML file, and feed that to a listener afterwards? It would be very resource friendly to have the Graph Results Listener display a graph after the tests are done, instead of while testing.
Am I missing something, or is this a good possiblity?
Yes you can do that and i think most guys use it that way only. Instead of CSV and XML files use JTL file format to save the results. In normal scenario one uses command line to run the test and save the data in a file(preferably JTL). After the test is done you can use the JTL file to generate reports with JMeter UI or using other tools like this.

Resources