Showing
1 changed file
with
28 additions
and
93 deletions
@@ -36,6 +36,18 @@ | @@ -36,6 +36,18 @@ | ||
36 | </collectionProp> | 36 | </collectionProp> |
37 | <stringProp name="TestPlan.comments">通用session校验码</stringProp> </Arguments> | 37 | <stringProp name="TestPlan.comments">通用session校验码</stringProp> </Arguments> |
38 | <hashTree/> | 38 | <hashTree/> |
39 | + <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_mobile_openid_10w" enabled="true"> | ||
40 | + <stringProp name="TestPlan.comments"></stringProp> | ||
41 | + <stringProp name="filename">/opt/jmeter/data/uid_mobile_openid.csv</stringProp> | ||
42 | + <stringProp name="fileEncoding">utf-8</stringProp> | ||
43 | + <stringProp name="variableNames">uid,mobile,open_id</stringProp> | ||
44 | + <stringProp name="delimiter">,</stringProp> | ||
45 | + <boolProp name="quotedData">false</boolProp> | ||
46 | + <boolProp name="recycle">true</boolProp> | ||
47 | + <boolProp name="stopThread">false</boolProp> | ||
48 | + <stringProp name="shareMode">shareMode.all</stringProp> | ||
49 | + </CSVDataSet> | ||
50 | + <hashTree/> | ||
39 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_hosts_pt" enabled="true"> | 51 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_hosts_pt" enabled="true"> |
40 | <stringProp name="TestPlan.comments"></stringProp> | 52 | <stringProp name="TestPlan.comments"></stringProp> |
41 | <stringProp name="filename">/opt/jmeter/data/hosts_pt.csv</stringProp> | 53 | <stringProp name="filename">/opt/jmeter/data/hosts_pt.csv</stringProp> |
@@ -48,11 +60,11 @@ | @@ -48,11 +60,11 @@ | ||
48 | <stringProp name="shareMode">shareMode.all</stringProp> | 60 | <stringProp name="shareMode">shareMode.all</stringProp> |
49 | </CSVDataSet> | 61 | </CSVDataSet> |
50 | <hashTree/> | 62 | <hashTree/> |
51 | - <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_sku_submit_25w" enabled="true"> | 63 | + <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_商品for浏览" enabled="true"> |
52 | <stringProp name="TestPlan.comments"></stringProp> | 64 | <stringProp name="TestPlan.comments"></stringProp> |
53 | - <stringProp name="filename">/opt/jmeter/data/uid_sku_submit.csv</stringProp> | 65 | + <stringProp name="filename">/opt/jmeter/data/product_2w.csv</stringProp> |
54 | <stringProp name="fileEncoding">utf-8</stringProp> | 66 | <stringProp name="fileEncoding">utf-8</stringProp> |
55 | - <stringProp name="variableNames">uid_submit,address_id_submit,coupon_code_submit,sku_submit</stringProp> | 67 | + <stringProp name="variableNames">product_id,product_skn</stringProp> |
56 | <stringProp name="delimiter">,</stringProp> | 68 | <stringProp name="delimiter">,</stringProp> |
57 | <boolProp name="quotedData">false</boolProp> | 69 | <boolProp name="quotedData">false</boolProp> |
58 | <boolProp name="recycle">true</boolProp> | 70 | <boolProp name="recycle">true</boolProp> |
@@ -60,7 +72,7 @@ | @@ -60,7 +72,7 @@ | ||
60 | <stringProp name="shareMode">shareMode.all</stringProp> | 72 | <stringProp name="shareMode">shareMode.all</stringProp> |
61 | </CSVDataSet> | 73 | </CSVDataSet> |
62 | <hashTree/> | 74 | <hashTree/> |
63 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_submit" enabled="true"> | 75 | + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_product_data" enabled="true"> |
64 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | 76 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
65 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | 77 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> |
66 | <boolProp name="LoopController.continue_forever">false</boolProp> | 78 | <boolProp name="LoopController.continue_forever">false</boolProp> |
@@ -73,86 +85,10 @@ | @@ -73,86 +85,10 @@ | ||
73 | <boolProp name="ThreadGroup.scheduler">false</boolProp> | 85 | <boolProp name="ThreadGroup.scheduler">false</boolProp> |
74 | <stringProp name="ThreadGroup.duration"></stringProp> | 86 | <stringProp name="ThreadGroup.duration"></stringProp> |
75 | <stringProp name="ThreadGroup.delay"></stringProp> | 87 | <stringProp name="ThreadGroup.delay"></stringProp> |
76 | - <stringProp name="TestPlan.comments"></stringProp> | 88 | + <stringProp name="TestPlan.comments">商品详情基本信息</stringProp> |
77 | </ThreadGroup> | 89 | </ThreadGroup> |
78 | <hashTree> | 90 | <hashTree> |
79 | -<TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="tc_submit" enabled="true"> | ||
80 | - <boolProp name="TransactionController.includeTimers">false</boolProp> | ||
81 | - <boolProp name="TransactionController.parent">false</boolProp> | ||
82 | - </TransactionController> | ||
83 | - <hashTree> | ||
84 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_add_submit" enabled="true"> | ||
85 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
86 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
87 | - <collectionProp name="Arguments.arguments"> | ||
88 | - <elementProp name="" elementType="HTTPArgument"> | ||
89 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
90 | - <stringProp name="Argument.value"></stringProp> | ||
91 | - <stringProp name="Argument.metadata">=</stringProp> | ||
92 | - </elementProp> | ||
93 | - </collectionProp> | ||
94 | - </elementProp> | ||
95 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
96 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
97 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
98 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
99 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
100 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
101 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
102 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
103 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
104 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
105 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
106 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
107 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
108 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
109 | - <stringProp name="TestPlan.comments"></stringProp> | ||
110 | - </HTTPSamplerProxy> | ||
111 | - <hashTree> | ||
112 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
113 | - <stringProp name="TestPlan.comments"></stringProp> | ||
114 | - <boolProp name="resetInterpreter">false</boolProp> | ||
115 | - <stringProp name="parameters">${sku_submit} ${uid_submit}</stringProp> | ||
116 | - <stringProp name="filename"></stringProp> | ||
117 | - <stringProp name="script">import java.security.MessageDigest; | ||
118 | -import java.util.Random; | ||
119 | -String[] clientTypes = {"android","iphone"}; | ||
120 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb0674e08986c6b115d5e3a4884fa"}; | ||
121 | -int rd = new Random().nextInt(2); | ||
122 | -String clientType = clientTypes[rd]; | ||
123 | -String privateKey = privateKeys[rd]; | ||
124 | -String os_version = "yohobuy:web"; | ||
125 | -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"; | ||
126 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
127 | -byte[] btInput = req.getBytes(); | ||
128 | -md.update(btInput); | ||
129 | -byte[] btResult = md.digest(); | ||
130 | -StringBuffer sb = new StringBuffer(); | ||
131 | -for(byte b : btResult){ | ||
132 | - int bt = b&0xff; | ||
133 | - if(bt<16){ | ||
134 | - sb.append(0); | ||
135 | - } | ||
136 | - sb.append(Integer.toHexString(bt)); | ||
137 | -} | ||
138 | -String md5 = sb.toString(); | ||
139 | -os_version=URLEncoder.encode(os_version); | ||
140 | -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"; | ||
141 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
142 | - </BeanShellPreProcessor> | ||
143 | - <hashTree/> | ||
144 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
145 | - <collectionProp name="Asserion.test_strings"> | ||
146 | - <stringProp name="1450572480">"code":200</stringProp> | ||
147 | - </collectionProp> | ||
148 | - <stringProp name="TestPlan.comments"></stringProp> | ||
149 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
150 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
151 | - <intProp name="Assertion.test_type">16</intProp> | ||
152 | - </ResponseAssertion> | ||
153 | - <hashTree/> | ||
154 | - </hashTree> | ||
155 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_submit" enabled="true"> | 91 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_product_data" enabled="true"> |
156 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | 92 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
157 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | 93 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
158 | <collectionProp name="Arguments.arguments"> | 94 | <collectionProp name="Arguments.arguments"> |
@@ -177,23 +113,23 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -177,23 +113,23 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
177 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | 113 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
178 | <boolProp name="HTTPSampler.monitor">false</boolProp> | 114 | <boolProp name="HTTPSampler.monitor">false</boolProp> |
179 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | 115 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
180 | - <stringProp name="TestPlan.comments">提交订单</stringProp> | 116 | + <stringProp name="TestPlan.comments">商品详情基本信息</stringProp> |
181 | </HTTPSamplerProxy> | 117 | </HTTPSamplerProxy> |
182 | <hashTree> | 118 | <hashTree> |
183 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 119 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> |
184 | <stringProp name="TestPlan.comments"></stringProp> | 120 | <stringProp name="TestPlan.comments"></stringProp> |
185 | <boolProp name="resetInterpreter">false</boolProp> | 121 | <boolProp name="resetInterpreter">false</boolProp> |
186 | - <stringProp name="parameters">${SNCP} ${address_id_submit} ${uid_submit}</stringProp> | 122 | + <stringProp name="parameters">${product_skn} ${uid}</stringProp> |
187 | <stringProp name="filename"></stringProp> | 123 | <stringProp name="filename"></stringProp> |
188 | <stringProp name="script">import java.security.MessageDigest; | 124 | <stringProp name="script">import java.security.MessageDigest; |
189 | import java.util.Random; | 125 | import java.util.Random; |
190 | -String[] clientTypes = {"android","iphone"}; | ||
191 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb0674e08986c6b115d5e3a4884fa"}; | ||
192 | -int rd = new Random().nextInt(2); | 126 | +String[] clientTypes = {"android"}; |
127 | +String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
128 | +int rd = new Random().nextInt(1); | ||
193 | String clientType = clientTypes[rd]; | 129 | String clientType = clientTypes[rd]; |
194 | String privateKey = privateKeys[rd]; | 130 | String privateKey = privateKeys[rd]; |
195 | -String os_version = "yohobuy:web"; | ||
196 | -String req = "_sncp="+bsh.args[0]+"&address_id="+bsh.args[1]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_continue_buy=N&is_print_price=Y&method=app.Shopping.submit&os_version="+os_version+"&payment_id=15&payment_type=1&private_key="+privateKey+"&screen_size=720x1280&session_key=4d4b41f709b50f3be42b3428d8e8bec3&udid=971754752&uid="+bsh.args[2]+"&use_yoho_coin=0&v=7"; | 131 | + |
132 | +String req = "app_version=5.8.1&client_type="+clientType+"&current_vip_level=0&fromPage=iFP_ProductDetail&is_student=0&method=app.product.data&os_version=9.1&physical_channel=1&private_key="+privateKey+"&product_skn="+bsh.args[0]+"&screen_size=375x667&session_key=c9e62120b6a534dea8a06e8e3875e810&showcomment=Y&token=&udid=dbff80c827e771b3035a1a5ae80892d571860a8d&uid="+bsh.args[1]+"&v=7"; | ||
197 | MessageDigest md = MessageDigest.getInstance("MD5"); | 133 | MessageDigest md = MessageDigest.getInstance("MD5"); |
198 | byte[] btInput = req.getBytes(); | 134 | byte[] btInput = req.getBytes(); |
199 | md.update(btInput); | 135 | md.update(btInput); |
@@ -207,8 +143,8 @@ for(byte b : btResult){ | @@ -207,8 +143,8 @@ for(byte b : btResult){ | ||
207 | sb.append(Integer.toHexString(bt)); | 143 | sb.append(Integer.toHexString(bt)); |
208 | } | 144 | } |
209 | String md5 = sb.toString(); | 145 | String md5 = sb.toString(); |
210 | -os_version=URLEncoder.encode(os_version); | ||
211 | -req = "_sncp="+bsh.args[0]+"&address_id="+bsh.args[1]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_continue_buy=N&is_print_price=Y&method=app.Shopping.submit&os_version="+os_version+"&payment_id=15&payment_type=1&private_key="+privateKey+"&screen_size=720x1280&session_key=4d4b41f709b50f3be42b3428d8e8bec3&udid=971754752&uid="+bsh.args[2]+"&use_yoho_coin=0&v=7"; | 146 | + |
147 | + | ||
212 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 148 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
213 | </BeanShellPreProcessor> | 149 | </BeanShellPreProcessor> |
214 | <hashTree/> | 150 | <hashTree/> |
@@ -223,12 +159,11 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -223,12 +159,11 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
223 | </ResponseAssertion> | 159 | </ResponseAssertion> |
224 | <hashTree/> | 160 | <hashTree/> |
225 | </hashTree> | 161 | </hashTree> |
226 | -</hashTree> | ||
227 | <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | 162 | <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> |
228 | <stringProp name="TestPlan.comments"></stringProp> | 163 | <stringProp name="TestPlan.comments"></stringProp> |
229 | <doubleProp> | 164 | <doubleProp> |
230 | <name>throughput</name> | 165 | <name>throughput</name> |
231 | - <value>60000</value> | 166 | + <value>120000</value> |
232 | <savedValue>0.0</savedValue> | 167 | <savedValue>0.0</savedValue> |
233 | </doubleProp> | 168 | </doubleProp> |
234 | <intProp name="calcMode">2</intProp> | 169 | <intProp name="calcMode">2</intProp> |
-
Please register or login to post a comment