Showing
1 changed file
with
0 additions
and
98 deletions
@@ -156,104 +156,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -156,104 +156,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
156 | </ConstantThroughputTimer> | 156 | </ConstantThroughputTimer> |
157 | <hashTree/> | 157 | <hashTree/> |
158 | </hashTree> | 158 | </hashTree> |
159 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_easyCompute" enabled="true"> | ||
160 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
161 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
162 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
163 | - <intProp name="LoopController.loops">-1</intProp> | ||
164 | - </elementProp> | ||
165 | - <stringProp name="ThreadGroup.num_threads">100</stringProp> | ||
166 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
167 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
168 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
169 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
170 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
171 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
172 | - <stringProp name="TestPlan.comments"></stringProp> | ||
173 | - </ThreadGroup> | ||
174 | - <hashTree> | ||
175 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_easyCompute" enabled="true"> | ||
176 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
177 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
178 | - <collectionProp name="Arguments.arguments"> | ||
179 | - <elementProp name="" elementType="HTTPArgument"> | ||
180 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
181 | - <stringProp name="Argument.value"></stringProp> | ||
182 | - <stringProp name="Argument.metadata">=</stringProp> | ||
183 | - </elementProp> | ||
184 | - </collectionProp> | ||
185 | - </elementProp> | ||
186 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
187 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
188 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
189 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
190 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
191 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
192 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
193 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
194 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
195 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
196 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
197 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
198 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
199 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
200 | - <stringProp name="TestPlan.comments"></stringProp> | ||
201 | - </HTTPSamplerProxy> | ||
202 | - <hashTree> | ||
203 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
204 | - <stringProp name="TestPlan.comments"></stringProp> | ||
205 | - <boolProp name="resetInterpreter">false</boolProp> | ||
206 | - <stringProp name="parameters">${SNCP} ${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp> | ||
207 | - <stringProp name="filename"></stringProp> | ||
208 | - <stringProp name="script">import java.security.MessageDigest; | ||
209 | -import java.util.Random; | ||
210 | -String[] clientTypes = {"android","iphone"}; | ||
211 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb0674e08986c6b115d5e3a4884fa"}; | ||
212 | -int rd = new Random().nextInt(2); | ||
213 | -String clientType = clientTypes[rd]; | ||
214 | -String privateKey = privateKeys[rd]; | ||
215 | -String product_sku_list = "[{\"sku\":"+bsh.args[1]+",\"buy_number\":1,\"type\":\"limitcode\",\"limitproductcode\":\""+bsh.args[2]+"\",\"skn\":"+bsh.args[3]+"}]"; | ||
216 | -String req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0"; | ||
217 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
218 | -byte[] btInput = req.getBytes(); | ||
219 | -md.update(btInput); | ||
220 | -byte[] btResult = md.digest(); | ||
221 | -StringBuffer sb = new StringBuffer(); | ||
222 | -for(byte b : btResult){ | ||
223 | - int bt = b&0xff; | ||
224 | - if(bt<16){ | ||
225 | - sb.append(0); | ||
226 | - } | ||
227 | - sb.append(Integer.toHexString(bt)); | ||
228 | -} | ||
229 | -String md5 = sb.toString(); | ||
230 | -product_sku_list=URLEncoder.encode(product_sku_list); | ||
231 | -req = "_sncp="+bsh.args[0]+"&app_version=6.0.0&cart_type=ordinary&client_type="+clientType+"&delivery_way=2&fromPage=iFP_Payment&method=app.Shopping.easyCompute&os_version=10.3.2&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=375x667&session_key=56839fa66dc3f1e58f8f3d9a7d12774c&udid=4d08039b26ebafdea8f35336319bfdcd634029d3&uid="+bsh.args[4]+"&v=7&yoho_bill_term=0"; | ||
232 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
233 | - </BeanShellPreProcessor> | ||
234 | - <hashTree/> | ||
235 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
236 | - <collectionProp name="Asserion.test_strings"> | ||
237 | - <stringProp name="1450572480">"code":200</stringProp> | ||
238 | - </collectionProp> | ||
239 | - <stringProp name="TestPlan.comments"></stringProp> | ||
240 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
241 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
242 | - <intProp name="Assertion.test_type">16</intProp> | ||
243 | - </ResponseAssertion> | ||
244 | - <hashTree/> | ||
245 | - </hashTree> | ||
246 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
247 | - <stringProp name="TestPlan.comments"></stringProp> | ||
248 | - <doubleProp> | ||
249 | - <name>throughput</name> | ||
250 | - <value>60000</value> | ||
251 | - <savedValue>0.0</savedValue> | ||
252 | - </doubleProp> | ||
253 | - <intProp name="calcMode">2</intProp> | ||
254 | - </ConstantThroughputTimer> | ||
255 | - <hashTree/> | ||
256 | - </hashTree> | ||
257 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> | 159 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> |
258 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> | 160 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> |
259 | <collectionProp name="Arguments.arguments"> | 161 | <collectionProp name="Arguments.arguments"> |
-
Please register or login to post a comment