Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Jmeter stress Test (simple http request)-example

Shulou Source: shulou.com Published: 2022-06-03 05:53:43 11月23日 Update

An example of an interface provided by the server component is:

After the assessment, the steps that can be taken for stress testing using jmeter are:

Start jmeter: click jmeter.bat under bin to run jmeter

two。 Create a test plan:

A test technology template is loaded when jmeter is started by default.

3. Save the test plan: change the name to http_demo, click Save, and select the save path

4. Add thread group

Right-click the test plan "http_demo" node in the tree on the left, "add"-- > "thread group", and add a "thread group"

After the addition is successful, the thread group node is added under the "http_demo" node.

5. Add http default request: (used to configure common parameters, not http requests)

Right-click the thread group, select "add"-> "configure components"-> "HTTP request defaults", and click "HTTP request defaults".

After the addition is successful, the HTTP request default value node is added under the thread group node

6. Set the HTTP request default value:

For this project, fill in the following, the department description of the server side

Fill in the default request name, server, default request path, and save the test plan

7. Add http request

Right-click "http_demo" and select "add"-> "Sampler"-> "HTTP request"

After the addition is successful, the default value of HTTP request "XX request" appears under the "HTTP Reading platform" node.

8. Set http request

Fill in the reference server score:

Fill in and save the test plan

9. Add a listener:

Right-click the thread group and select "add"-> "listener"-> "View result tree"

After the addition is successful, a view result tree node has been added under the thread group.

10. Trial operation

Click execute

See the execution of the request and response: the successful execution is as follows. Check the correctness of the response data returned.

11. Add a chart analysis listener

twelve。 Modify parameters such as the number of threads of the thread group for stress testing

13. Perform stress tests, see data

After clicking execute, select the graphic result and observe the data content of the stress test.

14. If you need to use a table to view the results

Select "add"-> "listener"-> "View results in Table"

15. Set the main parameters for "View results in a table":

Configure: click the "Configure" button and select the "Save Response Data" item in the pop-up window to save the response data

Tags: Tests threads nodes selection success stress data listeners results services monitoring parameters tables fruit trees paths configurations components content names graphics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Huawei MariaDB Microsoft