性能测试一:jmeter基础入门
JMeter,一个100%的纯Java桌面应用,由Apache组织的开放源代码项目,它是功能和性能测试的工具。具有高可扩展性、支持Web(HTTP/HTTPS)、SOAP、FTP、JAVA等多种协议的特点。
1、本机配置好Java环境变量
2、官网下载压缩包,在任意目录下解压
3、进入到Jmeter的bin目录下,双击jmeter.bat启动
添加线程组并设置参数大小:测试计划_添加_Threads_线程组
添加HTTP请求:线程组下添加_Sampler_HTTP请求
添加响应断言:HTTP请求_添加_断言_响应断言
添加查看结果树:HTTP请求_监听器_查看结果树
4个接口
Get接口: http://localhost:8080/PerfTeach/GetMethod?skuId=123&opt=lee
POST接口1 http://localhost:8080/PerfTeach/PostKV
phonoNum=13739666556&email=test@qq.com
POST接口2 http://localhost:8080/PerfTeach/JsonInterface
{"userId":"12346","skuId":"110","num":"3","addressId":"123","shipType":"3","payType":"2”}
POST接口3 http://localhost:8080/PerfTeach/PostMethod
data={"username":"jack","password":"123","email":"ljt@qq.com","phone":110}
讨论群:249728408