How can i check my script is working fine in JMeter? - jmeter

I am new to JMeter. I did my first script in JMeter.
My scenario is: clicking a button, i.e. after login, click that button. Thats it. Upto this i have recorded for my script using JMeter.
When i run for single user, it gives proper output for any different user. But when i run with concurrent users (2 or more users with User Parameters pre-processor), it shows error in clicking that button.
I have used View Results Tree as listener to see the results.
In sometimes, it does not show error. So i can't identify the exact reason, why it fails.
Can you please anyone can guide me regarding this?
I am completely new to this JMeter.
Thanks in Advance,

A 500 internal server error indicates jmeter is making the connection to your server and your server is having difficulty processing the request. You should probably look at your server log files to see if there are any errors or exceptions (apache/jetty/etc log file).
Additionally, when you DO actually have an issue with jmeter and you can't seem to figure out what is going on from your listener output, you can view the jmeter.log file created in the directory when jmeter is run from. This usually gives more detailed information regarding failures in jmeter.

Related

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

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

JMeter won't write response data

I'm running tests with JMeter (master+10 slaves) on elasticasearch. I'm getting error 400 for some requests but they are a bit elusive:
When I run the requests manually with curl or pasting them on kibana's console, I don't get errors.
Every time I run the tests using jmeter, using the same requests and under the same conditions, I get a different number of errors.
So I was thinking of inspecting the response bodies from jmeter. But all the ways I've tried failed:
I've created a View Result Tree element and checked all boxes on the "configure" panel. When I run the script, it logs everything except response data
I've tried a BeanShell post processor to write all responses on a file. But it apparently is being 'ignored' when I run the script
Both these solutions work on my machine, but not on the server (which I don't have total control over). I'm passing jmeter.save.saveservice.response_data=true on the command line to start jmeter.
What else could I try?
This is an optimization that JMeter makes for distributed testing related to the mode:
https://jmeter.apache.org/usermanual/properties_reference.html#remote_batching_config
To avoid JMeter stripping the response data set in user.properties of servers snd controller:
mode=Batch
As by default it is:
mode=StrippedBatch
By default JMeter slaves don't send response data to the master, you can choose a different sample sender if you need more data.
Writing response data into a file using Beanshell should work in any case (however consider using JSR223 Test Elements and Groovy for this), just make sure that:
your Beanshell PostProcessor is placed correctly according to JMeter Scoping Rules
there are no Beanshell-related messages in jmeter.log files
you will need to collect the log files from each slave manually after test run, they will not be generated on the master

How Jmeter handles LDAP Referral mechanism

I am trying to do a LDAP mod operation through Jmeter. Expected behavior - Jmeter would hit server A which in turn would hit server B. Actual modification operation would happen at server B. Server B would complete the operation and give response to server A which in turn would respond to Jmeter.
Now the issue is, Jmeter is always getting the "Referral" response message. However, manually we are able to change the password after hitting server A from different remote server.
Could you someone please suggest how to overcome this?
I am assuming this has been resolved. Just in case you are still wondering, #Rohan , my understanding is that you run jmeter on the command line:
$ jmeter -Jjava.naming.referral=true -n -t testplan.jmx -l log.jtl
JMeter won't have specific behaviour of its own. You will need to tell it to follow referrals by setting java.naming.referral property appropriately in the jndi.properties mechanism defined in the documentation for the JNDI LDAP provider, which you should already have in place for your application if you expect it to behave that way.

View result file in Jmeter

Need a help in jmeter. When we run jmeter from GUI mode, we can see the instant results in UI and that gets auto refreshed in milliseconds or lesser.
But when I run jmeter from command line , in non GUI mode it still creates the result file and I can view it by another jmeter and with the adding an aggregate report listener to it. It opens the results with a pop up alert message but does not refresh it. For getting the updated results , need to browse and open it again .
So is there any way/plugin to open the file to view with auto refreshed as we can view while running in GUI mode.
Thanks
It is not recommended to use listeners during test run, even if it is done via another instance of JMeter. Wait for the test to finish and then perform the analysis.
If for some reason looking into interim stats is absolutely required I would recommend running your JMeter test using Taurus tool as a wrapper, you'll be able to see some statistics and graphs this way:

Fetch response times in JMeter running remotely

Ok so I set up my JMeter to run remotely using one slave computer (possibly more to come), and it's working out for the most part EXCEPT that I can't fetch the response time over time-graphs function using the JMeter plugin. I'm still able to use the "PerfMon Metrics" tool to get the CPU/Memory values from the slave computer, so I don't understand how I'm not able to get the response time results.
Does anyone have any experience using that function?
I would check the master- slave configuration: be sure that
the same Jmeter release is used
same directory tree structure is used
Jmeter-plugins are installed on both systems
...
If you use a standard "Summary report" listener, and save data to a file in the master, then you can reload and analyse the data off line with any listener.
HTH

Resources