Showing
1 changed file
with
21 additions
and
35 deletions
@@ -156,18 +156,6 @@ | @@ -156,18 +156,6 @@ | ||
156 | <stringProp name="shareMode">shareMode.all</stringProp> | 156 | <stringProp name="shareMode">shareMode.all</stringProp> |
157 | </CSVDataSet> | 157 | </CSVDataSet> |
158 | <hashTree/> | 158 | <hashTree/> |
159 | - <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_edit_5k" enabled="true"> | ||
160 | - <stringProp name="TestPlan.comments"></stringProp> | ||
161 | - <stringProp name="filename">/opt/jmeter/data/uid_cart_edit.csv</stringProp> | ||
162 | - <stringProp name="fileEncoding">utf-8</stringProp> | ||
163 | - <stringProp name="variableNames">uid_edit,address_id_edit,shopping_key_edit,coupon_code_1_edit,coupon_code_2_edit</stringProp> | ||
164 | - <stringProp name="delimiter">,</stringProp> | ||
165 | - <boolProp name="quotedData">false</boolProp> | ||
166 | - <boolProp name="recycle">true</boolProp> | ||
167 | - <boolProp name="stopThread">false</boolProp> | ||
168 | - <stringProp name="shareMode">shareMode.all</stringProp> | ||
169 | - </CSVDataSet> | ||
170 | - <hashTree/> | ||
171 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_submit_5k" enabled="true"> | 159 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_submit_5k" enabled="true"> |
172 | <stringProp name="TestPlan.comments">可购买的商品</stringProp> | 160 | <stringProp name="TestPlan.comments">可购买的商品</stringProp> |
173 | <stringProp name="filename">/opt/jmeter/data/uid_cart_submit.csv</stringProp> | 161 | <stringProp name="filename">/opt/jmeter/data/uid_cart_submit.csv</stringProp> |
@@ -180,18 +168,6 @@ | @@ -180,18 +168,6 @@ | ||
180 | <stringProp name="shareMode">shareMode.all</stringProp> | 168 | <stringProp name="shareMode">shareMode.all</stringProp> |
181 | </CSVDataSet> | 169 | </CSVDataSet> |
182 | <hashTree/> | 170 | <hashTree/> |
183 | - <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_sku_edit_1k" enabled="true"> | ||
184 | - <stringProp name="TestPlan.comments"></stringProp> | ||
185 | - <stringProp name="filename">/opt/jmeter/data/sku_edit.csv</stringProp> | ||
186 | - <stringProp name="fileEncoding">utf-8</stringProp> | ||
187 | - <stringProp name="variableNames">sku_edit</stringProp> | ||
188 | - <stringProp name="delimiter">,</stringProp> | ||
189 | - <boolProp name="quotedData">false</boolProp> | ||
190 | - <boolProp name="recycle">true</boolProp> | ||
191 | - <boolProp name="stopThread">false</boolProp> | ||
192 | - <stringProp name="shareMode">shareMode.all</stringProp> | ||
193 | - </CSVDataSet> | ||
194 | - <hashTree/> | ||
195 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_sku_submit_1k" enabled="true"> | 171 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_sku_submit_1k" enabled="true"> |
196 | <stringProp name="TestPlan.comments"></stringProp> | 172 | <stringProp name="TestPlan.comments"></stringProp> |
197 | <stringProp name="filename">/opt/jmeter/data/sku_submit.csv</stringProp> | 173 | <stringProp name="filename">/opt/jmeter/data/sku_submit.csv</stringProp> |
@@ -228,7 +204,19 @@ | @@ -228,7 +204,19 @@ | ||
228 | <stringProp name="shareMode">shareMode.all</stringProp> | 204 | <stringProp name="shareMode">shareMode.all</stringProp> |
229 | </CSVDataSet> | 205 | </CSVDataSet> |
230 | <hashTree/> | 206 | <hashTree/> |
231 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_selectedAndQryCart_single" enabled="true"> | 207 | + <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_sku_edit_25w" enabled="true"> |
208 | + <stringProp name="TestPlan.comments"></stringProp> | ||
209 | + <stringProp name="filename">/opt/jmeter/data/uid_sku_edit.csv</stringProp> | ||
210 | + <stringProp name="fileEncoding">utf-8</stringProp> | ||
211 | + <stringProp name="variableNames">uid_edit,sku_edit</stringProp> | ||
212 | + <stringProp name="delimiter">,</stringProp> | ||
213 | + <boolProp name="quotedData">false</boolProp> | ||
214 | + <boolProp name="recycle">true</boolProp> | ||
215 | + <boolProp name="stopThread">false</boolProp> | ||
216 | + <stringProp name="shareMode">shareMode.all</stringProp> | ||
217 | + </CSVDataSet> | ||
218 | + <hashTree/> | ||
219 | + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_add_edit" enabled="true"> | ||
232 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | 220 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
233 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | 221 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> |
234 | <boolProp name="LoopController.continue_forever">false</boolProp> | 222 | <boolProp name="LoopController.continue_forever">false</boolProp> |
@@ -241,10 +229,10 @@ | @@ -241,10 +229,10 @@ | ||
241 | <boolProp name="ThreadGroup.scheduler">false</boolProp> | 229 | <boolProp name="ThreadGroup.scheduler">false</boolProp> |
242 | <stringProp name="ThreadGroup.duration"></stringProp> | 230 | <stringProp name="ThreadGroup.duration"></stringProp> |
243 | <stringProp name="ThreadGroup.delay"></stringProp> | 231 | <stringProp name="ThreadGroup.delay"></stringProp> |
244 | - <stringProp name="TestPlan.comments"></stringProp> | 232 | + <stringProp name="TestPlan.comments">添加购物车</stringProp> |
245 | </ThreadGroup> | 233 | </ThreadGroup> |
246 | <hashTree> | 234 | <hashTree> |
247 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_selectedAndQryCart_single" enabled="true"> | 235 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_add_edit" enabled="true"> |
248 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | 236 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
249 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | 237 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
250 | <collectionProp name="Arguments.arguments"> | 238 | <collectionProp name="Arguments.arguments"> |
@@ -269,13 +257,13 @@ | @@ -269,13 +257,13 @@ | ||
269 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | 257 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
270 | <boolProp name="HTTPSampler.monitor">false</boolProp> | 258 | <boolProp name="HTTPSampler.monitor">false</boolProp> |
271 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | 259 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
272 | - <stringProp name="TestPlan.comments"></stringProp> | 260 | + <stringProp name="TestPlan.comments">添加购物车</stringProp> |
273 | </HTTPSamplerProxy> | 261 | </HTTPSamplerProxy> |
274 | <hashTree> | 262 | <hashTree> |
275 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 263 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> |
276 | <stringProp name="TestPlan.comments"></stringProp> | 264 | <stringProp name="TestPlan.comments"></stringProp> |
277 | <boolProp name="resetInterpreter">false</boolProp> | 265 | <boolProp name="resetInterpreter">false</boolProp> |
278 | - <stringProp name="parameters">${__RandomString(1,YN,)} ${sku_selectAndCart} ${uid_selectAndCart}</stringProp> | 266 | + <stringProp name="parameters">${sku_edit} ${uid_edit}</stringProp> |
279 | <stringProp name="filename"></stringProp> | 267 | <stringProp name="filename"></stringProp> |
280 | <stringProp name="script">import java.security.MessageDigest; | 268 | <stringProp name="script">import java.security.MessageDigest; |
281 | import java.util.Random; | 269 | import java.util.Random; |
@@ -284,9 +272,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | @@ -284,9 +272,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | ||
284 | int rd = new Random().nextInt(2); | 272 | int rd = new Random().nextInt(2); |
285 | String clientType = clientTypes[rd]; | 273 | String clientType = clientTypes[rd]; |
286 | String privateKey = privateKeys[rd]; | 274 | String privateKey = privateKeys[rd]; |
287 | -String os_version = "yohobuy:h5"; | ||
288 | -String product_sku_list = "[{\"goods_type\":\"ordinary\",\"selected\":\""+bsh.args[0]+"\",\"product_sku\":"+bsh.args[1]+",\"promotion_id\":\"\",\"buy_number\":\"1\"}]"; | ||
289 | -String req = "app_version=5.9.0&client_type="+clientType+"&is_support_mlp=Y&method=app.Shopping.selectedAndQryCart&os_version="+os_version+"&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=00ed65eb36a474388df2fa2d6e97a8a5&shopping_key=73f21814e488a48fc0204d780cea2302&uid="+bsh.args[2]+"&v=7"; | 275 | +String os_version = "yohobuy:web"; |
276 | +String req = "app_version=5.8.0&buy_number=1&client_type="+clientType+"&edit_product_sku=0&goods_type=0&method=app.Shopping.add&os_version="+os_version+"&private_key="+privateKey+"&product_sku="+bsh.args[0]+"&promotion_id=&screen_size=720x1280&selected=Y&session_key=5103fd2c7217459929865c1da6aa7f5a&shopping_key=0&uid="+bsh.args[1]+"&v=7"; | ||
290 | MessageDigest md = MessageDigest.getInstance("MD5"); | 277 | MessageDigest md = MessageDigest.getInstance("MD5"); |
291 | byte[] btInput = req.getBytes(); | 278 | byte[] btInput = req.getBytes(); |
292 | md.update(btInput); | 279 | md.update(btInput); |
@@ -301,8 +288,7 @@ for(byte b : btResult){ | @@ -301,8 +288,7 @@ for(byte b : btResult){ | ||
301 | } | 288 | } |
302 | String md5 = sb.toString(); | 289 | String md5 = sb.toString(); |
303 | os_version=URLEncoder.encode(os_version); | 290 | os_version=URLEncoder.encode(os_version); |
304 | -product_sku_list=URLEncoder.encode(product_sku_list); | ||
305 | -req = "app_version=5.9.0&client_type="+clientType+"&is_support_mlp=Y&method=app.Shopping.selectedAndQryCart&os_version="+os_version+"&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=00ed65eb36a474388df2fa2d6e97a8a5&shopping_key=73f21814e488a48fc0204d780cea2302&uid="+bsh.args[2]+"&v=7"; | 291 | +req = "app_version=5.8.0&buy_number=1&client_type="+clientType+"&edit_product_sku=0&goods_type=0&method=app.Shopping.add&os_version="+os_version+"&private_key="+privateKey+"&product_sku="+bsh.args[0]+"&promotion_id=&screen_size=720x1280&selected=Y&session_key=5103fd2c7217459929865c1da6aa7f5a&shopping_key=0&uid="+bsh.args[1]+"&v=7"; |
306 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 292 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
307 | </BeanShellPreProcessor> | 293 | </BeanShellPreProcessor> |
308 | <hashTree/> | 294 | <hashTree/> |
@@ -321,7 +307,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -321,7 +307,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
321 | <stringProp name="TestPlan.comments"></stringProp> | 307 | <stringProp name="TestPlan.comments"></stringProp> |
322 | <doubleProp> | 308 | <doubleProp> |
323 | <name>throughput</name> | 309 | <name>throughput</name> |
324 | - <value>120000</value> | 310 | + <value>60000</value> |
325 | <savedValue>0.0</savedValue> | 311 | <savedValue>0.0</savedValue> |
326 | </doubleProp> | 312 | </doubleProp> |
327 | <intProp name="calcMode">2</intProp> | 313 | <intProp name="calcMode">2</intProp> |
-
Please register or login to post a comment