Skip to content

Commit 0f92e7f

Browse files
authored
Merge pull request #5785 from magento-tsg/MC-34987-236
[TSG][2.3.6] MC-34987: MFTF tests causing high load on Jenkins agents in MTSv1 platform
2 parents c5d7a67 + 8671878 commit 0f92e7f

23 files changed

+314
-142
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheCleanActionGroup">
12+
<annotations>
13+
<description>Run cache:clean by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="CliCacheFlushActionGroup">
12+
<annotations>
13+
<description>Run cache:flush by CLI with specified cache tags (space separated).</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="tags" type="string"/>
17+
</arguments>
18+
19+
<magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Test/AdminShouldBeAbleToMassUpdateAttributesForBundleProductsTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@
5555
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
5656
<argument name="product" value="UpdateAttributeNameAndDescription"/>
5757
</actionGroup>
58-
<!--Run cron twice-->
59-
<magentoCLI command="cron:run" stepKey="cronRun"/>
60-
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
58+
<comment userInput="Apply changes" stepKey="cronRun"/>
59+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="cronRunTwice">
60+
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
61+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
62+
</actionGroup>
6163
<!-- Search for a product with a new name and Open Product -->
6264
<actionGroup ref="filterProductGridByName" stepKey="searchWithNewProductName">
6365
<argument name="product" value="UpdateAttributeNameAndDescription"/>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="AdminProductAttributeUpdateConsumerData">
12+
<data key="consumerName">product_action_attribute.update</data>
13+
<data key="messageLimit">100</data>
14+
</entity>
15+
<entity name="AdminProductAttributeWebsiteUpdateConsumerData">
16+
<data key="consumerName">product_action_attribute.website.update</data>
17+
<data key="messageLimit">100</data>
18+
</entity>
19+
</entities>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassProductPriceUpdateTest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@
5656
<waitForPageLoad stepKey="waitForUpdatedProductToSave" />
5757
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>
5858

59-
<!-- Run cron twice -->
60-
<magentoCLI command="cron:run" stepKey="runCron1"/>
61-
<magentoCLI command="cron:run" stepKey="runCron2"/>
59+
<!-- Start message queue -->
60+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCron1">
61+
<argument name="consumerName" value="{{AdminProductAttributeUpdateConsumerData.consumerName}}"/>
62+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateConsumerData.messageLimit}}"/>
63+
</actionGroup>
64+
<!-- Run cron -->
65+
<magentoCLI command="cron:run --group=index" stepKey="runCron2"/>
6266
<reloadPage stepKey="refreshPage"/>
6367
<waitForPageLoad stepKey="waitFormToReload1"/>
6468

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesGlobalScopeTest.xml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,27 @@
5959
<actionGroup ref="AdminSwitchStoreViewActionGroup" stepKey="AdminSwitchStoreViewActionGroup"/>
6060
<!-- Update attribute -->
6161
<checkOption selector="{{AdminEditProductAttributesSection.ChangeAttributePriceToggle}}" stepKey="toggleToChangePrice"/>
62-
<fillField selector="{{AdminEditProductAttributesSection.AttributePrice}}" userInput="$$createProductOne.price$$0" stepKey="fillAttributeNameField"/>
62+
<fillField selector="{{AdminEditProductAttributesSection.AttributePrice}}" userInput="$createProductOne.price$0" stepKey="fillAttributeNameField"/>
6363
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
6464
<waitForElementVisible selector="{{AdminMessagesSection.success}}" time="60" stepKey="waitForSuccessMessage"/>
6565
<see selector="{{AdminMessagesSection.success}}" userInput="Message is added to queue" stepKey="seeAttributeUpdateSuccessMsg"/>
6666

67-
<!-- Run cron twice -->
68-
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron1"/>
69-
<magentoCLI command="cron:run" arguments="--group=consumers" stepKey="runCron2"/>
70-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
67+
<!-- Start message queue for product attribute consumer -->
68+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCron1">
69+
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
70+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
71+
</actionGroup>
72+
<magentoCLI command="cron:run --group=index" stepKey="runCron2"/>
73+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
74+
<argument name="indices" value=""/>
75+
</actionGroup>
7176

7277
<!-- Assert on storefront default view -->
7378
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupDefault"/>
7479
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameDefault">
75-
<argument name="name" value="&quot;$$createProductOne.name$$&quot;"/>
76-
<argument name="priceFrom" value="$$createProductOne.price$$0"/>
77-
<argument name="priceTo" value="$$createProductOne.price$$0"/>
80+
<argument name="name" value="&quot;$createProductOne.name$&quot;"/>
81+
<argument name="priceFrom" value="$createProductOne.price$0"/>
82+
<argument name="priceTo" value="$createProductOne.price$0"/>
7883
</actionGroup>
7984
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultDefault"/>
8085
<waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInDefaultView"/>
@@ -84,9 +89,9 @@
8489
<actionGroup ref="GoToStoreViewAdvancedCatalogSearchActionGroup" stepKey="GoToStoreViewAdvancedCatalogSearchActionGroupCustom"/>
8590
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="StorefrontSwitchStoreViewActionGroup"/>
8691
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="searchByNameCustom">
87-
<argument name="name" value="&quot;$$createProductOne.name$$&quot;"/>
88-
<argument name="priceFrom" value="$$createProductOne.price$$0"/>
89-
<argument name="priceTo" value="$$createProductOne.price$$0"/>
92+
<argument name="name" value="&quot;$createProductOne.name$&quot;"/>
93+
<argument name="priceFrom" value="$createProductOne.price$0"/>
94+
<argument name="priceTo" value="$createProductOne.price$0"/>
9095
</actionGroup>
9196
<actionGroup ref="StorefrontCheckAdvancedSearchResultActionGroup" stepKey="StorefrontCheckAdvancedSearchResultCustom"/>
9297
<waitForElementVisible selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="waitForSearchResultInCustomView"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminMassUpdateProductAttributesStoreViewScopeTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@
133133
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
134134
<see selector="{{AdminProductMessagesSection.successMessage}}" userInput="Message is added to queue" stepKey="seeAttributeUpateSuccessMsg"/>
135135

136-
<!-- Run cron twice -->
137-
<magentoCLI command="cron:run" stepKey="runCron1"/>
138-
<magentoCLI command="cron:run" stepKey="runCron2"/>
136+
<comment userInput="Apply changes" stepKey="runCron1"/>
137+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCron2">
138+
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
139+
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
140+
</actionGroup>
139141
<reloadPage stepKey="refreshPage"/>
140142
<waitForPageLoad stepKey="waitFormToReload1"/>
141143

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@
8080
<requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
8181
</createData>
8282

83-
<!-- Run cron twice -->
84-
<magentoCLI command="cron:run" stepKey="runCron1"/>
85-
<magentoCLI command="cron:run" stepKey="runCron2"/>
83+
<!-- Run cron twice (To reduce the load and with introducing BIC cron runs have been removed) -->
84+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="runCron1">
85+
<argument name="indices" value="catalog_category_product catalogrule_product catalog_product_price catalogsearch_fulltext "/>
86+
</actionGroup>
87+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="runCron2">
88+
<argument name="tags" value="full_page"/>
89+
</actionGroup>
8690

8791
<!-- Login as admin -->
8892
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -118,9 +122,12 @@
118122
<!-- Export created below products -->
119123
<actionGroup ref="exportAllProducts" stepKey="exportCreatedProducts"/>
120124

121-
<!-- Run cron -->
122-
<magentoCLI command="cron:run" stepKey="runCron3"/>
123-
<magentoCLI command="cron:run" stepKey="runCron4"/>
125+
<!-- Run cron (To reduce the load and with introducing BIC cron runs have been removed) -->
126+
<magentoCLI command="help" stepKey="runCron3"/>
127+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCron4">
128+
<argument name="consumerName" value="exportProcessor"/>
129+
<argument name="maxMessages" value="10"/>
130+
</actionGroup>
124131

125132
<!-- Download product -->
126133
<actionGroup ref="downloadFileByRowIndex" stepKey="downloadCreatedProducts">

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@
4848
<requiredEntity createDataKey="createSecondSimpleProduct"/>
4949
</updateData>
5050

51-
<!-- Run cron twice -->
52-
<magentoCLI command="cron:run" stepKey="runCron1"/>
53-
<magentoCLI command="cron:run" stepKey="runCron2"/>
51+
<comment userInput="Reindex invalidated indices" stepKey="runCron1"/>
52+
<actionGroup ref="CliRunReindexUsingCronJobsActionGroup" stepKey="runCron2"/>
5453

5554
<!-- Login as admin -->
5655
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -80,9 +79,11 @@
8079
<!-- Export created below products -->
8180
<actionGroup ref="exportAllProducts" stepKey="exportCreatedProducts"/>
8281

83-
<!-- Run cron -->
84-
<magentoCLI command="cron:run" stepKey="runCron3"/>
85-
<magentoCLI command="cron:run" stepKey="runCron4"/>
82+
<comment userInput="Start message queue for export consumer" stepKey="runCron3"/>
83+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCron4">
84+
<argument name="consumerName" value="{{AdminExportMessageConsumerData.consumerName}}"/>
85+
<argument name="maxMessages" value="{{AdminExportMessageConsumerData.messageLimit}}"/>
86+
</actionGroup>
8687

8788
<!-- Download product -->
8889
<actionGroup ref="downloadFileByRowIndex" stepKey="downloadCreatedProducts">

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,12 @@
167167
<argument name="attributeData" value="$$createExportImportConfigurableProduct.sku$$"/>
168168
</actionGroup>
169169

170-
<!-- Run cron twice -->
171-
<magentoCLI command="cron:run" stepKey="runCronFirstTime"/>
172-
<magentoCLI command="cron:run" stepKey="runCronSecondTime"/>
170+
<!-- Run cron twice (To reduce the load and with introducing BIC cron runs have been removed) -->
171+
<magentoCLI command="help" stepKey="runCronFirstTime"/>
172+
<actionGroup ref="CliConsumerStartActionGroup" stepKey="runCronSecondTime">
173+
<argument name="consumerName" value="exportProcessor"/>
174+
<argument name="maxMessages" value="10"/>
175+
</actionGroup>
173176

174177
<!-- Save exported file: file successfully downloaded -->
175178
<actionGroup ref="downloadFileByRowIndex" stepKey="downloadCreatedProducts">

0 commit comments

Comments
 (0)