Commit 9fa1fb04 by flyxiaozhu

测试

parent 34914db9
......@@ -4,22 +4,73 @@ erp2.0 service-api test
测试说明文档
--
## 测试目的
> 测试 erp 前台 api 接口的性能
## 测试工具
> 使用 Apache JMeter 5.0 进行测试
## 测试环境
> windows10
## 测试方法和工具
## 测试人员
> jiang wei
## 测试接口
### 三星积分商城商品列表
## 测试环境与配置
1. 测试结果文件
> JMeter 中打开:data\商品列表-察看结果树.jmx
![img](doc/goodlist-1.png)
## 测试人员
2. 请求参数变量
| 变量名 | 值 | 描述|
| --- | --- | --- |
| page | 1 | 当前页面 |
| pageSize | 12 | 页面大小 |
| iconId | 1 | |
3. 接口详情
> 协议:https
> 服务器地址:sspoint.mailejifen.com
> 端口:80
> HTTP 请求方式:GET
> 路径:/goods/list?page=${page}&pageSize=${pageSize}&iconId=${iconId}
4. 响应断言
> 模式匹配规则:Substring
> 内容:"code":0
5. 接口状态测试
- 用户组
| 线程数 | Reamp-Up时间(秒) | 循环次数 |
| --- | --- | --- |
| 1 | 1 | 1 |
- 请求结果:正常
![img](doc/goodlist-2.png)
- 聚合报告
![img](doc/goodlist-3.png)
6. 接口压力测试
- 测试运行场景安排
| 线程数 | Reamp-Up时间(秒) | 循环次数 |
| --- | --- | --- |
| 1 | 1 | 1 |
- 聚合报告
![img](doc/goodlist-3.png)
## 测试过程
#### 测试的接口
- 聚合分析
#### 接口运行测试
### 测试的接口
#### 接口压力测试
#### 测试结果分析
## 测试时间
## 测试时间
\ No newline at end of file
| 接口名称 | 开始时间 | 结束时间 |
| --- | --- | --- |
| 商品列表 | 2018-11-27 17: | 2018-11-27 17: |
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="三星积分商城测试" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="商品列表-变量" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="page" elementType="Argument">
<stringProp name="Argument.name">page</stringProp>
<stringProp name="Argument.value">1</stringProp>
<stringProp name="Argument.desc">当前页</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="pageSize" elementType="Argument">
<stringProp name="Argument.name">pageSize</stringProp>
<stringProp name="Argument.value">12</stringProp>
<stringProp name="Argument.desc">页面大小</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="iconId" elementType="Argument">
<stringProp name="Argument.name">iconId</stringProp>
<stringProp name="Argument.value">1</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<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">sspoint.mailejifen.com</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/goods/list?page=${page}&amp;pageSize=${pageSize}&amp;iconId=${iconId}</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/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="商品列表-响应断言" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="67791721">&quot;code&quot;:0</stringProp>
</collectionProp>
<stringProp name="Assertion.custom_message"></stringProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">false</boolProp>
<intProp name="Assertion.test_type">16</intProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="商品列表-察看结果树" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="聚合报告" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>true</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
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