Skip to content

Commit b19afe9

Browse files
committed
Merge pull request #256 from magento-mustang/MAGETWO-36298
[Mustangs] MAGETWO-36298: change to HttpClient4 from Java client; fix regex issues
2 parents feeb287 + 5b8a727 commit b19afe9

14 files changed

+281
-248
lines changed

dev/tests/performance/benchmark.jmx

Lines changed: 37 additions & 50 deletions
Large diffs are not rendered by default.

dev/tests/performance/testsuite/_samples/_template.jmx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* @category Magento
5-
* @package performance_tests
64
* Copyright © 2015 Magento. All rights reserved.
75
* See COPYING.txt for license details.
86
*/
97
-->
10-
<jmeterTestPlan version="1.2" properties="2.1">
8+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
119
<hashTree>
1210
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
1311
<stringProp name="TestPlan.comments"></stringProp>
@@ -64,8 +62,10 @@
6462
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
6563
<stringProp name="HTTPSampler.response_timeout"></stringProp>
6664
<stringProp name="HTTPSampler.protocol">http</stringProp>
67-
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
65+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
6866
<stringProp name="HTTPSampler.path"></stringProp>
67+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
68+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
6969
</ConfigTestElement>
7070
<hashTree/>
7171
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
@@ -101,6 +101,9 @@
101101
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
102102
<assertionsResultsToSave>0</assertionsResultsToSave>
103103
<bytes>true</bytes>
104+
<hostname>true</hostname>
105+
<threadCounts>true</threadCounts>
106+
<sampleCount>true</sampleCount>
104107
</value>
105108
</objProp>
106109
<stringProp name="filename"></stringProp>

dev/tests/performance/testsuite/add_to_cart.jmx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* @category Magento
5-
* @package performance_tests
64
* Copyright © 2015 Magento. All rights reserved.
75
* See COPYING.txt for license details.
86
*/
97
-->
10-
<jmeterTestPlan version="1.2" properties="2.1">
8+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
119
<hashTree>
1210
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
1311
<stringProp name="TestPlan.comments"></stringProp>
@@ -60,15 +58,15 @@
6058
</collectionProp>
6159
</Arguments>
6260
<hashTree/>
63-
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Add to Cart - Product View" enabled="true">
61+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add to Cart - Product View" enabled="true">
6462
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
6563
<collectionProp name="Arguments.arguments"/>
6664
</elementProp>
6765
<stringProp name="HTTPSampler.domain"></stringProp>
6866
<stringProp name="HTTPSampler.port"></stringProp>
6967
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
7068
<stringProp name="HTTPSampler.response_timeout"></stringProp>
71-
<stringProp name="HTTPSampler.protocol">http</stringProp>
69+
<stringProp name="HTTPSampler.protocol"></stringProp>
7270
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
7371
<stringProp name="HTTPSampler.path">${base_path}${product_url_key}</stringProp>
7472
<stringProp name="HTTPSampler.method">GET</stringProp>
@@ -78,7 +76,7 @@
7876
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
7977
<boolProp name="HTTPSampler.monitor">false</boolProp>
8078
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
81-
</HTTPSampler>
79+
</HTTPSamplerProxy>
8280
<hashTree>
8381
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract &quot;product_id&quot;" enabled="true">
8482
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
@@ -121,7 +119,7 @@
121119
</ResponseAssertion>
122120
<hashTree/>
123121
</hashTree>
124-
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Cart Add Product &amp; View Redirect" enabled="true">
122+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Cart Add Product &amp; View Redirect" enabled="true">
125123
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
126124
<collectionProp name="Arguments.arguments">
127125
<elementProp name="product" elementType="HTTPArgument">
@@ -151,8 +149,8 @@
151149
<stringProp name="HTTPSampler.port"></stringProp>
152150
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
153151
<stringProp name="HTTPSampler.response_timeout"></stringProp>
154-
<stringProp name="HTTPSampler.protocol">http</stringProp>
155-
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
152+
<stringProp name="HTTPSampler.protocol"></stringProp>
153+
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
156154
<stringProp name="HTTPSampler.path">${base_path}checkout/cart/add/product/${product_id}/</stringProp>
157155
<stringProp name="HTTPSampler.method">POST</stringProp>
158156
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
@@ -161,7 +159,7 @@
161159
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
162160
<boolProp name="HTTPSampler.monitor">false</boolProp>
163161
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
164-
</HTTPSampler>
162+
</HTTPSamplerProxy>
165163
<hashTree>
166164
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
167165
<collectionProp name="Asserion.test_strings">
@@ -175,7 +173,7 @@
175173
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
176174
<collectionProp name="Asserion.test_strings">
177175
<stringProp name="1554014413">&lt;a href=&quot;${base_uri}${product_url_key}&quot;&gt;${product_name}&lt;/a&gt;</stringProp>
178-
<stringProp name="1472794794">You added ${product_name} to your shopping cart.</stringProp>
176+
<stringProp name="-149996652">You added ${product_name} to your shopping cart.</stringProp>
179177
</collectionProp>
180178
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
181179
<boolProp name="Assertion.assume_success">false</boolProp>
@@ -197,9 +195,11 @@
197195
<stringProp name="HTTPSampler.port"></stringProp>
198196
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
199197
<stringProp name="HTTPSampler.response_timeout"></stringProp>
200-
<stringProp name="HTTPSampler.protocol"></stringProp>
201-
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
198+
<stringProp name="HTTPSampler.protocol">http</stringProp>
199+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
202200
<stringProp name="HTTPSampler.path">${base_path}</stringProp>
201+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
202+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
203203
</ConfigTestElement>
204204
<hashTree/>
205205
</hashTree>
@@ -230,6 +230,9 @@
230230
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
231231
<assertionsResultsToSave>0</assertionsResultsToSave>
232232
<bytes>true</bytes>
233+
<hostname>true</hostname>
234+
<threadCounts>true</threadCounts>
235+
<sampleCount>true</sampleCount>
233236
</value>
234237
</objProp>
235238
<stringProp name="filename"></stringProp>

dev/tests/performance/testsuite/advanced_search.jmx

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* @category Magento
5-
* @package performance_tests
64
* Copyright © 2015 Magento. All rights reserved.
75
* See COPYING.txt for license details.
86
*/
97
-->
10-
<jmeterTestPlan version="1.2" properties="2.3">
8+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
119
<hashTree>
1210
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Advanced Search" enabled="true">
1311
<stringProp name="TestPlan.comments"></stringProp>
@@ -69,7 +67,7 @@
6967
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
7068
<collectionProp name="Arguments.arguments"/>
7169
</elementProp>
72-
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
70+
<stringProp name="HTTPSampler.domain"></stringProp>
7371
<stringProp name="HTTPSampler.port"></stringProp>
7472
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
7573
<stringProp name="HTTPSampler.response_timeout"></stringProp>
@@ -81,14 +79,13 @@
8179
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
8280
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
8381
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
84-
<stringProp name="HTTPSampler.implementation">Java</stringProp>
8582
<boolProp name="HTTPSampler.monitor">false</boolProp>
8683
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
8784
</HTTPSamplerProxy>
8885
<hashTree>
8986
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assertion: Header Presence" enabled="true">
9087
<collectionProp name="Asserion.test_strings">
91-
<stringProp name="-462078532">Advanced Search</stringProp>
88+
<stringProp name="-1680539802">Advanced Search</stringProp>
9289
</collectionProp>
9390
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
9491
<boolProp name="Assertion.assume_success">false</boolProp>
@@ -143,19 +140,18 @@
143140
</elementProp>
144141
</collectionProp>
145142
</elementProp>
146-
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
143+
<stringProp name="HTTPSampler.domain"></stringProp>
147144
<stringProp name="HTTPSampler.port"></stringProp>
148145
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
149146
<stringProp name="HTTPSampler.response_timeout"></stringProp>
150147
<stringProp name="HTTPSampler.protocol"></stringProp>
151-
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
148+
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
152149
<stringProp name="HTTPSampler.path">${PATH}catalogsearch/advanced/result/</stringProp>
153150
<stringProp name="HTTPSampler.method">GET</stringProp>
154151
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
155152
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
156153
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
157154
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
158-
<stringProp name="HTTPSampler.implementation">Java</stringProp>
159155
<boolProp name="HTTPSampler.monitor">false</boolProp>
160156
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
161157
</HTTPSamplerProxy>
@@ -215,6 +211,9 @@
215211
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
216212
<assertionsResultsToSave>0</assertionsResultsToSave>
217213
<bytes>true</bytes>
214+
<hostname>true</hostname>
215+
<threadCounts>true</threadCounts>
216+
<sampleCount>true</sampleCount>
218217
</value>
219218
</objProp>
220219
<stringProp name="filename"></stringProp>
@@ -249,6 +248,21 @@
249248
</collectionProp>
250249
</HeaderManager>
251250
<hashTree/>
251+
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
252+
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
253+
<collectionProp name="Arguments.arguments"/>
254+
</elementProp>
255+
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
256+
<stringProp name="HTTPSampler.port"></stringProp>
257+
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
258+
<stringProp name="HTTPSampler.response_timeout"></stringProp>
259+
<stringProp name="HTTPSampler.protocol">http</stringProp>
260+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
261+
<stringProp name="HTTPSampler.path"></stringProp>
262+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
263+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
264+
</ConfigTestElement>
265+
<hashTree/>
252266
</hashTree>
253267
</hashTree>
254268
</jmeterTestPlan>

0 commit comments

Comments
 (0)