Skip to content

Commit 140b155

Browse files
author
Susan Wright
committed
MAGETWO-36298: [GITHUB] change to HttpClient4 from Java client; fix regex issues #1173
- Approach applied to all jmx scripts.
1 parent 5b52798 commit 140b155

File tree

12 files changed

+257
-234
lines changed

12 files changed

+257
-234
lines changed

dev/tests/performance/benchmark.jmx

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

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
/**
4-
* @category Magento
5-
* @package performance_tests
6-
* Copyright © 2015 Magento. All rights reserved.
7-
* See COPYING.txt for license details.
8-
*/
9-
-->
10-
<jmeterTestPlan version="1.2" properties="2.1">
2+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
113
<hashTree>
124
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
135
<stringProp name="TestPlan.comments"></stringProp>
@@ -64,8 +56,10 @@
6456
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
6557
<stringProp name="HTTPSampler.response_timeout"></stringProp>
6658
<stringProp name="HTTPSampler.protocol">http</stringProp>
67-
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
59+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
6860
<stringProp name="HTTPSampler.path"></stringProp>
61+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
62+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
6963
</ConfigTestElement>
7064
<hashTree/>
7165
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
@@ -101,6 +95,9 @@
10195
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
10296
<assertionsResultsToSave>0</assertionsResultsToSave>
10397
<bytes>true</bytes>
98+
<hostname>true</hostname>
99+
<threadCounts>true</threadCounts>
100+
<sampleCount>true</sampleCount>
104101
</value>
105102
</objProp>
106103
<stringProp name="filename"></stringProp>

dev/tests/performance/testsuite/add_to_cart.jmx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
/**
4-
* @category Magento
5-
* @package performance_tests
6-
* Copyright © 2015 Magento. All rights reserved.
7-
* See COPYING.txt for license details.
8-
*/
9-
-->
10-
<jmeterTestPlan version="1.2" properties="2.1">
2+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
113
<hashTree>
124
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
135
<stringProp name="TestPlan.comments"></stringProp>
@@ -60,15 +52,15 @@
6052
</collectionProp>
6153
</Arguments>
6254
<hashTree/>
63-
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Add to Cart - Product View" enabled="true">
55+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Add to Cart - Product View" enabled="true">
6456
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
6557
<collectionProp name="Arguments.arguments"/>
6658
</elementProp>
6759
<stringProp name="HTTPSampler.domain"></stringProp>
6860
<stringProp name="HTTPSampler.port"></stringProp>
6961
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
7062
<stringProp name="HTTPSampler.response_timeout"></stringProp>
71-
<stringProp name="HTTPSampler.protocol">http</stringProp>
63+
<stringProp name="HTTPSampler.protocol"></stringProp>
7264
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
7365
<stringProp name="HTTPSampler.path">${base_path}${product_url_key}</stringProp>
7466
<stringProp name="HTTPSampler.method">GET</stringProp>
@@ -78,7 +70,7 @@
7870
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
7971
<boolProp name="HTTPSampler.monitor">false</boolProp>
8072
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
81-
</HTTPSampler>
73+
</HTTPSamplerProxy>
8274
<hashTree>
8375
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract &quot;product_id&quot;" enabled="true">
8476
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
@@ -121,7 +113,7 @@
121113
</ResponseAssertion>
122114
<hashTree/>
123115
</hashTree>
124-
<HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Cart Add Product &amp; View Redirect" enabled="true">
116+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Cart Add Product &amp; View Redirect" enabled="true">
125117
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
126118
<collectionProp name="Arguments.arguments">
127119
<elementProp name="product" elementType="HTTPArgument">
@@ -151,8 +143,8 @@
151143
<stringProp name="HTTPSampler.port"></stringProp>
152144
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
153145
<stringProp name="HTTPSampler.response_timeout"></stringProp>
154-
<stringProp name="HTTPSampler.protocol">http</stringProp>
155-
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
146+
<stringProp name="HTTPSampler.protocol"></stringProp>
147+
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
156148
<stringProp name="HTTPSampler.path">${base_path}checkout/cart/add/product/${product_id}/</stringProp>
157149
<stringProp name="HTTPSampler.method">POST</stringProp>
158150
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
@@ -161,7 +153,7 @@
161153
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
162154
<boolProp name="HTTPSampler.monitor">false</boolProp>
163155
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
164-
</HTTPSampler>
156+
</HTTPSamplerProxy>
165157
<hashTree>
166158
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
167159
<collectionProp name="Asserion.test_strings">
@@ -175,7 +167,7 @@
175167
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
176168
<collectionProp name="Asserion.test_strings">
177169
<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>
170+
<stringProp name="-149996652">You added ${product_name} to your shopping cart.</stringProp>
179171
</collectionProp>
180172
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
181173
<boolProp name="Assertion.assume_success">false</boolProp>
@@ -197,9 +189,11 @@
197189
<stringProp name="HTTPSampler.port"></stringProp>
198190
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
199191
<stringProp name="HTTPSampler.response_timeout"></stringProp>
200-
<stringProp name="HTTPSampler.protocol"></stringProp>
201-
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
192+
<stringProp name="HTTPSampler.protocol">http</stringProp>
193+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
202194
<stringProp name="HTTPSampler.path">${base_path}</stringProp>
195+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
196+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
203197
</ConfigTestElement>
204198
<hashTree/>
205199
</hashTree>
@@ -230,6 +224,9 @@
230224
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
231225
<assertionsResultsToSave>0</assertionsResultsToSave>
232226
<bytes>true</bytes>
227+
<hostname>true</hostname>
228+
<threadCounts>true</threadCounts>
229+
<sampleCount>true</sampleCount>
233230
</value>
234231
</objProp>
235232
<stringProp name="filename"></stringProp>

dev/tests/performance/testsuite/advanced_search.jmx

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
/**
4-
* @category Magento
5-
* @package performance_tests
6-
* Copyright © 2015 Magento. All rights reserved.
7-
* See COPYING.txt for license details.
8-
*/
9-
-->
10-
<jmeterTestPlan version="1.2" properties="2.3">
2+
<jmeterTestPlan version="1.2" properties="2.7" jmeter="2.12 r1636949">
113
<hashTree>
124
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Advanced Search" enabled="true">
135
<stringProp name="TestPlan.comments"></stringProp>
@@ -69,7 +61,7 @@
6961
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
7062
<collectionProp name="Arguments.arguments"/>
7163
</elementProp>
72-
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
64+
<stringProp name="HTTPSampler.domain"></stringProp>
7365
<stringProp name="HTTPSampler.port"></stringProp>
7466
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
7567
<stringProp name="HTTPSampler.response_timeout"></stringProp>
@@ -81,14 +73,13 @@
8173
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
8274
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
8375
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
84-
<stringProp name="HTTPSampler.implementation">Java</stringProp>
8576
<boolProp name="HTTPSampler.monitor">false</boolProp>
8677
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
8778
</HTTPSamplerProxy>
8879
<hashTree>
8980
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assertion: Header Presence" enabled="true">
9081
<collectionProp name="Asserion.test_strings">
91-
<stringProp name="-462078532">Advanced Search</stringProp>
82+
<stringProp name="-1680539802">Advanced Search</stringProp>
9283
</collectionProp>
9384
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
9485
<boolProp name="Assertion.assume_success">false</boolProp>
@@ -143,19 +134,18 @@
143134
</elementProp>
144135
</collectionProp>
145136
</elementProp>
146-
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
137+
<stringProp name="HTTPSampler.domain"></stringProp>
147138
<stringProp name="HTTPSampler.port"></stringProp>
148139
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
149140
<stringProp name="HTTPSampler.response_timeout"></stringProp>
150141
<stringProp name="HTTPSampler.protocol"></stringProp>
151-
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
142+
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
152143
<stringProp name="HTTPSampler.path">${PATH}catalogsearch/advanced/result/</stringProp>
153144
<stringProp name="HTTPSampler.method">GET</stringProp>
154145
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
155146
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
156147
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
157148
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
158-
<stringProp name="HTTPSampler.implementation">Java</stringProp>
159149
<boolProp name="HTTPSampler.monitor">false</boolProp>
160150
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
161151
</HTTPSamplerProxy>
@@ -215,6 +205,9 @@
215205
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
216206
<assertionsResultsToSave>0</assertionsResultsToSave>
217207
<bytes>true</bytes>
208+
<hostname>true</hostname>
209+
<threadCounts>true</threadCounts>
210+
<sampleCount>true</sampleCount>
218211
</value>
219212
</objProp>
220213
<stringProp name="filename"></stringProp>
@@ -249,6 +242,21 @@
249242
</collectionProp>
250243
</HeaderManager>
251244
<hashTree/>
245+
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
246+
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
247+
<collectionProp name="Arguments.arguments"/>
248+
</elementProp>
249+
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
250+
<stringProp name="HTTPSampler.port"></stringProp>
251+
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
252+
<stringProp name="HTTPSampler.response_timeout"></stringProp>
253+
<stringProp name="HTTPSampler.protocol">http</stringProp>
254+
<stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
255+
<stringProp name="HTTPSampler.path"></stringProp>
256+
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
257+
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
258+
</ConfigTestElement>
259+
<hashTree/>
252260
</hashTree>
253261
</hashTree>
254262
</jmeterTestPlan>

0 commit comments

Comments
 (0)