Authored by Rong

commit by shell

@@ -12,25 +12,23 @@ @@ -12,25 +12,23 @@
12 <stringProp name="TestPlan.user_define_classpath"></stringProp> 12 <stringProp name="TestPlan.user_define_classpath"></stringProp>
13 </TestPlan> 13 </TestPlan>
14 <hashTree> 14 <hashTree>
15 - <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_hosts_pt" enabled="true">  
16 - <stringProp name="TestPlan.comments"></stringProp>  
17 - <stringProp name="filename">/opt/jmeter/data/hosts_pt.csv</stringProp>  
18 - <stringProp name="fileEncoding">utf-8</stringProp>  
19 - <stringProp name="variableNames">HOST_API,HOST_SERVICE</stringProp>  
20 - <stringProp name="delimiter">,</stringProp>  
21 - <boolProp name="quotedData">false</boolProp>  
22 - <boolProp name="recycle">true</boolProp>  
23 - <boolProp name="stopThread">false</boolProp>  
24 - <stringProp name="shareMode">shareMode.all</stringProp>  
25 - </CSVDataSet> 15 + <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="arguments_TMP" enabled="true">
  16 + <collectionProp name="Arguments.arguments">
  17 + <elementProp name="HOST_TMP" elementType="Argument">
  18 + <stringProp name="Argument.name">HOST_TMP</stringProp>
  19 + <stringProp name="Argument.value">192.168.104.37:6004</stringProp>
  20 + <stringProp name="Argument.metadata">=</stringProp>
  21 + </elementProp>
  22 + </collectionProp>
  23 + <stringProp name="TestPlan.comments"></stringProp> </Arguments>
26 <hashTree/> 24 <hashTree/>
27 - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_img_check" enabled="true"> 25 + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_&#20020;&#26102;&#27979;&#35797;" enabled="true">
28 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> 26 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
29 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> 27 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true">
30 <boolProp name="LoopController.continue_forever">false</boolProp> 28 <boolProp name="LoopController.continue_forever">false</boolProp>
31 <intProp name="LoopController.loops">-1</intProp> 29 <intProp name="LoopController.loops">-1</intProp>
32 </elementProp> 30 </elementProp>
33 - <stringProp name="ThreadGroup.num_threads">10</stringProp> 31 + <stringProp name="ThreadGroup.num_threads">100</stringProp>
34 <stringProp name="ThreadGroup.ramp_time">10</stringProp> 32 <stringProp name="ThreadGroup.ramp_time">10</stringProp>
35 <longProp name="ThreadGroup.start_time">1488865571000</longProp> 33 <longProp name="ThreadGroup.start_time">1488865571000</longProp>
36 <longProp name="ThreadGroup.end_time">1488865571000</longProp> 34 <longProp name="ThreadGroup.end_time">1488865571000</longProp>
@@ -40,82 +38,111 @@ @@ -40,82 +38,111 @@
40 <stringProp name="TestPlan.comments"></stringProp> 38 <stringProp name="TestPlan.comments"></stringProp>
41 </ThreadGroup> 39 </ThreadGroup>
42 <hashTree> 40 <hashTree>
43 - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_img_check" enabled="true"> 41 +<OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="登录一次" enabled="true"/>
  42 + <hashTree>
  43 + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="pc_first" enabled="true">
  44 + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
  45 + <collectionProp name="Arguments.arguments"/>
  46 + </elementProp>
  47 + <stringProp name="HTTPSampler.domain"></stringProp>
  48 + <stringProp name="HTTPSampler.port"></stringProp>
  49 + <stringProp name="HTTPSampler.protocol"></stringProp>
  50 + <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  51 + <stringProp name="HTTPSampler.path">http://${HOST_TMP}/signin.html</stringProp>
  52 + <stringProp name="HTTPSampler.method">GET</stringProp>
  53 + <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  54 + <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  55 + <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  56 + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  57 + <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  58 + <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  59 + <stringProp name="HTTPSampler.response_timeout"></stringProp>
  60 + </HTTPSamplerProxy>
  61 + <hashTree>
  62 + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true">
  63 + <collectionProp name="Asserion.test_strings"/>
  64 + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  65 + <boolProp name="Assertion.assume_success">false</boolProp>
  66 + <intProp name="Assertion.test_type">16</intProp>
  67 + </ResponseAssertion>
  68 + <hashTree/>
  69 + </hashTree>
  70 + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="pc_login" enabled="true">
44 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> 71 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
45 <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> 72 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
46 <collectionProp name="Arguments.arguments"> 73 <collectionProp name="Arguments.arguments">
47 <elementProp name="" elementType="HTTPArgument"> 74 <elementProp name="" elementType="HTTPArgument">
48 <boolProp name="HTTPArgument.always_encode">false</boolProp> 75 <boolProp name="HTTPArgument.always_encode">false</boolProp>
49 - <stringProp name="Argument.value"></stringProp> 76 + <stringProp name="Argument.value">areaCode=86&amp;account=${mobile_test}&amp;password=abc123&amp;verifyCode=0%2C2%2C0%2C0&amp;isRemember=true&amp;loginType=password&amp;yohobuy=yoho4946abcdef#$%&amp;!@</stringProp>
50 <stringProp name="Argument.metadata">=</stringProp> 77 <stringProp name="Argument.metadata">=</stringProp>
51 </elementProp> 78 </elementProp>
52 </collectionProp> 79 </collectionProp>
53 </elementProp> 80 </elementProp>
54 <stringProp name="HTTPSampler.domain"></stringProp> 81 <stringProp name="HTTPSampler.domain"></stringProp>
55 <stringProp name="HTTPSampler.port"></stringProp> 82 <stringProp name="HTTPSampler.port"></stringProp>
56 - <stringProp name="HTTPSampler.connect_timeout"></stringProp>  
57 - <stringProp name="HTTPSampler.response_timeout"></stringProp>  
58 <stringProp name="HTTPSampler.protocol"></stringProp> 83 <stringProp name="HTTPSampler.protocol"></stringProp>
59 <stringProp name="HTTPSampler.contentEncoding"></stringProp> 84 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
60 - <stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/passport/img-check.jpg?${searchValue}</stringProp>  
61 - <stringProp name="HTTPSampler.method">GET</stringProp> 85 + <stringProp name="HTTPSampler.path">http://${HOST_TMP}/passport/login/auth</stringProp>
  86 + <stringProp name="HTTPSampler.method">POST</stringProp>
62 <boolProp name="HTTPSampler.follow_redirects">true</boolProp> 87 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
63 <boolProp name="HTTPSampler.auto_redirects">false</boolProp> 88 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
64 <boolProp name="HTTPSampler.use_keepalive">true</boolProp> 89 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
65 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> 90 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
66 - <boolProp name="HTTPSampler.monitor">false</boolProp>  
67 <stringProp name="HTTPSampler.embedded_url_re"></stringProp> 91 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
68 - <stringProp name="TestPlan.comments"></stringProp> 92 + <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  93 + <stringProp name="HTTPSampler.response_timeout"></stringProp>
69 </HTTPSamplerProxy> 94 </HTTPSamplerProxy>
70 <hashTree> 95 <hashTree>
71 - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">  
72 - <stringProp name="TestPlan.comments"></stringProp>  
73 - <boolProp name="resetInterpreter">false</boolProp>  
74 - <stringProp name="parameters"></stringProp>  
75 - <stringProp name="filename"></stringProp>  
76 - <stringProp name="script">import java.security.MessageDigest;  
77 -import java.util.Random;  
78 -String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};  
79 -String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};  
80 -int rd = new Random().nextInt(2);  
81 -String clientType = clientTypes[rd];  
82 -String privateKey = privateKeys[rd];  
83 -  
84 -String req = &quot;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_Login&amp;private_key=&quot;+privateKey+&quot;&amp;udid=5c5d6261f0230a1c1d1246857961e7c14bd98592&quot;;  
85 -MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);  
86 -byte[] btInput = req.getBytes();  
87 -md.update(btInput);  
88 -byte[] btResult = md.digest();  
89 -StringBuffer sb = new StringBuffer();  
90 -for(byte b : btResult){  
91 - int bt = b&amp;0xff;  
92 - if(bt&lt;16){  
93 - sb.append(0);  
94 - }  
95 - sb.append(Integer.toHexString(bt));  
96 -}  
97 -String md5 = sb.toString();  
98 -  
99 -  
100 -vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>  
101 - </BeanShellPreProcessor>  
102 - <hashTree/>  
103 - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="&#21709;&#24212;&#26029;&#35328;" enabled="true"> 96 + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true">
104 <collectionProp name="Asserion.test_strings"> 97 <collectionProp name="Asserion.test_strings">
105 - <stringProp name="1450572480">JFIF</stringProp> 98 + <stringProp name="723337899">&quot;code&quot;:200</stringProp>
106 </collectionProp> 99 </collectionProp>
107 - <stringProp name="TestPlan.comments"></stringProp>  
108 <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> 100 <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
109 <boolProp name="Assertion.assume_success">false</boolProp> 101 <boolProp name="Assertion.assume_success">false</boolProp>
110 <intProp name="Assertion.test_type">16</intProp> 102 <intProp name="Assertion.test_type">16</intProp>
111 </ResponseAssertion> 103 </ResponseAssertion>
112 <hashTree/> 104 <hashTree/>
113 </hashTree> 105 </hashTree>
  106 + </hashTree>
  107 + <com.blazemeter.jmeter.controller.ParallelSampler guiclass="com.blazemeter.jmeter.controller.ParallelControllerGui" testclass="com.blazemeter.jmeter.controller.ParallelSampler" testname="bzm - Parallel Controller" enabled="true">
  108 + <boolProp name="PARENT_SAMPLE">false</boolProp>
  109 + </com.blazemeter.jmeter.controller.ParallelSampler>
  110 + <hashTree>
  111 + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_&#20020;&#26102;&#27979;&#35797;" enabled="true">
  112 + <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  113 + <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  114 + <collectionProp name="Arguments.arguments">
  115 + <elementProp name="" elementType="HTTPArgument">
  116 + <boolProp name="HTTPArgument.always_encode">false</boolProp>
  117 + <stringProp name="Argument.value"></stringProp>
  118 + <stringProp name="Argument.metadata">=</stringProp>
  119 + </elementProp>
  120 + </collectionProp>
  121 + </elementProp>
  122 + <stringProp name="HTTPSampler.domain"></stringProp>
  123 + <stringProp name="HTTPSampler.port"></stringProp>
  124 + <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  125 + <stringProp name="HTTPSampler.response_timeout"></stringProp>
  126 + <stringProp name="HTTPSampler.protocol"></stringProp>
  127 + <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  128 + <stringProp name="HTTPSampler.path">http://${HOST_TMP}/product/707652</stringProp>
  129 + <stringProp name="HTTPSampler.method">GET</stringProp>
  130 + <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  131 + <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  132 + <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  133 + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  134 + <boolProp name="HTTPSampler.monitor">false</boolProp>
  135 + <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  136 + <stringProp name="TestPlan.comments"></stringProp>
  137 + </HTTPSamplerProxy>
  138 + <hashTree>
  139 + </hashTree>
  140 + </hashTree>
114 <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true"> 141 <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true">
115 <stringProp name="TestPlan.comments"></stringProp> 142 <stringProp name="TestPlan.comments"></stringProp>
116 <doubleProp> 143 <doubleProp>
117 <name>throughput</name> 144 <name>throughput</name>
118 - <value>6000</value> 145 + <value>60000</value>
119 <savedValue>0.0</savedValue> 146 <savedValue>0.0</savedValue>
120 </doubleProp> 147 </doubleProp>
121 <intProp name="calcMode">2</intProp> 148 <intProp name="calcMode">2</intProp>