别再写代码测试并发了,太 Low!模拟并发的 4 种方法,还有谁不会??

作者:微信小助手

发布时间:2022-06-10T14:30:52

Postman


Postman是一个款http请求模拟工具



首先演示一下postman最基本的使用

创建一个Springboot项目,测试的代码如下:


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestConrtoller {

    @GetMapping("demo")
    public String testDemo() {
        return "result~";
    }
}



为了便于操作,一般会将


http://127.0.0.1:8080 是经常使用的地址+端口号,可以设置为环境


点击右上角的设置图标



选择global



输入信息