Commit 1b443042 by flyxiaozhu

测试

parent f96de406
......@@ -70,18 +70,10 @@ erp2.0 service-api test
![img](doc/param.png)
#### 4.接口压力测试
1.说明
同步定时器 Synchronizing Timer,可以实现理论上的并发, 即集结了一定数量后,同时发送请求。
* 线程组设置
![img](doc/group.png)
* 同步定时器设置
![img](doc/timer.png)
* 其中:线程组 >= 同步定时器设置的线程数,同步定时器计算超时时间方法参考(毫秒): 并发数量 * 1000 / (线程数/在多少时间启动这么多线程)
2.容忍度
1.说明
先请求登录结果,获得cookie,使用 HTTP Cookie管理器保存
2.容忍度
所有请求的平均响应时间(Average):< 10s
错误率(ERROR):<= 10%
......@@ -90,16 +82,26 @@ erp2.0 service-api test
| 接口名称 | 接口地址 |
| --- | --- |
| 创建订单 | /order/create #相关下单参数,区分实物,直充,卡券 |
| 收货地址列表 | /address/list |
| 添加地址 | /address/add |
| banner组件 | /assembly/swiper |
| 商品区组件 | /assembly/goods |
| ![组件列表](##### 组件列表-压力测试) | /assembly/index |
2.测试运行场景安排
创建订单-压力测试
--
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用创建订单接口1次 |
| 1-2 | 500 | 0 | 1 | 模拟500个用户循环调用创建订单接口1次 |
| 1-3 | 300 | 0 | 1 | 模拟300个用户循环调用创建订单接口1次 |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 50 | 0 | 1 | 模拟50个用户循环调用接口1次 |
| 1-3 | 500 | 0 | 1 | 模拟500个用户循环调用接口1次 |
| 1-4 | 300 | 0 | 1 | 模拟300个用户循环调用接口1次 |
3.聚合报告
2.聚合报告
- 测试编号 1-1
![img](doc/createOrder-1.png)
......@@ -109,12 +111,167 @@ erp2.0 service-api test
- 测试编号 1-3
![img](doc/createOrder-3.png)
- 测试编号 1-4
![img](doc/createOrder-4.png)
3.错误分析
错误主要集中在请求超时,订单重复错误
4.聚合报告分析
根据测试结果和容忍度范围分析,时间上 <10s 并发在50左右,错误 <=10% 并发在350左右
收货地址列表-压力测试
--
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 800 | 0 | 1 | 模拟800个用户循环调用接口1次 |
| 1-3 | 700 | 0 | 1 | 模拟700个用户循环调用接口1次 |
2.聚合报告
- 测试编号 1-1
![img](doc/address-1.png)
- 测试编号 1-2
![img](doc/address-2.png)
- 测试编号 1-3
![img](doc/address-3.png)
3.错误分析
错误主要集中在连接超时
4.聚合报告分析
根据测试结果和容忍度范围分析,时间上 <10s 并发在200左右,错误 <=10% 并发在600左右
添加地址-压力测试
==
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 500 | 0 | 1 | 模拟500个用户循环调用接口1次 |
| 1-3 | 650 | 0 | 1 | 模拟650个用户循环调用接口1次 |
2.聚合报告
- 测试编号 1-1
![img](doc/addAddress-1.png)
- 测试编号 1-2
![img](doc/addAddress-2.png)
- 测试编号 1-3
![img](doc/addAddress-3.png)
3.错误分析
错误主要集中在连接超时
4.聚合报告分析
根据测试结果和容忍度范围分析,时间上 <10s 并发在150左右,错误 <=10% 并发在600左右
banner组件-压力测试
==
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 500 | 0 | 1 | 模拟500个用户循环调用接口1次 |
| 1-3 | 650 | 0 | 1 | 模拟650个用户循环调用接口1次 |
2.聚合报告
- 测试编号 1-1
![img](doc/banner-1.png)
- 测试编号 1-2
![img](doc/banner-2.png)
- 测试编号 1-3
![img](doc/banner-3.png)
3.错误分析
错误主要集中在连接超时
4.聚合报告分析
根据测试结果和容忍度范围分析,时间上 <10s 并发在250左右,错误 <=10% 并发在650左右
商品区组件
==
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 500 | 0 | 1 | 模拟500个用户循环调用接口1次 |
| 1-3 | 800 | 0 | 1 | 模拟800个用户循环调用接口1次 |
| 1-4 | 650 | 0 | 1 | 模拟650个用户循环调用接口1次 |
2.聚合报告
- 测试编号 1-1
![img](doc/goods-1.png)
- 测试编号 1-2
![img](doc/goods-2.png)
- 测试编号 1-3
![img](doc/goods-3.png)
- 测试编号 1-4
![img](doc/goods-4.png)
3.错误分析
错误主要集中在连接超时
4.聚合报告分析
根据测试结果和容忍度范围分析,时间上 <10s 并发在500左右,错误 <=10% 并发在700左右
##### 组件列表-压力测试
==
1.并发模拟
| 测试编号 | 线程数 | Reamp-Up时间(秒) | 循环次数 | 描述 |
| --- | --- | --- | --- | --- |
| 1-1 | 200 | 0 | 1 | 模拟200个用户循环调用接口1次 |
| 1-2 | 500 | 0 | 1 | 模拟500个用户循环调用接口1次 |
| 1-3 | 800 | 0 | 1 | 模拟800个用户循环调用接口1次 |
| 1-4 | 650 | 0 | 1 | 模拟650个用户循环调用接口1次 |
2.聚合报告
- 测试编号 1-1
![img](doc/component-1.png)
- 测试编号 1-2
![img](doc/component-2.png)
- 测试编号 1-3
![img](doc/component-3.png)
- 测试编号 1-4
![img](doc/component-4.png)
3.错误分析
错误主要集中在连接超时
4.聚合报告分析
在容忍度范围下,用户登陆的并发量在60左右,订单创建的并发量在500左右
根据测试结果和容忍度范围分析,时间上 <10s 并发在500左右,错误 <=10% 并发在700左右
## 测试时间(积分商城h5)
| 接口名称 | 开始时间 | 结束时间 |
| --- | --- | --- |
| 接口状态测试 | 11-28 17:30 | 11-27 18:10 |
| 接口状态测试 | 11-28 17:30 | 11-28 18:10 |
| 创建订单-压力测试 | 11-29 16:15 | 11-29 16:25 |
| 收货地址列表-压力测试 | 11-29 16:50 | 11-29 16:57 |
| 添加地址-压力测试 | 11-29 17:00 | 11-29 17:20 |
| banner组件-压力测试 | 11-29 17:25 | 11-29 17:30 |
| 商品区组件-压力测试 | 11-29 17:33 | 11-29 17:39 |
| 组件列表-压力测试 | 11-29 17:41 | 11-29 17:48 |
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
......@@ -420,45 +420,47 @@
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">300</stringProp>
<stringProp name="ThreadGroup.ramp_time">30</stringProp>
<stringProp name="ThreadGroup.num_threads">650</stringProp>
<stringProp name="ThreadGroup.ramp_time">0</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<SyncTimer guiclass="TestBeanGUI" testclass="SyncTimer" testname="Synchronizing Timer" enabled="true">
<intProp name="groupSize">300</intProp>
<longProp name="timeoutInMs">30000</longProp>
</SyncTimer>
<hashTree/>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie管理器" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<collectionProp name="CookieManager.cookies">
<elementProp name=" PHPSESSID" elementType="Cookie" testname=" PHPSESSID">
<stringProp name="Cookie.value">h8p5dsn7ffcg6ub2e064faru70</stringProp>
<stringProp name="Cookie.domain">pre-h5.mailejifen.com</stringProp>
<stringProp name="Cookie.path"></stringProp>
<boolProp name="Cookie.secure">false</boolProp>
<longProp name="Cookie.expires">0</longProp>
<boolProp name="Cookie.path_specified">true</boolProp>
<boolProp name="Cookie.domain_specified">true</boolProp>
</elementProp>
</collectionProp>
<boolProp name="CookieManager.clearEachIteration">true</boolProp>
</CookieManager>
<hashTree/>
<OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="仅一次控制器" enabled="true"/>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="登陆-请求" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">pre-h5.mailejifen.com</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">http</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/test/sign</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="登陆-请求" enabled="false">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">pre-h5.mailejifen.com</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">http</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/test/sign</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="收货地址列表-请求" enabled="false">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments"/>
......@@ -704,7 +706,7 @@
</ResponseAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="组件列表-请求" enabled="false">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="组件列表-请求" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
......@@ -805,7 +807,7 @@
</ResponseAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="创建订单-请求" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="创建订单-请求" enabled="false">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="id" elementType="HTTPArgument">
......

20.7 KB | W: | H:

17.8 KB | W: | H:

doc/createOrder-1.png
doc/createOrder-1.png
doc/createOrder-1.png
doc/createOrder-1.png
  • 2-up
  • Swipe
  • Onion skin

20.8 KB | W: | H:

17.5 KB | W: | H:

doc/createOrder-2.png
doc/createOrder-2.png
doc/createOrder-2.png
doc/createOrder-2.png
  • 2-up
  • Swipe
  • Onion skin

20.5 KB | W: | H:

18.5 KB | W: | H:

doc/createOrder-3.png
doc/createOrder-3.png
doc/createOrder-3.png
doc/createOrder-3.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment