I am running jmeter without UI MODE. Here is my script:
nohup ./jmeter.sh -n -t /home/gdev/jmeter/apache-jmeter-23/project.jmx -l /home/gdev/jmeter/apache-jmeter-2.13/ResultsTest.jtl
Error in NonGUIDriver com.thoughtworks.xstream.io.StreamException: : input contained no data
Look into jmeter.log file and show its content so that we have more details on error.
Related
I have a working command using a windows machine like this:
jmeter -g /Users/magnus/Desktop/apache-jmeter-5.1/bin/report_QA/sfm_qa_Oppdater.csv -o /Users/magnus/Desktop/apache-jmeter-5.1/bin/result_QA_oppdate
given I am standing in the directory where JMeter is installed.
However if I run the same command on my Mac I get: jmeter not found
How do I run the same command on a mac using "terminal"
?
If you call jmeter then MacOS is trying to find this binary or script under system PATH, if it is not there - you will get not found error.
So either you need to put "bin" folder of your JMeter installation under your system PATH like:
PATH=/Users/magnus/Desktop/apache-jmeter-5.1/bin:$PATH && export PATH
then you will be able to run it as jmeter
Or change your command to explicitly invoke the jmeter.sh startup script like:
./jmeter -g /Users/magnus/Desktop/apache-jmeter-5.1/bin/report_QA/sfm_qa_Oppdater.csv -o /Users/magnus/Desktop/apache-jmeter-5.1/bin/result_QA_oppdate
this ./ bit is uber important
More information: How to Get Started With JMeter: Installation & Test Plans
And last but not the least, you can install JMeter via Homebrew, the formulae will download the latest JMeter version and put it into your PATH
To run the script in non-GUI mode, you have to just add sh before the same windows non-GUI command.
Go to your bin directory and run like:
sh jmeter -n -t Test.jmx -l Test1.jtl -g test.csv
Im running my jmeter script using a SH file having below commands,
#! /bin/sh
JMETER_HOME=/jmeter/DummyTest/Jmeter4/apache-jmeter-4.0
#PATH=$PATH:JMETER_HOME/bin
#export PATH
echo $PATH
cd $1
echo current dir is `pwd`
echo "=== START OF run-load-atcom_scripts.sh SCRIPT ==="
$JMETER_HOME/bin/jmeter.sh -n -t /jmeter/DummyTest/TrialScript1.jmx
while running im getting below error
Uncaught Exception java.lang.IllegalStateException: Failed calling setupTest. See log file for details.
In this case im not getting jmeter.log file creating or updating in jmeter bin folder.
Can anyone help me in this.
Got to fix this ,i have given the command -j /path/to/logfile/logfile.log
which works.
Apart from this anyways if anyone comes up with any solution(rather using -j ,automatically in bin folder ) would be helpful for everyone
docker-compose on Windows is not able to be run in interactive mode.
ERROR: Interactive mode is not yet supported on Windows.
Please pass the -d flag when using `docker-compose run`.
When running docker-compose in detached mode, little is displayed to the console, and the only logs displayed under docker-compose logs appear to be:
Attaching to
which obviously isn't very useful.
Is there a way of accessing these logs for transient containers?
I've seen that it's possible to change the docker-daemons logging to use a file (without the ability to select the log location). Following this as a solution I could log to the predefined log location, then execute a copy script to move the files to a mounted volume to be persisted before the container is torn down. This doesn't sound ideal.
The solution I've currently gone with (also not ideal) is to wrap the shell script parameter in a dynamically created proxy script which logs all output to the mounted volume.
tempFile=myproxy.sh
echo '#!/bin/bash' > $tempFile
echo 'do.the.thing.sh 2> /data/log.txt'>>$tempFile
echo 'echo finished >> /data/logs/log.txt' >> $tempFile
Which then I'd call
docker-compose run -d doTheThing $tempFile
instead of
docker-compose run -d doTheThing do.the.thing.sh
docker-compose logs doTheThing
I'm trying to get My jmeter test plan to execute in Jenkins. Both jmeter and Jenkins are installed on my local windows machine. I've set up some properties in Jmeter and verified that I can run them from the cmd line successfully with this command: C:\Users\MikeL\Documents\apache-jmeter\bin>jmeter -n -t testApp.jmx -l log.jtl -Jenv=dev -JloopCount=2 Now in Jenkins I've created a new project, create two new parameters and entered the following in "execute shell" based off of exapmples I was able to find on the web.I haven't configured anything else in Jenkins. sh jmeter.sh -n -p user.properties -t C:/Users/MikeL/Documents/apache-jmeter/bin/testApp.jmx -l log.jtl -Jenv=dev -JloopCount=1 suffice to say this script won't build my jmeter test. I recieve this error: Cannot run program "sh" (in directory "C:\Program Files (x86)\Jenkins\workspace\LOS API Regression Tests"): CreateProcess error=2, The system cannot find the file specified
If anybody has any clues I'd be very grateful!
Add this path C:\Users\MikeL\Documents\apache-jmeter\bin to your Environment Variables PATH.
Then Jenkins Build step should be Windows Batch Command
Then the command should be jmeter -n -t testApp.jmx -l log.jtl -Jenv=dev -JloopCount=1
Update:
If you do not want to set the path, just directly give below command as Windows Batch Command.
C:\Users\MikeL\Documents\apache-jmeter\bin\jmeter.bat -n -t C:\Users\MikeL\Documents\apache-jmeter\bin\testApp.jmx -l log.jtl -Jenv=dev -JloopCount=1
Use either Ant/Maven/Gradle to run jmeter tests in the non-gui mode. They can also be integrated with Jenkins
JMeter-Ant
JMeter-Maven
The problem here is cross environment. you need to be running this with windows batch command instead of execute shell. windows wont recognize sh as executable.
C:\Users\MikeL\Documents\apache-jmeter\bin>jmeter -n -t testApp.jmx -l log.jtl -Jenv=dev -JloopCount=2
Run the above in execute windows batch mode
I am using jmeter in Non GUI mode. I have set up the distributed environment with 15 servers. Now I want to run 2 test at a time. With each tests on different set of servers.
Test1 : server1, server2
Test3 : server3, server4,server5
Below is the command I used:
./jmeter -n -t pathtojmx -R server1,server2
But this shows below error:
An error occurred: Unknown arg: server2
errorlevel=1
I can run the same command after removing server2.
Jmeter version: 2.13
Thanks in advance.
Parameters with commas need to be quoted:
./jmeter -n -t pathtojmx -R "server1,server2"
Otherwise they are considered separate arguments.