How to configure JNDI properties file in JMeter? - jmeter

I am trying to run a JMX test to publish JMS messages to ActiveMQ broker from JMeter. If I check the option to use jndi.properties file as below, it does not specifically ask for the path of the file. I want to know how to configure a JNDI properties file in JMeter. Is there a specific place to add the JNDI properties file or how can I provide the path to it?

According to the JMS Publisher documentation
use jndi.properties. Note that the file must be on the classpath - e.g. by updating the user.classpath JMeter property
So if you put the jndi.properties file somewhere to JMeter Classpath JMeter will pick it up.
Another option is setting user.classpath property and include jndi.properties file location there, it can be done in 2 ways:
Add the next line to user.properties file (lives in JMeter's "bin" folder)
user.classpath=/path/to/your/jndi.properties
Pass the property value via -J command-line argument like:
jmeter -Juser.classpath=/path/to/your/jndi.properties -n -t test.jmx -l result.jtl
See Configuring JMeter and Apache JMeter Properties Customization Guide for more information on fine tuning your JMeter instance(s) via setting and overriding properties.

Related

JMeter Summary report shows subsamplers

When I run my test through JMeter Graphic User Interface, Summary report shows my steps, which are Transaction Controllers, just with parent sampler: which is OK for me. But, when I open log file (*.jtl) in Summary report after test run, I see all samplers - parent sampler with subsamplers: How I have to set configuration in such way that, when running test through CLI mode and open log file to see just parent samplers?
Thanks in advance.
It looks JMeter issue, it worth reporting it via JMeter Bugzilla.
In the meantime you can consider the following options:
Add the next line to user.properties file (lives in "bin" folder of your JMeter installation):
jmeter.save.saveservice.subresults=false
this way you will have only "top-level" SampleResults in the .csv file. See Results file configuration related properties to see what else you can amend.
Generate HTML Reporting Dashboard from the .csv file
jmeter -g /path/to/testresults.csv -o /path/to/dashboard
The dashboard will have the summary table without these extra subresults
Use JMeter Plugins Command Line Tool to generate the CSV form of the Summary Report in command-line without having to open JMeter GUI, add Listener, etc
./JMeterPluginsCMD.sh --generate-csv /path/to/summary.csv --input-jtl /path/to/testresults.csv --plugin-type SynthesisReport
in this case summary.csv will be in the format you're looking for.
Both JMeter Plugins Command Line Tool and Synthesis Report can be installed using JMeter Plugins Manager

last block in decryption when running the jar file in jmeter

I am running my jmeter script.Inside one sampler,i have http request in that sampler's JSR223 Postprocess I run the main method from executable jar file(I convert my java code into runnable jar file and imported this jar file in the jmeter Testplan).When running this postprocessor i face the error "last block incomplete in decryption".But when i run this jar file in cmd or when running the java code in eclipse,everything works fine.
I can only think of different code page for "cmd" and "JSR223"
In general relying on the current operating system code page is not recommended, you should explicitly set the encoding while doing encryption/decryption and specify the charset to use (UTF-8 is a good choice)
If you don't have the possibility to amend the code in the "executable .jar" you can set file.encoding property in JMeter's system.properties file or pass it via -D command-line argument
jmeter -Dfile.encoding=UTF-8 ......
If you don't have the possibility to amend JMeter properties as well you can simulate running the "executble .jar" from "cmd" using OS Process Sampler, something like:

default user.properties file to generate Jmeter HTML report from csv file?

I'm able to generate the csv but when I click on Tools|Generate HTML report,
user.properties file :The specified file doesnt exist
Isn't there some default one?
Default user.properties file comes with your JMeter installation and lives in its "bin" folder.
If you lost your own one by accident - you can always get it back from i.e. JMeter Github or download a new JMeter build and extract it from there
The funny thing is that the "default" user.properties file doesn't add any value because all settings are commented out therefore you can feed an arbitrary empty file to JMeter
I think the reason for having this file is that JMeter's Results File Configuration can be customized and for example if you ran a JMeter test with one .jtl file configuration you won't be able to generate the dashboard on the "default" one, the result file configurations must match.
More information:
Configuring JMeter
Apache JMeter Properties Customization Guide
user.properties is required currently, you can open an enhancement for adding a default one.
user.properties file The user.properties file used to run the load test

How to custom my own jmeter plugins path

I want to add the additional plugin to the jmeter ,but putting all the plugin into ${JMETER_HOME}/lib is not easy to manage .
So I want to put those plugins into a custom folder .
I read the document of jmeter then set
search_paths=../myPlugins/jpgc-graphs-basic-2.0/lib
restart the jmeter
but the new plugin still not show in the listener list .
The correct way of the plugin installation should look like:
Put jmeter-plugins-graphs-basic-2.0.jar to lib/ext folder of your JMeter installation
Put jmeter-plugins-cmn-jmeter-0.3.jar to lib folder of your JMeter installation.
If for some reason you don't want or cannot use lib and lib/ext folders and would like to override JMeter plugins search paths your configuration should look like:
search_paths=../myPlugins/jpgc-graphs-basic-2.0/lib/ext
user.classpath=../myPlugins/jpgc-graphs-basic-2.0/lib
References:
JMeter's Classpath
Configuring JMeter
Apache JMeter Properties Customization Guide

Create multiple jmeter.log files

I am using Jmeter for performance testing and running our tests via Jenkins build server.
We have Jmeter installed on our jenkins box and I am using an Ant build file to launch the jmx file and create the jtl report; which is then evaluated via the Performance plugin in Jenkins.
My problem is that we only have one instance of Jmeter and as such it only creates one jmeter.log file in the /bin directory.
As we will have multiple jobs calling the one Jmeter installation I don't want it, potentially, writing to the same log.
Is there a way of specifying multiple jmeter.log files per plan/job or amending the location?
Thanks for your suggestions. Using a Jmeter Ant Task and have managed to place the log file into the workspace of the jenkins job by the following:
jmeterlogfile="${basedir}/jmeter.log"
This sits within the JMeter tags within the build file.
Without changing .properties file, running jmeter from Windows cmd, simply navigate to bin folder and pass the argument -j[yourLogFileName.log], if you want log entries in a different log file.
C:\apache-jmeter-2.11\bin>jmeter.bat -j myLog.log

Resources