I am currently facing the following issue. I have a set of test cases that were implemented using the Taurus framework. On my local workstation I manage to successfully execute them by execution the following command on the console:
bzt test_script.yml
generating the output:
11:18:16 INFO: Taurus CLI Tool v1.7.2
11:18:16 INFO: Starting with configs: ['test_script.yml']
11:18:16 INFO: Configuring...
11:18:16 INFO: No personal config: /home/userid/.bzt-rc
11:18:16 INFO: Artifacts dir: /home/userid/taurus_results/test_endpoint
11:18:16 INFO: Preparing...
11:18:20 INFO: Starting...
11:18:20 INFO: Waiting for results...
11:18:20 INFO: Waiting for finish...
as well as it start to show the stats:
However, when I execute the same script by the same command on our Atlassian Bamboo CI server the job gets stuck on the line:
11:18:16 INFO: Taurus CLI Tool v1.7.2
and the job never finishes.
I would like to understand:
What is going on?
Why the job does not go forward?
Is it possible to shut off the Taurus stats?
Thanks a lot!
Just in case someone may find it useful I solved the problem by executing the following command:
printf '' | bzt test_script.yml
The output on our CI server is the following:
Related
How can i get jmeter test status in non-gui mode.
Jenkins install jmeter helm chart on kuberntes and start the test as part of the installation, meaning that after the chart installed a script entry point will run automatically inside the container, jenkins is only trigger the chart. i want to know when the test is finished and get back the status to jenkins from the pod to publish the report test result on jenkins.
When JMeter's non-gui test execution is finished it returns a normal exit code which can be obtained:
%errorlevel% environment variable in Windows
$? environment variable in Unix and derivatives
Not knowing the details of how you launch JMeter it is quite hard to come up with exact Jenkins configuration but I'm pretty much sure that you can utilize the aforementioned variables to get the JMeter execution status
if you are triggering jmeter scripts via jenkins , you can have a post build operation after script execution using jenkins.
I am using powershell in jenkins to run jmeter in non gui mode, once test is done doing other post build operations.
I am trying to deploy an Apache-Jmeter (version 5.1.1), a stand-alone application on Pivotal cloud Foundry but unable to
I have the Apache-Jmeter (version 5.1.1) set-up running on my windows machine so I tried to push that directory/folder to PCF as an App but it failed with the below error
C:\Program Files\apache-jmeter-5.1.1>cf push apache-jmeter-5.1.1
Pushing from manifest to org dev-testing/ space Dev as user1...
Using manifest file C:\Program Files\apache-jmeter-5.1.1\manifest.yml
Getting app info...
readat C:\Program Files\apache-jmeter-5.1.1\bin\jmeter.bat: negative offset
FAILED
Here is my manifest.yml file looks like :
---
applications:
- name: jmeter-5-1-pcf
path: bin/jmeter.bat
memory: 512m
instances: 1
I should be able to run my Jmeter scripts (I mean test.jmx) from Pivotal Cloud Foundry, also It could be good if I can see the UI of Apache-Jmeter which was deployed on Pivotal Cloud Foundry
OK, easy answer first.
readat C:\Program Files\apache-jmeter-5.1.1\bin\jmeter.bat: negative offset
FAILED
It's failing because that's a Windows bat file, and you're trying to run it on Linux. You would want to run the .sh start script, and make sure you're pushing the .tgz download from the JMeter Binaries page.
Beyond that, it gets murky and depends on what exactly you want to run?
You could simply run jmeter from the command line, like here. In that case, you don't have a persistent running server though, which poses a problem because Cloud Foundry expects your app to run forever.
You could work around this by using a task instead. You would need to push JMeter as an app, let it stage then stop the app. After that you could cf run-task to execute jmeter -n -t plan.jmx ....
The other option would be to try and run JMeter remote, but that's not going to work well because JMeter uses Java RMI, which is not HTTP based so it would require use of Cloud Foundry TCP routes, or copious use of cf ssh to make tunnels. Neither are great options.
I would suggest using the cf cli. A quick test, the following worked for me.
Download the .tgz binary release from JMeter's web site.
Add the following .cfignore file. It just skips stuff you don't need.
NOTICE
LICENSE
README.md
docs
printable_docs
licenses
extras
Add a file .profile. This will set a couple env variables to make JMeter work.
export JAVA_HOME=.java-buildpack/open_jdk_jre/
export PATH=$PATH:$JAVA_HOME/bin
Put your .jmx files into the JMeter directory.
Then run cf push -b java_buildpack -m 1G -c 'sleep 9999' -u process --no-route jmeter-cli.
The app should start and do nothing, immediately run cf stop jmeter-cli. You just need to do this so that the app stages.
Then run cf run-task jmeter-cli './bin/jmeter -n -t your-test.jmx'.
Run cf logs --recent jmeter-cli and see the results. Or run cf logs jmeter-cli in a second terminal and stream them as the task runs.
Example output:
2019-09-08T22:06:35.72-0400 [CELL/0] OUT Cell e5f61515-c164-4c36-9686-faa2a0a363ed creating container for instance 29a1deb6-04c1-4105-91f8-0a8a5dadf367
2019-09-08T22:06:36.56-0400 [CELL/0] OUT Cell e5f61515-c164-4c36-9686-faa2a0a363ed successfully created container for instance 29a1deb6-04c1-4105-91f8-0a8a5dadf367
2019-09-08T22:06:41.18-0400 [APP/TASK/4e6e54e6/0] ERR Sep 09, 2019 2:06:41 AM java.util.prefs.FileSystemPreferences$1 run
2019-09-08T22:06:41.18-0400 [APP/TASK/4e6e54e6/0] ERR INFO: Created user preferences directory.
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Creating summariser <summary>
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Created the tree successfully using Test Google.jmx
2019-09-08T22:06:41.61-0400 [APP/TASK/4e6e54e6/0] OUT Starting the test # Mon Sep 09 02:06:41 UTC 2019 (1567994801615)
2019-09-08T22:06:41.63-0400 [APP/TASK/4e6e54e6/0] OUT Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT summary = 30 in 00:00:02 = 19.9/s Avg: 99 Min: 60 Max: 450 Err: 0 (0.00%)
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT Tidying up ... # Mon Sep 09 02:06:43 UTC 2019 (1567994803664)
2019-09-08T22:06:43.66-0400 [APP/TASK/4e6e54e6/0] OUT ... end of run
2019-09-08T22:06:44.39-0400 [APP/TASK/4e6e54e6/0] OUT Exit status 0
The only other thing to mention is that you can use the -l option and write the output to a JTL file. If you do that, it will write to the local file system and when your task ends that file will disappear, you won't be able to get it.
If you need to write the results to a JTL file, then you will also need to modify the task command that you run to, upon completion of JMeter, upload the results file to persistent storage like S3.
Hope that helps!
I am having a linux machine (say m1) [an openStack machine] to run my jmeter test.
My typical process was to put latest jmx file on this machine and trigger below command:
nohup /path/to/jmeter/bin/jmeter -n -t /path/to/script/test.jmx -l /path/to/resultsFolder/results.jtl
Now, I want to trigger same test via jenkins job which should actually do the same activity as above.
I perform two activities (one is to manually trigger jmeter-server on m1 and other to run jenkins job to run test via m1)
To start jmeter server
Ran following command manually on m1 ( SERVER_PORT=1099 nohup /path/to/jmeter/bin/jmeter-server)
Jenkins Job
I have created a jenkins pipeline job:
Stage1: checks out jmeter in jenkins master
stage2: checks out latest script in jenkins master
stage3: Runs jmeter remote test -
command used :
sh '''
chmod u+x jmeter/bin/jmeter.sh
jmeter/bin/jmeter.sh -n -t path/where/jenkins/checked/latest/test/test.jmx -R 10.X.X.X -l results.jtl'''
Stage1 and stage2 runs perfectly.
Stage3: console output shows as below
jmeter/bin/jmeter.sh -n -t jmeter/bin/jmeter.sh -n -t path/where/jenkins/checked/latest/test/test.jmx -R 10.X.X.X -l results.jtl
Creating summariser
Created the tree successfully using path/where/jenkins/checked/latest/test/test.jmx
Configuring remote engine: 10.X.X.X
Starting remote engines
Starting the test # Tue Aug 14 10:41:46 CEST 2018 (1534236106818)
Remote engines have been started
Waiting for possible shutdown message on port 4445
And it keep showing processing ......... unless I trigger manual shutdown.
So, I'm looking for two things
a mechanism to start jmeter-server on slave nodes via jenkins job itself
Running test via remote machines (which can go locations within load machine and trigger test from there itslef)
. Any ideas appreciated. Thank you in advance!
You can launch jmeter server on remote slaves in at least 2 ways:
From Jenkins using Jenkins SSH Plugin
From JMeter itself using OS Process Sampler or SSH Command plugin (in this case you will have 2 scripts, one which will set everything up and another will be the main test in distributed mode.
I have two runners: one on Linux works fine, but one on Windows has problems that I try to solve. In order to know the current state of the runner I use two commands: verify and status. When I run verify:
>gitlab-runner.exe verify
outputs:
Verifying runner... is alive ←[0;m runner←[0;m=c6xxxxxx
while status
>gitlab-runner.exe status
outputs:
gitlab-runner: Service is not running.
Question
What is a difference between being alive and running?
PS
This questions is not about why it is not running, it is about understanding the status.
gitlab-runner version
Version: 10.6.0
Git revision: a3543a27
Git branch: 10-6-stable
GO version: go1.9.4
Built: 2018-03-22T08:34:34+00:00
OS/Arch: windows/amd64
gitlab-runner. exe status tells you, if the Service is running. It seems that you've stopped it with gitlab-runner.exe stop.
gitlab-runner.exe verify tells you if your Runner ist still registered to a GitLab Instance. If you or someone else removed it in the GitLab CI/CD settings, your Runner would'nt be alive anymore.
We have encountered the following error:
Startup failed Timed out waiting for a signal from the JVM
running SonarQube as systemd service under Ubuntu 16.04 with OpenJdk 1.8, on every SonarQube 6.x version.
No problem if we run SonarQube, after the server boot, from shell with the following command:
systemctl start sonar.service
Try this implementation:
export SONAR_SCANNER_OPTS="-Xmx512m"