Showing
1 changed file
with
9 additions
and
8 deletions
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | <stringProp name="shareMode">shareMode.all</stringProp> | 106 | <stringProp name="shareMode">shareMode.all</stringProp> |
107 | </CSVDataSet> | 107 | </CSVDataSet> |
108 | <hashTree/> | 108 | <hashTree/> |
109 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_逛" enabled="true"> | 109 | + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_男首" enabled="true"> |
110 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | 110 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
111 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | 111 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> |
112 | <boolProp name="LoopController.continue_forever">false</boolProp> | 112 | <boolProp name="LoopController.continue_forever">false</boolProp> |
@@ -192,7 +192,7 @@ | @@ -192,7 +192,7 @@ | ||
192 | <boolProp name="TransactionController.parent">false</boolProp> | 192 | <boolProp name="TransactionController.parent">false</boolProp> |
193 | </TransactionController> | 193 | </TransactionController> |
194 | <hashTree> | 194 | <hashTree> |
195 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_逛" enabled="true"> | 195 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_男首" enabled="true"> |
196 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | 196 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
197 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | 197 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
198 | <collectionProp name="Arguments.arguments"> | 198 | <collectionProp name="Arguments.arguments"> |
@@ -209,7 +209,7 @@ | @@ -209,7 +209,7 @@ | ||
209 | <stringProp name="HTTPSampler.response_timeout"></stringProp> | 209 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
210 | <stringProp name="HTTPSampler.protocol"></stringProp> | 210 | <stringProp name="HTTPSampler.protocol"></stringProp> |
211 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> | 211 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
212 | - <stringProp name="HTTPSampler.path">http://${HOST_PC}/guang/kids/</stringProp> | 212 | + <stringProp name="HTTPSampler.path">http://${HOST_PC}/</stringProp> |
213 | <stringProp name="HTTPSampler.method">GET</stringProp> | 213 | <stringProp name="HTTPSampler.method">GET</stringProp> |
214 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | 214 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
215 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | 215 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
@@ -221,15 +221,16 @@ | @@ -221,15 +221,16 @@ | ||
221 | </HTTPSamplerProxy> | 221 | </HTTPSamplerProxy> |
222 | <hashTree> | 222 | <hashTree> |
223 | </hashTree> | 223 | </hashTree> |
224 | -<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="JSR223 Sampler" enabled="true"> | 224 | +<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="AJAX" enabled="true"> |
225 | <stringProp name="cacheKey">b04922f8-efaa-4390-bc5f-df25d02450bb</stringProp> | 225 | <stringProp name="cacheKey">b04922f8-efaa-4390-bc5f-df25d02450bb</stringProp> |
226 | <stringProp name="filename"></stringProp> | 226 | <stringProp name="filename"></stringProp> |
227 | - <stringProp name="parameters">GEThttp://${HOST_PC}/common/suggestfeedback?callback=jQuery112407297836417199297_1506394331103&return_type=jsonp&client_secret=web&code=200&_=1506394331104 GEThttp://${HOST_PC}/guang/info/listData?ids=67249%2C67239%2C67157%2C67191%2C67189%2C67163%2C67161%2C67259%2C67287%2C67159%2C67279%2C67263%2C67113%2C67199%2C67261%2C67143%2C67153%2C67197%2C67141%2C67195&type=0 GEThttp://${HOST_PC}/passport/cert/headerTip?callback=jQuery112407297836417199297_1506394331103&_=1506394331105</stringProp> | 227 | + <stringProp name="parameters">GEThttp://www.yohobuy.com/common/suggestfeedback?callback=jQuery112409858715270747556_1505876076710&return_type=jsonp&client_secret=web&code=200&_=1505876076711 GEThttp://www.yohobuy.com/channel/isNewUserAjax GEThttp://www.yohobuy.com/passport/cert/headerTip?callback=jQuery112409858715270747556_1505876076710&_=1505876076712</stringProp> |
228 | <stringProp name="script">import org.apache.http.HttpEntity; | 228 | <stringProp name="script">import org.apache.http.HttpEntity; |
229 | import org.apache.http.HttpResponse; | 229 | import org.apache.http.HttpResponse; |
230 | import org.apache.http.client.HttpClient; | 230 | import org.apache.http.client.HttpClient; |
231 | import org.apache.http.client.methods.HttpGet; | 231 | import org.apache.http.client.methods.HttpGet; |
232 | import org.apache.http.client.methods.HttpPost; | 232 | import org.apache.http.client.methods.HttpPost; |
233 | +import org.apache.http.entity.StringEntity; | ||
233 | import org.apache.http.impl.client.DefaultHttpClient; | 234 | import org.apache.http.impl.client.DefaultHttpClient; |
234 | import org.apache.http.util.EntityUtils; | 235 | import org.apache.http.util.EntityUtils; |
235 | 236 | ||
@@ -260,9 +261,9 @@ for (String url : urls) { | @@ -260,9 +261,9 @@ for (String url : urls) { | ||
260 | String postData = splitArr[1]; | 261 | String postData = splitArr[1]; |
261 | HttpClient client = new DefaultHttpClient(); | 262 | HttpClient client = new DefaultHttpClient(); |
262 | HttpPost post = new HttpPost(currentURL); | 263 | HttpPost post = new HttpPost(currentURL); |
263 | - StringEntity entity = new StringEntity(postData, Charset.forName("UTF-8")); | ||
264 | - entity.setContentEncoding("UTF-8"); | ||
265 | - post.setEntity(entity); | 264 | + StringEntity entityStr = new StringEntity(postData, Charset.forName("UTF-8")); |
265 | + entityStr.setContentEncoding("UTF-8"); | ||
266 | + post.setEntity(entityStr); | ||
266 | HttpResponse response = client.execute(post); | 267 | HttpResponse response = client.execute(post); |
267 | HttpEntity entity = response.getEntity(); | 268 | HttpEntity entity = response.getEntity(); |
268 | EntityUtils.consume(entity); | 269 | EntityUtils.consume(entity); |
-
Please register or login to post a comment