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
输入信息
以后再进行测试就能这样搞简写了
知道基本使用之后,我们来看一下如何模拟并发测试
填写基本信息后,创建
这个时候会创
。
4. 再来看到动作这里,只要选择对应的气缸,点击最上面切换成需要的方向,点击右侧的对勾就可以了。
你学会了吗?关注我,一起学习更多技巧。