JMeter Remote testing - 2 slaves - jmeter

I'm executing JMeter loadtest on my system. We have 1 client server with JMeter GUI and 2 slaves servers.
e.g.
client: 192.168.1.1
slave1: 192.168.1.2
slave2: 192.168.1.3
We are testing application where I need to login, do something and logout.
Is it possible to test such application with 2+ slaves? Because I cannot login with the same user more times on server in current session. I get license error: "User is connected from another machine".
I know, that jmeter multiplies Threads with number of slaves, but how to handle this situation?
Thanks

JMeter uses local CSV files in distributed mode. So you just place different files on each slave and it works.
For distributed testing, the CSV file must be stored on the server host system in the correct relative directory to where the JMeter server is started.
According to the Apache JMeter documentation,
By default, the file is only opened once, and each thread will use a different line from the file. However, the order in which lines are passed to threads depends on the order in which they execute, which may vary between iterations.
If you want each thread to have its own set of values, then you will need to create a set of files, one for each thread. For example test1.csv, test2.csv, …, testn.csv. Use the filename test${__threadNum}.csv and set the "Sharing mode" to "Current thread".
So just put your different credentials in different CSV.

Either of below solutions will address your issue. I use Redis. It is super cool.
Redis:
http://www.testautomationguru.com/jmeter-make-data-sharing-easy-in-distributed-mode-using-redis/
HTTP Simple Table Server:
https://jmeter-plugins.org/wiki/HttpSimpleTableServer

Related

how can I add sampler after sampler in jmeter

I am using jmeter to test at my dev server.
The Scenario is like This.
0. Turn OFF all firewalls both local PC(so called, HOST) and client PC(so called, CLIENT)
Turn on Jmeter at my HOST
--> add Thread Group, bzm-Parellel Controller. I am not certain at this point
Connect to CLIENT (once)
-> maybe, by SSH Command or REMOTE Start
execute my test script at CLIENT (several times, more than 100 times)
-> such as, 'ls' 'pwd' 'mkdir dir123' 'ls' IN A ROW!!
-> maybe, by OS Process Sampler. I am not certain at this point
get result of (3) at my HOST jmeter by View Results Tree
This is the scenario that I Thought
Can anyone help me with this issue.
Cuz, there's too many Samplers and less information, I'm suffering such a tough moments.
Thank you for reading.
Turning off firewall is not the best idea, just open the port you will be using, default port for SSH is 22 and normally it's getting opened more or less automatically when you install OpenSSH server
I don't think you need Parallel Controller, it has very specific use cases like simulating AJAX requests, it will be sufficient to specify the desired number of users/loops/test duration on Thread Group level
Remote start is for JMeter distributed testing, if you want to run a shell command on the client use OS Process Sampler or SSH Command sampler, see How to Run External Commands and Programs Locally and Remotely from JMeter article for more details.
The same is for point 2, if you need to create a directory depending on your HOST and CLIENT operating systems you need to choose one of the aforementioned samplers. Just be aware that only first operation/iteration succeeds, all the subsequent attempts you will get cannot create directory ‘dir123’: File exists. I'm also not certain what you're trying to test here? SSH server performance? Operating system performance? Network performance?
If you add View Results Tree listener to your Test Plan and run your test in GUI mode it will automatically catch all the Samplers results

Performance Testing of OBIEE application?

Following parameters should be set for OBIEE Presentation Server only during load testing.
OBIPS\instanceconfig.xml
save and exit file Restart OBIEE processes using OBIEE EM console.
<ServerInstance>
[...]
<Cursors>
<NewCursorWaitSeconds>36000</NewCursorWaitSeconds>
<OldCursorWaitSeconds>36000</OldCursorWaitSeconds>
</Cursors>
[...]
</ServerInstance>
You do know that this represents a value of 10 hours, correct? You are willing to lock resources for that length of time? This is counterintuitive for optimal application performance as you would seek to recover resources as fast as possible to support more sessions versus locking a resource for an extended period of time.
I refer to the following performance "compass rose" as a guiding item (independent of tool)
If you need to amend the file on a remote server you can do this either via OS Process Sampler or via SSH Command Sampler. The first one is a part of JMeter installation, the second one you can install using JMeter Plugins Manager
See How to Run External Commands and Programs Locally and Remotely from JMeter for more information, example configuration and sample commands.

JMeter distributed testing - how to get aggregated report?

I have three slaves (jmeter-servers) running on EC2 instances, and in one case – (1) JMeter GUI on a local laptop, on another – same test plan (2) running from a command line on yet another EC2 instance.
In case of GUI I can see all the aggregated numbers for Throughput, 99%, etc. in – well, GUI. I'm creating a jtl file with Aggregate Report listener.
From watching Datadog charts monitoring the application server parameters (CPU usage, memory, etc.) I see that in case of a command line and everything on EC2 load is more than twice higher than when my local laptop is communicating with the jmeter-servers, meaning probably that the network becomes a bottleneck. So I want to run everything on EC2.
But then – how do I get access to the same aggregated numbers when I'm running from the command line when all four machines are EC2 instances? The huge jtl file contains records for each transaction, not the aggregated one line of the entire run result.
On an attempt to download that jtl from EC2 and open it in GUI on a local laptop it generates some error instead of showing aggregated data.
Am I using a wrong listener to get to the summary data? (Tried Summary Report – it creates even larger jtl file, not the one line I'm looking for.)
Problem in this case is not running scripts via JMeter GUI. Instead it is related to network.
I had a similar distributed setup in EC2-environment and I successfully executed heavy load tests in GUI mode. In my case, all my JMeter (master/slaves) were running on EC2 instances (windows environment). So, I will recommend you to setup your JMeter (Master) on EC2 and run scripts via GUI mode.
If you still want to run in command line mode then you simply need to pass command to create jtl file while the script runs on command line. Later on you can use this JTL to generate any JMeter report as per requirement. For more details check..
Jmeter - Run .jmx file through command line and get the summary report in a excel
jmeter -n -t /path/to/your/test.jmx -l /path/to/results/file.jtl
Please refer to Dmitri answer in following question to reduce JTL size.
How can we control size of JTL file while running test from Non GUI Mode

How to run Jmeter remotely on multiple slaves to stress multiple servers

I have a requirement wherein I need to run different jmeter testplans on different target servers. I went through this PDF here, but it does not meet my requirements. It explains how to stress a "single" webserver from different slaves using single jmeter master. But my requirement is to stress different servers from different slaves using single jmeter master. One way I could find is like below
Open multiple jmeter GUI instances on the jmeter master.
Create different testplans in each jmeter instance (basically these testplans differ only in terms of target server and login information)
Go to Run -> Remote Start -> Choose different slave in each instance
But I don't like this myself. Is there any better way to achieve this..?
Not sure that it`s a best way, some workaround:
Start the jmeter servers with some parameter :
SERVER_PORT=44444 ./jmeter-server -Jparam=1 &
SERVER_PORT=44445 ./jmeter-server -Jparam=2 &
SERVER_PORT=44446 ./jmeter-server -Jparam=3 &
Add this parameter in your testplan (in user defined variables):
And in testplan add a thread group and inside of this thread group a several If controllers with conditions like a ${__javaScript(${param}==1)}. Inside these If controllers put your different testplans:
Theriotically, they will start to work with different "branches". Also you can change the number of users depends of this parameter by using Beanshell and to use different pools for user names/password using CSV controller. ( /home/pools/${param}/pool.csv)

Jmeter testing on multiple websites on the same server

I have a working script to login and get to one website on the webserver, what I need is how to get to the other 10 plus servers with Jmeter all at once to do a nice stress test on the websites and its interfaces.
Any help is greatly appreciated
I think that you need to use DNS Cache Manager available since JMeter 2.12
DNS Cache Manager allows each JMeter thread to resolve underlying IP address of the request endpoint on its own.
See The DNS Cache Manager: The Right Way To Test Load Balanced Apps guide for detailed explanation of background and configuration details.
This is pretty trivial using the CSV Data Set Config.
Let's assume you are using normal HTTP Request samplers and that these are already set up with a server and path. Let's say it is the server you want to change for each thread. Then you need to:
Create a text file with a different server you want to test on each line.
Add a CSV Data Config element to the top level.
Configure the CSV Data Config to use your text file and set the variable name of server.
In your samplers change the server name to ${server}.
You can use the same method to change the path and other details.

Resources