JMeter - JSR223 PreProcessor is getting failed in the GitHub for OTP creation - performance

I am trying to execute a .jmx script in the GitHub. The login page requires a OTP, which I am generating using org.jboss.aerogear. However, it seems when I am executing the script in GitHub the script is not generating this OTP and throwing 406 (Not Acceptable). Can anyone please guide me on this issue please.
This is running perfectly in JMeter but getting error in GitHub.
Do I need to add this specific driver and how?

Whenever you face any "error" first of all take a look at jmeter.log file, normally it contains the reason or at least a clue so you can figure out or guess the error cause. If it doesn't - increase JMeter logging verbosity for the test elements you're using.
Most probably you need to add the .jar file which provides this Totp class (along with dependencies, if any) to JMeter Classpath to JMeter installation in "Github" (whatever it means) and the error will go away

Related

jmeter-5.4.1 html report generation failed

while generating html report through jmeter getting following error message.
note[using jmeter version 5.4.1]
Generating report
An error occurred: Data exporter "html" is unable to export data.
The Data exporter "html" is unable to export data message unfortunately doesn't contain either root cause of the issue or at least a clue.
You need to take a look at jmeter.log file, it should contain way more information regarding the failure.
The most common reasons are:
Lack of JVM Heap space
Impossibility to write to the destination folder (lack of permissions, disk full, etc.)
Issues with .jtl results file (i.e. you ran your test on another JMeter instance having different Results File Configuration)
Also be informed that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.5 (or whatever is the latest version available at JMeter Downloads page) on next available opportunity.

How to display assertion error message in dashboard report?

The question was already posted by Chintamani here however it has not been answered.
I'm trying to get the details of my error through the generated dashboard report by JMeter but it's not detailed out in the report. It just indicates that an assertion failed.
Rather than just indicating Assertion Failed in the Type of error. I would want for the report to display the custom response assertion error message that I indicated in the response assertion. I hope someone can help. Thanks!
EDITS:
I have replicated the issue here. It still indicating assertion failed. Not sure what I'm missing here. Also, I am using the updated JMeter version 5.2.1.
This is my result save configuration on my simple data writer.
I cannot reproduce your issue using latest stable JMeter version 5.2.1:
According to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure you should be using the latest version of JMeter so consider upgrading to JMeter 5.2.1 (or whatever is the latest stable JMeter version which is available at JMeter Downloads page) and the issue will go away.
If you're using the latest version already it might be the case you're looking into "old" results, re-run your test providing -f command-line argument so JMeter would overwrite the previous .jtl results file and the dashboard folder with the new results
Check for properties jmeter.save.saveservice.assertion_results_failure_message=false
This should be equal to true or just remove/comment before running again.

Exception: java.lang.ClassCastException: com.blazemeter.jmeter.threads.DynamicThread cannot be cast to org.apache.jmeter.samplers.SampleResult

I am currently using Blazemeter to run load (performance) tests for a Java application, but I am getting this error. When I run it locally on my machine, this error does not occur.
Under 'scenario definition' my test starts off with a standard jmeter thread group. I did a bit of searching and realised that com.blazemeter.jmeter.threads.DynamicThread comes from the CustomThreadGroups plugin, so I have also uploaded the appropriate jar file plugin jmeter-plugins-casutg-2.9.jar file.
Screenshot of scenario definition
Screenshot of error
Would just like to check if there is some other jar file that I need to upload to solve this error, or if there is another method to solve this issue? Thank you.
Normally you should raise this form of questions to BlazeMeter Support as they should have better understanding of their infrastructure.
With regards to your question itself, most probably you're suffering from a form of a Jar Hell as:
BlazeMeter uses Taurus under the hood for kicking off JMeter tests which automatically downloads JMeter Plugins so it might be the case your plugins versions clash with the plugins at their end
You need to remove one of joda-time libraries as you cannot tell for sure which one will be loaded into classpath and in case of API inconsistency you can get unpredictable errors.

SMTP Sampler executes receives IOExeception while sending message

I'm using jmeter 3.2, I want run a SMTP Sampler in Jmeter where I have done the necessary configuration by adding the javamail file in the lib folder of Jmeter and adding necessary credentials in the mail setting, though when executed I am getting an error of IOException.
Am I missing any step?
There was a change in SMTP Sampler in jmeter 3.2 which created several bugs.
You open a bug to jmeter with a sample if it's a different scenario.
If you can downgrade to Jmeter 3.1 if it can work.
EDIT
You can download a fix to the issue in jmeter-3.3
If you are trying to send a file as an attachment you have 2 options:
If you are using relative path (just filename) make sure you put the file into JMeter's "bin" folder. So JMeter could find it. Check out jmeter.log file to know where JMeter is expecting the file to be.
Use full path (like c:\somefolder\someotherfolder\somefile.eml)
In case if you still experience the problem update your question with your email server configuration and jmeter.log file contents. In the meantime check out Load Testing Your Email Server: How to Send and Receive E-mails with JMeter article

Distributed JMeter test fails with java error but test will run from JMeter UI (non-distributed)

My goal is to run a load test using 4 Azure servers as load generators and 1 Azure server to initiate the test and gather results. I had the distributed test running and I was getting good data. But today when I remote start the test 3 of the 4 load generators fail with all the http transactions erroring. The failed transactions log the following error:
Non HTTP response message: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory (Caused by java.lang.ClassNotFoundException: org.apache.commons.logging.impl.Log4jFactory)
I confirmed the presence of commons-logging-1.2.jar in the jmeter\lib folder on each machine.
To try to narrow down the issue I set up one Azure server to both initiate the load and run JMeter-server but this fails too. However, if I start the test from the JMeter UI on that same server the test runs OK. I think this rules out a problem in the script or a problem with the Azure machines talking to each other.
I also simplified my test plan down to where it only runs one simple http transaction and this still fails.
I've gone through all the basics: reinstalled jmeter, updated java to the latest version (1.8.0_111), updated the JAVA_HOME environment variable and backed out the most recent Microsoft Security update on the server. Any advice on how to pick this problem apart would be greatly appreciated.
I'm using JMeter 3.0r1743807 and Java 1.8
The Azure servers are running Windows Server 2008 R2
I did get a resolution to this problem. It turned out to be a conflict between some extraneous code in a jar file and a component of JMeter. It was “spooky” because something influenced the load order of referenced jar files and JMeter components.
I had included a jar file in my JMeter script using the “Add directory or jar to classpath” function in the Test Plan. This jar file has a piece of code I needed for my test along with many other components and one of those components, probably a similar logging function, conflicted with a logging function in JMeter. The problem was spooky; the test ran fine for months but started failing at the maximally inconvenient time. The problem was revealed by creating a very simple JMeter test that would load and run just fine. If I opened the simple test in JMeter then, without closing JMeter, opened my problem test, my problem test would not fail. If I reversed the order, opening the problem test followed by the simple test then the simple test would fail too. Given that the problem followed the order in which things loaded I started looking at the jar files and found my suspect.
When I built the script I left the jar file alone thinking that the functions I need might have dependencies to other pieces within the jar. Now that things are broken I need to find out if that is true and happily it is not. So, to fix the problem I changed the extension on my jar file to zip then edited it in 7-zip. I removed all the code except what I needed. I kept all the folders in the path to my needed code, I did this for two reasons; I did not have to update my code that called the functions and when I tried changing the path the functions did not work.
Next I changed the extension on the file back to jar and changed the reference in JMeter’s “Add directory or jar to classpath” function to point to the revised jar. I haven’t seen the failure since.
Many thanks to the folks who looked at this. I hope the resolution will help someone out.

Resources