Once you have installed Gatling, you should run it to see the Web UI for testing and start using the tool. This article describes how you can do that.
To get the Web UI of the Gatling tool, run:
npm run run
That's it. The tool is now available at http://localhost:3000
.
Info
The tool runs on port 3000 by default. If you want to use a different port, specify it in the PORT environment variable. For example:
PORT=80 npm run run
This makes the tool available at the specified port, so in our example, at http://localhost:80
.
In the testing tool Web UI, you can do the following:
- Create, edit, and delete instances.
- Run one of the available tests on a specific instance.
- View detailed reports on all the available instances and tests.
You can perform all these actions from the main page:
You can create new instances and edit or delete the existing ones.
To create an instance:
- In the navigation bar, click New instance. The Instance page opens.
- Enter the instance name.
- Optional: in the Yves URL field, enter the Yves server URL.
- Optional: in the Glue URL field, enter the GLUE API server URL.
- Click Go.
Now, the new instance should appear in the navigation bar in INSTANCES section.
For the already available instances, you can edit Yves URL and Glue URL. Instance names can not be edited.
To edit an instance:
- In the navigation bar, click New instance. The Instance page opens.
- Click the edit sign next to the instance you want to edit:
- Edit the Yves URL or the Glue URL.
- Click Go.
Now, the instance data is updated.
To delete an instance:
- In the navigation bar, click New instance. The Instance page opens.
- Click the X sign next to the instance you want to delete:
- Click Go.
Your instance is now deleted.
To run a new load test:
- In the navigation bar, click New test. The Run a test page opens:
- Select the instance you want to run the test for. See Managing instances for information on how you can create and manage instances.
- In the Test field, select the test you want to run. See Reference information: Available tests for details on the available tests.
- In the Type field, select one of the test types:
- Ramp: Test type with the growing load (request per second), identifies a Peak Load capacity.
- Steady: Test type with the constant load, confirms reliance of a system under the Peak Load.
- In the Target RPS field, set the test RPS (request per second) value.
- In the Duration field, set the test duration.
- Optional: In the Description, provide the test description.
- Click Go.
That's it - your test should run now. While it runs, you see a page where logs are generated. Once the time you specified in the Duration field from step 6 elapses, the test stops, and you can view the detailed test report.
On the main page, you can check what tests are currently being run as well as view the detailed log for the completed tests.
Info
By default, information on all instances and tests is displayed on the main page. To check details for specific tests or instances, specify them in the Test or Instance columns, respectively:
To check what tests are being run, on the main page, expand the Running section.
To view the reports of the completed tests, on the main page, in the Done section, click Report log for the test you need: A new tab with the detailed Gatling reports is opened.
Let's consider the example of measuring the capacity with the AddToCustomerCart
or AddToGuestCart
test.
During the test, Gatling calls Yves, Yves calls Zed, Zed operates with the database. Data flows through the entire infrastructure.
For the Ramp probe test type, the following is done:
- Ramping Requests per second (RPS) from 0 to 100 over 10 minutes.
- Measuring the RPS right before the outage.
- Measuring the average response time before the outage under maximum load. [56 RPS, 250ms]
For the Steady probe test type, the following is done: