Apache JMeter 01-Downloads and basic usage

Source: Internet
Author: User

1. Download

: Apache Jmeter

Unzip, double-click Jar or BAT to open (need to install Java environment), directory:. \apache-jmeter-4.0\bin\apachejmeter.jar

2. Basic use

After opening the first page:

How do I perform basic interface testing?

1. Create a thread group

2. Add an HTTP request

3. Add "view result tree" and aggregated report (summary)

View results tree to see the results of each request

Aggregated reports can see some of the aggregated results of the impersonation request, with the following parameters

#Samples: Indicates how many requests you have made in this test, and if you simulate 10 users, each user iterates 10 times, then this shows a 100

Average: Average response time--the average response time of a single Request by default, or the average response time in Transaction when a Transaction Controller is used

Median: Median, which is the response time of 50% users

90% line:90% User's response time

Min: Minimum response time

Max: Maximum response time

error%: Number of requests with errors in this test/total number of requests

Throughput: Throughput--By default, the number of requests completed per second (request per Second), when Transaction Controller is used, can also represent LoadRunner-like Transaction per Number of Second

Kb/sec: The amount of data received from the server side per second, equivalent to throughput/sec in LoadRunner

Demo sample

1. Create a project

Create a local spring boot demo, interface path: 127.0.0.1:8080, return data self-fitting, my following

@Slf4j@RestControllerpublicclass UserController {    @RequestMapping("/")    publichome(){        User user =  newUser();        user.setId(1L);        user.setName("飞翔的大白菜(●—●)");        user.setDescription("像一颗海草海草海草,随波飘摇~");        log.info("用户请求了一次(●—●),好开森(* ̄︶ ̄)");        return user;    }}

2.JMeter configuration access to the request

3. Set Thread group parameters: number of threads, period duration (seconds), number of cycles

4. Execute the test plan, view the aggregated report (click to save the results to the file, do not want to save can click Cancel, the test plan will still be executed)

The results of my execution, you can see the test results of the interface according to the indicators in the report.

Apache JMeter 01-Downloads and basic usage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.