How to display jMeter assertion results in the performance report in Jenkins? What constitutes an error in the performance report? - jenkins

I have installed the jMeter plug-in for Jenkins and I can see the performance report based upon the jtl file that my jmx file generates. In my jmx file, I have several Response Assertion listeners. Based upon the jtl file that it generates, the assertion responses are false. However, when I look at the performance report in Jenkins, it is showing 0 in the percentage of errors. My first question would be, what constitutes an error in the performance report? And secondly, how can I see which of the response assertion listeners returns false in the performance report in Jenkins?

What constitute an error in the performance report is determined by the percentage of errors that the samples find
To see what the error is go to
last build->Peformance Report
you should see a listing of all of the samples in your jmeter test plan and the results
Then select the sample name and you should see a the results for the sample taken

Related

Dataflow jobs failing and showing no logs

I created pipelines in Dataflow using the standard template JDBC to BigQuery and there are a few jobs that are unexpectedly failing and not showing any logs.
The thing is, when a job fails because of the resources, the job needed more vCPUs than was avaliable in the region or the memory was not enough for example, these kind of errors are displayed in the logs, as you can see below.
But some jobs just fail with no logs and the resources are sufficient.
Does anyone know how to find the logs in this case?
Change the severity of the logs. If you choose Default, you should see more logs. For how the job page looks like for that failed job, I would say you are probably going to need to have a look at the worker logs as well.
Depending on the error, the Diagnostics tab may have some summarized info of what kind error has made the job fail.

How to impliment assertion on total avg value of each script rather than each thread in JMeter?

Which assertion has to be use to check latency,throughput,received & sent bytes and error rate ?How to impliment assertion in total avg value of each script in JMeter to automate?
JMeter per se doesn't provide this functionality so you can go for one of the following approaches:
AutoStop Listener is capable of automatically stopping the test if one of the following metrics exceeds defined thresholds:
Response Time
Latency
Error Rate
If you are running your test in Jenkins you can use Performance Plugin to mark build as failed or unstable basing on various metrics
And finally you can run your JMeter test via Taurus having very powerful and flexible pass/fail criteria subsystem so if there will be a clash between expected and actual metrics it will basically return non-zero exit code which you can use in shell scripts or Jenkins freestyle jobs and/or pipelines.

Can I use Jenkins performance plugin with 'errors only' results file?

I'm using Jenkins to start a jmeter performance test that sends thousands request over one hour.
To avoid storing lots of report data for each successful request and send it all over the network I only log errors on my View Results Tree element.
I was planning on using that errors only file to decide whether the test passed or failed.
But by using Jenkins Performance Plugin it reports that 100% of the tests failed (of course, because all of the requests on that file were related to errors).
Is there a way of using this plugin (or any other) to achieve my goal?

Dataflow API retries several times after data format exception

I found this as a required improvement for dataflow API or I may be wrong.
I created a batch dataflow and by mistake one of the lines in my input file had invalid data format.
So the pipeline job gave DataFormatException. But instead of stopping the job then itself it retried several times ~4 times before stopping the job.
I see this as a wrong behavior. When a batch dataflow receives an invalid data format, it should stop the job then itself instead of retrying several times and then stopping the job.
Ideas?
It seems like Dataflow is trying to build in some fault tolerance. That's a good thing. And this behaviour is clearly documented here ("How are Java exceptions handled in Dataflow?")
If you don't want this behaviour, just write your own exception handling code, and bail out if you don't want it to be retried.

How to parse JMeter test report in Jenkins?

I am using JMeter do API test, and also integrated with CI tool Jenkins.
Now I want to parse the JMeter test report in Jenkins. But I don't need performance test report.
I need the report to list total number of cases, how many cases passed and how many cases failed.
Anyone have this solution?
JMeter was designed for performance testing, and the world of performance testing still heavily relies on human interpretation of test results. Therefore "case" or "test" is not natively supported by JMeter. However, you group your requests under transaction controller(s) and use "generate parent sample" option. This should make the transaction controller and all requests it groups effectively a "test" and either pass or fail it as a whole.
Now, the other question is how to get number of executed and failed "tests". Currently jmeter-maven-plugin can provide information about number of JMX files processed and number of failed "cases". I doesn't provide information about total number of "cases" which were exected. There is a pull request opened which will improve it - reports will contain number of JMX files processed, total number of tests executed and number of failed tests.
EDIT
The functionality you are looking for is currently provided by Lightning. It will parse JMeter output and report total number of transactions and number of failed transactions.
You could use Performance Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin).
Also you could save execution log file, download it after test execution and open it in some JMeter listener (e.g. Summary report). There you will see all the report data:
export OUTPUT=/jenkins/userContent/Load_tests
jmeter -t testscript.jmx -l $OUTPUT/results.jtl
echo "Download a log file http://<url of your Jenkins>/userContent/Load_tests/results.jtl"

Resources