Jmeter slave report filter - jmeter

Is there a way we can filter the response times, erros in apex report of jmeter group by slaves?
How can we change the ms to sec in apdex report?

For the existing results it's not possible, going forward you can consider adding __machineName() or __machineIP() functions to sampler labels, this way you will get slave hostname/ip address as sampler/transaction prefix or postfix
There is no simple "switch", you will have to go through the report-template and divide the metrics by 1000 using JavaScript function where required

Related

Is there any time shift between jmeter and influxdb?

Just starting with jmeter and making some experiments I found something that looks kind of odd to me. I connected jmeter with influxdb and measured the avg. time response of one single request in a infinite loop. When I stopped the test I realized that the last time in the results csv created by jmeter is not the same as the one taken by influxdb. Specifically jmeter last measure is 13s higher than the one registered by influxdb. Any ideas on what could be happening?
I've tried to google it but haven't found any documentation or problem related
JMeter sends aggregated metrics, to wit it doesn't send each and every SampleResult but collects the results within some "window", default value is 5 seconds, controllable via backend_influxdb.send_interval JMeter Property
And metrics which are being sent are described here
You can try decreasing the 5 seconds window by amending the aforementioned backend_influxdb.send_interval JMeter property and setting it i.e. to 1000 ms so JMeter would send the data more often but it will create extra overhead so make sure that JMeter has enough headroom to operate and increasing metrics sending rate doesn't affect the overall throughput.

Unable to achieve TPS while using throughput controller along with Unique Each occurance parameterization customization

I've to execute a test where one transaction can have multiple-lines (Eg: orders placed by different users in the real world where every user can have different cart size). In order to achieve this I have a products list and I need unique product at every occurrence. I have used a code similar to this "https://www.perfmatrix.com/jmeter-parameter-setting-unique-each-occurrence/" and I was able to achieve unique each occurrence. But the problem is when I am using a throughput controller and constant throughput timer I am not able to achieve desired TPS whereas hardcoded payload with various lines (with throughput controller and constant throughput timer) leads to desired TPS. Do we have any other options to achieve this?
Beanshell Sampler might be the root cause of the problem, according to JMeter documentation you should be using JSR223 Test Elements and Groovy language for scripting since JMeter 3.1 because using Beanshell is a some form of a performance anti-pattern, check out Apache Groovy: What Is Groovy Used For? article for more details.
Another possible reason could be test data itself, for example request A is "light" and returns data in less than one second due to its request parameters and request "B" is "heavy" and returns data in more than 5 seconds.
Throughput of 100 requests A and 100 requests B will be different so you might need to add more threads.

JMeter throughput value in grafana

I refer to the "http://www.testautomationguru.com/jmeter-real-time-results-influxdb-grafana/" article,
through grafana + infludx but there is a jmeter tps (throughput) value I do not know how get?
I tried "jmeter.all.h.count" but it did not seem to be the value I wanted:
I wrote the blog you were referring to!
We can not expect the backend listener metrics to give you an accurate result as you expect in the aggregate report - (specially percentiles, avg etc)
BackEndListener basically gives the metrics over time. You should plot the graph using the data over time. If you try to use single stat metric of Grafana with that data , then you will see a complete mismatch.
In the blog - I was using the modified apache_core.jar library to get the results as you are actually expecting. However I stopped sharing (after jmeter 2.13, jmeter 3.0) the modified lib.
You are referring to wrong component for values.
For GraphiteBackendListenerClient, sent values are described here:
http://jmeter.apache.org/usermanual/realtime-results.html
For InfluxdbBackendListenerClient, sent values can be found here:
https://github.com/apache/jmeter/blob/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
Both components don't send throughput as it can be computed using Grafana and other metrics.
Found your answer in influxdb grafana tutorial,
Use jmeter.all.a.count:
If I query the “jmeter.all.a.count” which has the no of requests processed for every second by the server, I get below output. [No of requests processed / unit time = Throughput]

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

How can I test the limit of the number of threads with Jmeter

Is it possible to automate the load tests in Jmeter and increase the number of threads until the first error is observed?
For example I start with testing 16 threads for every seconds and increase the number until i receive an error. But instead of doing this manually can I let this run automatically?
Looking into Pre-defined Properties section of JMeter's User Manual on Functions there is a JMeterThread.last_sample_ok variable holding result of the last sampler execution.
So if you build your test plan as follows:
Sampler which does test action
If Controller checking whether previous sampler was successful
If not - relevant actions (stop test, send email, stop ramping up virtual users, etc.)
The value you need to put in "Condition" input of If Controller should look like
"${JMeterThread.last_sample_ok}"=="false"
See How to use JMeter's 'IF' Controller and get Pie for more information on JMeter's If Controller.
Regarding threads in jmeter You may find those 2 links interesting:
What is the highest number of threads that is reasonable to simultaneously run in Jmeter?
JMeter max. thread limit
Regarding your methodology, why not use slow rampup and see the limit using what Dmitri T has provided ?

Resources