Execute multiple .jmx file in parallel - jmeter

How can I execute multiple .jmx file in parallel from terminal?
I tried using command as
./jmeter -n -t /path/file1.jmx /path/file2.jmx but it throws error

The fastest and the easiest way is using Taurus tool as a wrapper for running your existing JMeter scripts. Taurus naturally supports JMeter so you won't have change anything. The relevant Taurus YAML config file will look like:
---
execution:
- scenario:
script: /path/file1.jmx
- scenario:
script: /path/file2.jmx
- scenario:
script: /etc
See Taurus - Working with Multiple JMeter Tests article for more details on combining several tests into one with Taurus

Use Taurus for executing multiple jmx script in parallel.
Here is the process:
Install Taurus Either by installer or do manually.
If you are installing manually and please follow these steps:
Download Python from their download section.
Go to Python>Scripts installed folder and run following commands:
pip install --upgrade pip
pip install lxml
pip install psutil
Now install Taurus by "pip install bzt"
pip install --upgrade bzt
After installation you well get .bzt folder & .bzt-rc in your home directory.
Edit .bzt-rc and uncomment:following
Note: According to your jdk give version e.g: if you have jdk 7 give version: 3.0(Since Jmeter is dependent on jdk version,please careful here).
After doing all steps now you are ready to execute multiple jmx file in following way:
bzt a.jmx b.jmx c.jmx
This way you can execute multiple jmx file at one instance.
If you have further query please reach to me by either by Email or any other social sites.

Related

JMeter NonGUIDriver error in non-GUI mode

When I run JMeter test suite jmeter -n -t test.jmx in non-GUI mode on Ubuntu server, I get an error:
Error in NonGUIDriver com.thoughtworks.xstream.security.ForbiddenClassException: org.apache.jmeter.save.ScriptWrapper
What does this error mean? I installed JMeter on Ubuntu by command sudo apt install jmeter
Most probably you're trying to open test plan created in more recent JMeter version with a very old JMeter from Ubuntu repositories.
Looking at jmeter package details it appears that Ubuntu has JMeter 2.13
JMeter 2.13 was released in 2015
Current stable version is JMeter 5.5
So remove the installation by apt and follow "normal" JMeter installation procedure:
Install Java version not lower than 8, i.e. apt install openjdk-8-jdk
Download JMeter 5.5, i.e. wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.5.tgz
Unpack it, i.e. tar xf apache-jmeter-5.5.tgz
Launch it pushd apache-jmeter-5.5/bin/ && ./jmeter.sh
The error should go away (at least this one)
More information: JMeter Installation: How to Get Started

Ansible pass value to installation commandline gui

How do I pass value to the commandline-gui prompt?
Like I typically install LAMP on a fresh Ubuntu using the following command.
sudo apt-get install lamp-server^ phpmyadmin
And during install I am asked for a few inputs as below
So how do I pass/input values from a playbook?
When using Ansible, you would generally install the packages non-interactively, like this [1]:
- command: apt-get -y install lamp-server^ phpmyadmin
environment:
DEBIAN_FRONTEND: noninteractive
This will suppress any interactive configuration prompts during the
install. You can then perform configuration tasks after the fact using
Ansible, either by directly manipulating files etc. or by using the
debconf module.
If you're not familiar with debconf, this question has some information about interacting with the package configuration system.
[1] Actually, you would more often use the package module, but that doesn't support package groups like lamp-server^.

jmeter missing.class com.thoughtworks.xstream.converters.ConversionException

I was running my script and it hanged and I had to force close.
Now this error appears:
Download "Plugins-manager.jar" from
https://jmeter-plugins.org/downloads/all/
Put downloaded .jar into JMETER_INSTALLED_DIRECTORY/lib/ext directory
Restart jmeter.
Open the script, it will show a download missing component dialog. Download missing component.
Hope this will help
It is indeed an error related to you missing the JMeter plugins. Since i am new to programming, I thought it might be useful i offer a more detailed guide on JMeter installation on Mac.
Prerequisites:
You have Java installed - i work with Java 8 version thus if you have an older or a newer version it might not work.
You can check your version with ~ java -version.
Here you can download the jdk 8: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
You have brew installed. To install it run /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”, go to https://brew.sh/ for more info.
How to do it
Let’s first download the JMeter (version 4.0) from https://jmeter.apache.org/download_jmeter.cgi. You can find the zip files in the first section under Binaries - apache-jmeter-4.0.zip.
Alternatively, run brew install jmeter.
Then move it from Downloads to your root directory: (just for simplicity, you can put it anywhere you wish.
install apache-jmeter
Go inside that folder and it’s bin like this: ~ cd apache-jmeter-4.0/bin
From there run ./jmeter.sh
In JMeter you try to open the desired file but get the 'missing.class..' error:
missing.class com.thoughtworks.xstream.converters.ConversionException
Installing the JMeter plugins
Go to https://jmeter-plugins.org/wiki/PluginsManager/ and download the Plugins Manager JAR file.
Following the instructions: 'put the file into lib/ext directory' translates to you going to your apache-jmeter-4.0 folder (see the first screen shot) and place the file there inside lib/ext folder.  
restart JMeter and you can see the Plugins Manager in JMeter Options.
Download plugins-manager.jar from https://jmeter-plugins.org/downloads/all/
Put plugins-manager.jar into jmeter/lib/ext
Restart jmeter
Open script, it will ask to download dependencies, press yes
Go to Plugin Manager and install all the required jar dependency
Re-start the application
I installed Jmeter on Ubuntu Linux using 'apt-get install jmeter', which it seems installs a very old version of Jmeter.
Old version => 2.x
I downloaded the latest version using curl and installed it and the problem disappeared.
New version => 5.x.
I think this is due to lower version JMeter.
Try with installing Apache Jmeter 3.3 and install python with enable "Add python.exe to Path http://www.python.org/downloads
i know it is late to respond to this query but it may help others who might face this issue in future.
For me, Moving to the latest Jmeter version 5.1.1 did the trick.
I was facing the same issue because i downloaded jmeter from
sudo apt install jmeter
and it installed the jmeter of version 2.X.X. Which i guess doesn't support anything now a days. I uninstalled the jmeter from command:
sudo apt purge jmeter
And installed the latest jmeter from http://jmeter.apache.org/download_jmeter.cgi?Preferred=https%3A%2F%2Fdownloads.apache.org%2F After that in bin folder as i'm using ubuntu Os i used command
sh jmeter.sh
Jmeter worked fine!!!

ansible module actions without install

I'm writing an Ansible playbook to configure new machines for our developing environment.
If I want to install postgresql using homebrew, I would use Ansible's given homebrew model to achieve this task.
But before I run this task, should I have a task that will install homebrew first?
If this is the case, how can I install homebrew using the command or shell Ansible module, which will normally prompt for a user input during the process of installation?
Yes, you have to install Homebrew first. The homebrew Ansible module documentation is not clear about that; if you check its source code it fails if it can’t find Homebrew and it doesn’t try to install it for you.
There already are answers on how to bypass the prompt in Homebrew’s install script. There are also other ways of installing Homebrew like downloading it as a tarball and un-taring it somewhere (which you can do with the unarchive Ansible module) or cloning its source code using git.

Can't run Jenkins Build - bundle: "command not found"

I am currently trying to run a jenkins build for some of my cucumber tasks. All of my gems have been installed by using the Bundler. The gems are stored in the vendor folder.
However, when I try and run bundle install --deployment in the execute shell build step, I get the following error:
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/cukes/workspace
[workspace] $ /bin/sh -xe/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh
+ bundle install --deployment
/var/folders/zz/zyxvpxvq6csfxvn_n0000004000001/T/hudson4461284045505361460.sh: line 2: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
This is driving me crazy! It runs on my local machine with no problems. Why can't Jenkins see my gems?
Any help would be great!
Cheers,
Jon
In my case, I added this line to the first of script:
#!/bin/bash -l
Depending on the way you installed Jenkins, it might be running as a separate user, typically as user jenkins. If you have installed bundle into a nonstandard directory which isn't in the default PATH, like /usr/local/bin, you need to:
Add /usr/local/bin to the PATH of the jenkins user (check ~jenkins/.bashrc) or
Configure PATH environment variable in Jenkins global configuration (or slave configuration if building on a slave) or
Modify the build script to refer to bundle using a full path name.
If bundle is installed in /usr/local/bin/bundle (determine this with which bundle) you could just add a symbolic link to bundle in /usr/bin like so:
ln -s /usr/local/bin/bundle /usr/bin/bundle
First things to verify:
Make sure bundle is installed on the machine where Jenkins runs.
If it installed, make sure it's on the path for the user under which Jenkins runs
(To verify path/environment: insert shell build step that runs env)
For me I had originally installed it via the war file as that's the way recommended on the Getting Started Guide. However, the user handbook makes it much more clear that there are probably better ways to install Jenkins.
I ended up uninstalling the WAR file of Jenkins on macOS by:
Deleting the .war file.
Deleting the ~/.jenkins directory.
I then reinstalled via home-brew, and bundle started working.
You could see where is bundle is installed by running which bundle and run the bundle command from there

Resources