From 0da1c258b488b6ed929080571d012f63783d504e Mon Sep 17 00:00:00 2001 From: Stanislav Lopukhov <slopukhov@ebay.com> Date: Wed, 18 Mar 2015 16:07:48 +0200 Subject: [PATCH] MAGETWO-35130: Fix jmeter scenario for performance toolkit --- dev/tools/performance-toolkit/benchmark.jmx | 437 ++++++++++++++------ 1 file changed, 322 insertions(+), 115 deletions(-) diff --git a/dev/tools/performance-toolkit/benchmark.jmx b/dev/tools/performance-toolkit/benchmark.jmx index 1fe4919a59e..7d3d7aef7fa 100644 --- a/dev/tools/performance-toolkit/benchmark.jmx +++ b/dev/tools/performance-toolkit/benchmark.jmx @@ -316,7 +316,7 @@ props.put("category_name", vars.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol"></stringProp> <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> - <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/?limit=30&q=Simple</stringProp> + <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/index/?limit=30&q=Simple</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -340,7 +340,7 @@ props.put("category_name", vars.get("category_name"));</stri <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extract product url keys" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">simple_products_url_keys</stringProp> - <stringProp name="RegexExtractor.regex">${base_path}(index.php/)?(simple.*)${url_suffix}" title="[Ss]imple.*"</stringProp> + <stringProp name="RegexExtractor.regex"><a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Simple</stringProp> <stringProp name="RegexExtractor.template">$2$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">-1</stringProp> @@ -386,7 +386,7 @@ props.put("category_name", vars.get("category_name"));</stri <XPathExtractor guiclass="XPathExtractorGui" testclass="XPathExtractor" testname="XPath Extractor: Extarct product title" enabled="true"> <stringProp name="XPathExtractor.default"></stringProp> <stringProp name="XPathExtractor.refname">simple_product_title</stringProp> - <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title']/text()</stringProp> + <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title-wrapper']/text()</stringProp> <boolProp name="XPathExtractor.validate">false</boolProp> <boolProp name="XPathExtractor.tolerant">true</boolProp> <boolProp name="XPathExtractor.namespace">false</boolProp> @@ -471,7 +471,7 @@ productList.add(productMap); </stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol"></stringProp> <stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp> - <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/?limit=30&q=Configurable</stringProp> + <stringProp name="HTTPSampler.path">${base_path}catalogsearch/result/index/?limit=30&q=Configurable</stringProp> <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -495,7 +495,7 @@ productList.add(productMap); </stringProp> <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extract product url keys" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">configurable_products_url_keys</stringProp> - <stringProp name="RegexExtractor.regex">${base_path}(index.php/)?(configurable.*)${url_suffix}" title="[Cc]onfigurable.*"</stringProp> + <stringProp name="RegexExtractor.regex"><a class="product-item-link" href="http://${host}${base_path}(index.php/)?([^'"]+)${url_suffix}">Configurable</stringProp> <stringProp name="RegexExtractor.template">$2$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">-1</stringProp> @@ -541,7 +541,7 @@ productList.add(productMap); </stringProp> <XPathExtractor guiclass="XPathExtractorGui" testclass="XPathExtractor" testname="XPath Extractor: Extarct product title" enabled="true"> <stringProp name="XPathExtractor.default"></stringProp> <stringProp name="XPathExtractor.refname">configurable_product_title</stringProp> - <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title']/text()</stringProp> + <stringProp name="XPathExtractor.xpathQuery">.//*[@data-ui-id='page-title-wrapper']/text()</stringProp> <boolProp name="XPathExtractor.validate">false</boolProp> <boolProp name="XPathExtractor.tolerant">true</boolProp> <boolProp name="XPathExtractor.namespace">false</boolProp> @@ -550,7 +550,7 @@ productList.add(productMap); </stringProp> <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor: Extarct product attribute id" enabled="true"> <stringProp name="RegexExtractor.useHeaders">false</stringProp> <stringProp name="RegexExtractor.refname">configurable_product_attribute_id</stringProp> - <stringProp name="RegexExtractor.regex">"spConfig":\{"attributes":\{"(\d+)"</stringProp> + <stringProp name="RegexExtractor.regex">"attributes":\{"(\d+)"</stringProp> <stringProp name="RegexExtractor.template">$1$</stringProp> <stringProp name="RegexExtractor.default"></stringProp> <stringProp name="RegexExtractor.match_number">1</stringProp> @@ -1401,6 +1401,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1431,6 +1451,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1439,7 +1473,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1468,17 +1502,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1516,6 +1539,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1546,6 +1589,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1554,7 +1611,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1583,17 +1640,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1631,6 +1677,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1668,6 +1734,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1676,7 +1756,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1705,17 +1785,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> </hashTree> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Guest Checkout" enabled="true"> @@ -1882,6 +1951,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1912,6 +2001,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -1920,7 +2023,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -1949,17 +2052,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -1997,6 +2089,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2027,6 +2139,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2035,7 +2161,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2064,17 +2190,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2112,6 +2227,26 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2149,6 +2284,20 @@ vars.put("category_name", props.get("category_name"));</stri <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2157,7 +2306,7 @@ vars.put("category_name", props.get("category_name"));</stri <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2186,17 +2335,6 @@ vars.put("category_name", props.get("category_name"));</stri <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2932,6 +3070,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_1_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_1_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -2962,6 +3120,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -2970,7 +3142,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_1_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -2999,17 +3171,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=1</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3047,6 +3208,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">simple_product_2_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">simple_product_2_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3077,6 +3258,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">qty</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -3085,7 +3280,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${simple_product_2_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3114,17 +3309,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=2</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3162,6 +3346,26 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">2</intProp> </ResponseAssertion> <hashTree/> + <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Extract form action" enabled="true"> + <stringProp name="RegexExtractor.useHeaders">false</stringProp> + <stringProp name="RegexExtractor.refname">configurable_product_form_action</stringProp> + <stringProp name="RegexExtractor.regex"><form action="([^'"]+)" method="post" id="product_addtocart_form"></stringProp> + <stringProp name="RegexExtractor.template">$1$</stringProp> + <stringProp name="RegexExtractor.default"></stringProp> + <stringProp name="RegexExtractor.match_number">1</stringProp> + </RegexExtractor> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assert form_action extracted" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="2845929">^.+$</stringProp> + </collectionProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + <stringProp name="Assertion.scope">variable</stringProp> + <stringProp name="Scope.variable">configurable_product_form_action</stringProp> + </ResponseAssertion> + <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> @@ -3199,6 +3403,20 @@ if (emailsCount < 1) { <boolProp name="HTTPArgument.use_equals">true</boolProp> <stringProp name="Argument.name">super_attribute[${configurable_attribute_id}]</stringProp> </elementProp> + <elementProp name="isAjax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">isAjax</stringProp> + </elementProp> + <elementProp name="ajax" elementType="HTTPArgument"> + <boolProp name="HTTPArgument.always_encode">false</boolProp> + <stringProp name="Argument.value">true</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + <boolProp name="HTTPArgument.use_equals">true</boolProp> + <stringProp name="Argument.name">ajax</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="HTTPSampler.domain"></stringProp> @@ -3207,7 +3425,7 @@ if (emailsCount < 1) { <stringProp name="HTTPSampler.response_timeout"></stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">${base_path}checkout/cart/add</stringProp> + <stringProp name="HTTPSampler.path">${configurable_product_form_action}</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -3236,17 +3454,6 @@ if (emailsCount < 1) { <intProp name="Assertion.test_type">6</intProp> </ResponseAssertion> <hashTree/> - <XPathAssertion guiclass="XPathAssertionGui" testclass="XPathAssertion" testname="XPath Assertion" enabled="true"> - <boolProp name="XPath.negate">false</boolProp> - <stringProp name="XPath.xpath">count(//*[@class='cart item'])=3</stringProp> - <boolProp name="XPath.validate">false</boolProp> - <boolProp name="XPath.whitespace">false</boolProp> - <boolProp name="XPath.tolerant">true</boolProp> - <boolProp name="XPath.namespace">false</boolProp> - <boolProp name="XPath.show_warnings">true</boolProp> - <boolProp name="XPath.report_errors">true</boolProp> - </XPathAssertion> - <hashTree/> </hashTree> <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Random Timer" enabled="true"> <stringProp name="ConstantTimer.delay">${think_time_delay_offset}</stringProp> -- GitLab