Tip:
Highlight text to annotate it
X
In this video we will talk about distributed load testing
and take a look at how to easily create and perform a distributed load test using SmartMeter.
We will go through a complete test scenario,
set the test environment, run the test and generate the test report.
Let's start by opening SmartMeter Welcome screen.
And open the Editor.
First of all, we have to set the environment,
this will slightly differ for each use case.
Click File and open one of the prepared scripts.
In this case we'll use a script called:
SSH-multiple-generators-one-per-server.jmx
It means that the Controller will run locally on your computer
and we will add two load Generators,
each running on its own dedicated server.
Thanks to this template it will be quite simple
to do the rest of the settings.
Let's take a look at what this script contains.
In User Defined Variables you can set
variables specific to your test
We'll talk more about this later on in this video.
When you look inside the script itself
you can see two prepared Generators and the Controller.
Let's take look at the first Generator.
The preparation of the distributed test include several steps.
Firstly, the SSH connection needs to be established.
The first thing you need to set is the host name of your server,
where the first Generator is located.
The Generator is supposed to be already uploaded to this server.
To do that, just upload a licensed copy of SmartMeter to the server.
We have already done that. Let's take a look.
I just connected to our Linux server containing the Generator.
I can see it is uploaded to this folder.
It is important to know the path to the Generator.
So, let's get back to the settings.
The first line contains the name of the test that will run.
Here you define, on which hosts and ports the Generators will run.
Since we use SSH connection it is localhost.
This field contains the path to the Generator on the server.
Here you have to set your username for SSH session.
Instead of passwords we use SSH keys.
So, you have to set the path to your SSH key.
And the path to the file containing the SSH key password.
These fields need to be filled according to your test environment.
After the SSH connection is created different tunnels open.
There's no need to explain these in more detail at the moment
They are necessary to allow smooth communication
between Generators, Controller, Monitoring Agent and so on.
This is a command which starts the Generator.
This node conatins everything required to start the first Generator.
Settings for the second Generator are very similar.
The only thing you have to change is the host name.
In this example there is only a slight change in its name.
The rest of the fields is the same as in the first Generator.
The rest is exactly the same.
Ports open and the Generator starts.
Generators are ready for the test.
Now, let's take a look at the Controller. Generators are ready for the test.
Now, let's take a look at the Controller.
It contains commands to start an agent to monitor the load,
Data server to handle the test data.
And the test itself.
And that's it.
The distributed test is now ready to start.
Don't forget to save and then you can run the test.
Just click on the Run test in distributed mode button. In the upper right corner.
And the test starts.
The first thing that opens is the Monitor.
It gets through the configuration script
and prepares the environment.
As you can see the connections open
as well as tunnels, first and second generator.
And the test itself starts as well.
This is the Controller where you can watch the test progression.
You can see the growing number of users.
The Runner tab contains live test results.
showing how the test is going so far.
You can customize the graphs
even during a test run.
If you want to see another graph,
just drag and drop it onto any graph in the window
to switch them.
After a little while
it starts showing data.
There are no errors so far.
Let's put back Hits per second graph
Here you can see the number of hits and responses.
We are testing a simple static website,
so the responses are quick.
At the moment, there is almost a thousand users in the test.
We are generating about 500 hits per second.
The server seem ok so far.
Responses are still quick.
The number of hits is still growing
as well as the number of transactions
while more users are being generated.
We can stop the test now
and take a look at generating a test report.
To stop the test click this button. In the left upper corner.
Now, we have to wait a little while until all transactions end.
The report is created.
It opens automatically in a browser window.
It contains all the results.
As you can see, there was no error during the test.
At the top of the report, there's a statistics summary.
We have simulated over 2000 users.
An average throughput was about 5 MB per second.
And about 136,000 of hits were made.
Below, there are all the graphs.
such as hits per second, number of users and so on.
So, that's it for this video
Thanks for watching.