Open JMeter jtl files standalone - jmeter

Currently, the only way I know to open a '.jtl' file is by opening in the test plan (i.e: go to the proper Listener, click browse and select the file I want to open).
Is there any way to open '.jtl' (and show it as a graph or table) file standalone? (i.e: without opening a test plan).

You can do it using JMeter plugin JMeterPluginsCMD
Generating PNG:
JMeterPluginsCMD.bat --generate-png test.png --input-jtl results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600

Related

Jmeter - How to set Jmeter to pick up specific Java version (windows)

My windows system has two Java versions: 15 & 17
I want to make Jmeter pick up version 15.
I set path as: C:\Program Files\Java\jdk-15.0.2\bin
And JAVA_HOME as C:\Program Files\Java\jdk-15.0.2
When I do: java -version I have:
But still seems like Jmeter is picking up Java 17 due to an exception when I run code that contains JSR223 Assertion
2022-05-12 13:40:51,300 ERROR o.a.j.a.JSR223Assertion: Problem in JSR223 script: JSR223 Assertion
javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Unsupported class file major version 61
How to 'force' Jmeter to pick up java 15?
It's sufficient to set the Java version you want to use to be ahead of other Javas in PATH environment variable and JMeter will pick it up.
set PATH="C:\Program Files\Java\jdk-15.0.2\bin";%PATH%
In order to check what Java version JMeter is using you can add a Debug Sampler configured like:
and look for java.version property in the View Results Tree listener
or just look for java.version line in the JMeter.log file
Milk and honey for me here were:
1 set path as: set PATH="C:\Program Files\Java\jdk-15.0.2\bin";%PATH%
2 lunch Jmeter from cmd as: java -jar ApacheJMeter.jar
coz launching from 'ApacheJMeter.jar' probably initiated hardcode java version
the alternative is the creation of .bat launcher as:
a) create startJmeter.bat
b) put inside
c:
cd C:\apache-jmeter-5.4.3\bin
java -jar ApacheJMeter.jar

Oracle Universal Installer stops after launch (Oracle Forms and Reports 12.2.1.4)

i try to install Oracle Forms and Reports 12.2.1.4, but everytime I run setup.fmw.12.2.1.4.0_fr_win64.exe file Oracle Universal Installer window shows up for a moment with communicate "Preparing the installer...". After that it dissappears and shows again with another communicate: "Cleaning up...". After this communicate, the installer window turns off and there are no other steps.
Screens below
first communicate
second communicate
Did anybody have this problem also? My JAVA_HOME is set as C:\Java\jdk1.8.0_241 and PATH=%JAVA_HOME%\bin.
Here's also -debug log below
m_szTempDirectory: C:\Windows\Temp
Extract to C:\Windows\Temp\sfxCD9A.tmp
Extracting sfx.ini from D:\setup_fmw_12.2.1.4.0_fr_win64.exe to C:\Windows\Temp\sfxCD9A.tmp
Wiz_SingleEntryUnzip (extractAutorun) return code: 0
Total uncompressed size: 2447428290
m_szTempDirectory: C:\Windows\Temp
Extract to same C:\Windows\Temp\sfxCD9A.tmp
Extracting installer files
Wiz_SingleEntryUnzip() result: 0
Total disks: 1 (1)
Finished extracting Disk1
Using version 1.8.0.211.12 of component Disk1\stage\Components\oracle.jre
Jar list: Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
New command: oracle.jre\.\jdk\jre\bin\java.exe -jar install/modules/ora-launcher.jar
Unzipping Java jars Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar to oracle.jre
Getting size of Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Size of Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar: 201205655
Checking space for Java components in C:\Windows\Temp
Unzipping Java jars: Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Unzipping Disk1\stage\Components\oracle.jre\1.8.0.211.12\DataFiles\filegroup1.jar
Launch command length: 278
Launch command: "C:\Windows\Temp\sfxCD9A.tmp\oracle.jre\jdk\jre\bin\java.exe" "-Djava.io.tmpdir=C:\Windows\Temp" "-Dsfx.installer.launcher.home=D:\" "-Dsfx.extract.path=C:\Windows\Temp\sfxCD9A.tmp" "-Dsfx.exe=D:\setup_fmw_12.2.1.4.0_fr_win64.exe" -jar install/modules/ora-launcher.jar "-debug"
cmdLine: "C:\Windows\Temp\sfxCD9A.tmp\oracle.jre\jdk\jre\bin\java.exe" "-Djava.io.tmpdir=C:\Windows\Temp" "-Dsfx.installer.launcher.home=D:\" "-Dsfx.extract.path=C:\Windows\Temp\sfxCD9A.tmp" "-Dsfx.exe=D:\setup_fmw_12.2.1.4.0_fr_win64.exe" -jar install/modules/ora-launcher.jar "-debug"
Command successfully started; waiting for completion
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
dwExitCode: 1
myspawn() result: 1
Press any key to exit
To be clear, you need to start the installer using an elevated shell. This is not the same as being a member of the Windows "Administrator" group. Right-click on the exe and click on "Run as administrator".
Instead of running setup.exe, try execute \install\oui.exe -debug

JMETER 5.1.1 : Merge identical samplers from the same session (as with JMETER 3.2)

I have just upgrated from JMETER 3.2 to JMETER 5.1.1.
I have a problem in generating the JTL file.
To run a test, I use the following command:
& .\jmeter.bat -n -t "C:\test\jmx_test.jmx" -l "C:\test\jmx_test.jtl" -j "C:\test\jmx_test.txt"
Before, with version 3.2 the result of the JTL was :
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
1568895933205,686,000_Login - /test-app,200,OK,Declaration_1... 1-1,text,true,,3170,314,1,1,685,0,650
1568895935077,312,001_Login - /test-app/login/login.jsf,200,OK,Declaration_2... 1-1,text,true,,11873,1025,1,1,212,0,0
....
Now with version 5.1.1, the result is :
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1568897692191,669,000_Login - /test-app,200,OK,Declaration_1... 1-1,text,true,,3168,314,1,1,https://xxxxx.jsf,668,0,637
1568897693648,260,001_Login - /test-app/login/login.jsf,200,OK,Declaration_2... 1-1,text,true,,11871,1041,1,1,https://xxxxx;jsessionid=xxxx,199,0,0
1568897693648,199,001_Login - /test-app/login/login.jsf-0,302,Moved Temporarily,Declaration_2... 1-1,text,true,,407,655,1,1,https://xxxxx;jsessionid=xxxx,199,0,0
1568897693852,56,001_Login - /test-app/login/login.jsf-1,200,OK,Declaration_2... 1-1,text,true,,11464,386,1,1,https://xxxxx;jsessionid=xxxx,55,0,0
....
As next I create reports with this command :
& ./CMDRunner.jar --tool Reporter --input-jtl "C:\test\jmx_test.jtl" --plugin-type AggregateReport --generate-csv jmx_test.csv
I have problems because the samplers are duplicated.
With version 5.1.1, is it possible to merge, as before, the 3 labels of the same sampler (001_Login - /test-app/login/login.jsf / 001_Login - /test-app/login/login.jsf-0 / 001_Login - /test-app/login/login.jsf-1) ?
In advance, thanks!
It seems there is a redirection happening and in your HTTP sampler and "follow redirection" option is checked. Uncheck it and check "redirect automatically" and run it again.
If I change this result, it may change the result from what I have read (http://www.testingdiaries.com/difference-between-redirect-automatically-and-follow-redirects/).
I think I've found the solution.
I have changed the value of the "subresults.disable_renaming" property in the "jmeter.properties" file :
# Since version 5.0 JMeter has a new SubResult Naming Policy which numbers subresults by default
# This property if set to true discards renaming policy. This can be required if you're using JMeter for functional testing.
# Defaults to: false
subresults.disable_renaming=true
What do you think about that?

Show aggregate report info in console when running jmeter tests with mvn

I have a mvn project in which is also integrated jmeter, to test performance. So far I have 6 thread groups in my test plan, all of them contains HTTP Requests. I run the tests using the command "mvn clean verify" from jmeter-maven plugin. Among the results I found multiple rows like this:
summary + 1 in 00:00:02 = 0.6/s Avg: 208 Min: 208 Max: 208 Err: 0 (0.00%) Active: 6 Started: 12 Finished: 6
I would need some extra information in console, especially the name and the avg time of each thread group or of the HTTP Request that ran. For example, something similar with aggregate report from GUI mode :
Label Samples Average Median 90% Line 95% Line 99% Line Min Max ...
AppleCodeRequest 6 196 119 279 284 284 108 284
PearCodeRequest 3 382 485 490 490 490 173 490
I want this because I am using a sh script to run the tests and I would like to trigger some performance issues before opening the html reports.
Is there any way to obtain this? Maby some user properties (even if I searched for one and no result) or some workaround ?
The easiest solution is going for a plugin like BlazeMeter Uploader, this way you will be able to observe real time test metrics in a fancy web UI. You can install BlazeMeter Uploader plugin using JMeter Plugins Manager
Alternative solution would be using JMeterPluginsCMD Command Line Tool.
Add the next lines to your pom.xml file
<configuration>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-cmd:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-synthesis:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-dummy:0.2</artifact>
<artifact>kg.apc:cmdrunner:2.0</artifact>
<artifact>kg.apc:jmeter-plugins-filterresults:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-cmn-jmeter:0.6</artifact>
</jmeterExtensions>
<!-- The plugin uses some broken dependencies
An alternative is to set this to true and use excludedArtifacts, see below
-->
<downloadExtensionDependencies>false</downloadExtensionDependencies>
<propertiesJMeter>
<jmeter.save.saveservice.autoflush>true</jmeter.save.saveservice.autoflush>
</propertiesJMeter>
</configuration>
Add another Thread Group to your Test Plan with 1 user and infinite number of loops
Add JSR223 Sampler to your Thread Group
Put the following code into "Script" area:
SampleResult.setIgnore()
def resultFile = new File('../results').list().first()
"java -jar ../lib/ext/cmdrunner-2.0.jar --tool Reporter --generate-csv temp.csv --input-jtl ../results/$resultFile --plugin-type AggregateReport".execute().waitFor()
println("cat temp.csv".execute().text)
new File("temp.csv").delete()
Control how frequently you want to see this info using i.e. Constant Timer
You should be able to see the results in the console window:

run Test Suite in MTM

I have many test case in Microsoft test manager that works right. I must run them single.I want run a test suite that contains many Test case. but When I select a test suite the run Option is disable.
How I can run a test suite or a test plan.
Sincerely you M.bagheri
If you create a test suite with test cases inside, then you can go under the tab "Test" in MTM right click on the test suite and you can "Run" or "Run with Options". If that is not available something is wrong.
Its probably because you have not selected any test in right side panel of MTM. Select all/intended test cases from the tests available in your test suite and then click on run option, you will see the option enabled:
Since you mentioned that you want to run test in your test suite, i assume that you have targeted tests available in your test suite:
Alternate Approch:
You can use tcm.exe command line utility to run test cases: (Open visual studio command prompt and run following sample command from your
tcm run /create /title:"" /planid: /suiteid: /configid: /settingsname:"" /testenvironment:"" /collection:http://:8080/tfs /teamproject: /include
You can go through following link for more info on using tcm utility:
http://msdn.microsoft.com/en-us/library/dd465192.aspx
Following commands might come in handy for finding values for options in above mentioned tcm command:
*tcm plans /list /collection:http://[your_tfs_server_name]:8080/tfs /teamproject:[your_tfsproject_name]*
*tcm configs /list /collection:http://[your_tfs_server_name]:8080/tfs /teamproject:[your_tfsproject_name]*
*tcm suites /list /planid:[your_testplan_id_can_be_picked_from_first_command] /collection:http://[your_tfs_server_name]:8080/tfs /teamproject:[your_tfsproject_name]*
tcm help

Resources