Magento2: MFTF: Acceptance tests break the naming convention

Created on 30 Mar 2020  路  4Comments  路  Source: magento/magento2

Preconditions (*)

All the Magento Functional Testing Framework should follow Technical Guidelines:
https://devdocs.magento.com/guides/v2.3/coding-standards/technical-guidelines.html#113-functional-testing

Steps to reproduce (*)

  1. Generate tests with vendor/bin/mftf generate:test -f

Expected result (*)

  1. No naming violations detected

Actual result (*)

  1. NOTICE: 165 Section name violations detected. See mftf.log for details.
  2. NOTICE: 614 section element name violations detected. See mftf.log for details.
  3. NOTICE: 301 data entity name violations detected. See mftf.log for details.
  4. NOTICE: 15 data entity key violations detected. See mftf.log for details.
  5. NOTICE: 17 action group name violations detected. See mftf.log for details.
  6. NOTICE: 37 Page name violations detected. See mftf.log for details.

Contribution

TODO

  1. Make sure that all stepKeys both for Tests and ActionGroups are camelCase (lower first letter)
  2. Make sure that all Action Groups in module have ActionGroup suffix
  3. Make sure that all Action Groups names are consistent with the filename
  4. Make sure that all Action Groups names are PascalCase (upper first letter)
  5. Make sure that all Test names in module have Test suffix
  6. Make sure that all the test names are PascalCase
  7. Make sure that all the test names are consistent with the filename.
  8. Make sure that all Page names are Pascal Case
  9. Make sure that there is only one <page> node in each XML file

Backward compatibility

If you rename ActionGroup please try to keep backward compatibility:

  1. Rename the ActionGroup to follow the Magento requirements
  2. Create ActionGroup/_Deprecated_/previusNameActionGroup.xml file with contents:
<actionGroup name="previousName" extends="CurrentNameActionGroup" deprecated="Use CurrentNameActionGroup"/>

this way even if someone calls old Action Group name, he is going to get the notice about deprecation.

Modules

Due to some compatibility issues and to make Code Review easier - please do your changes per module. You can find list of checkboxes underneath with list of modules that should be covered. When you start working on specific module, please check the chekbox and add the comment which module you start work. When you finish - edit your commend adding the link to PR.

Once you finished, make sure that vendor/bin/mftf generate:test -f does not return any errors.

Open Source

  • [ ] app/code/Magento/Catalog (6484 issues)
  • [ ] app/code/Magento/Cms (2187 issues)
  • [ ] app/code/Magento/Sales (1006 issues)
  • [ ] app/code/Magento/Config (660 issues)
  • [ ] app/code/Magento/Newsletter (631 issues)
  • [ ] app/code/Magento/Shipping (604 issues)
  • [ ] app/code/Magento/Store (554 issues)
  • [ ] app/code/Magento/Checkout (552 issues)
  • [ ] app/code/Magento/Customer (390 issues)
  • [ ] app/code/Magento/Wishlist (361 issues)
  • [ ] app/code/Magento/Tax (330 issues)
  • [ ] app/code/Magento/ConfigurableProduct (316 issues)
  • [ ] app/code/Magento/CatalogSearch (270 issues)
  • [ ] app/code/Magento/User (240 issues)
  • [ ] app/code/Magento/Paypal (210 issues)
  • [ ] app/code/Magento/Ui (195 issues)
  • [ ] app/code/Magento/SalesRule (173 issues)
  • [ ] app/code/Magento/Multishipping (138 issues)
  • [ ] app/code/Magento/Reports (137 issues)
  • [ ] app/code/Magento/Downloadable (105 issues)
  • [ ] app/code/Magento/Braintree (105 issues)
  • [ ] app/code/Magento/CatalogRule (98 issues)
  • [ ] app/code/Magento/Widget (90 issues)
  • [ ] app/code/Magento/LayeredNavigation (90 issues)
  • [ ] app/code/Magento/CatalogInventory (83 issues)
  • [ ] app/code/Magento/Swatches (75 issues)
  • [ ] app/code/Magento/CatalogWidget (75 issues)
  • [ ] app/code/Magento/UrlRewrite (60 issues)
  • [ ] app/code/Magento/Backend (57 issues)
  • [ ] app/code/Magento/Translation (45 issues)
  • [ ] app/code/Magento/Review (45 issues)
  • [ ] app/code/Magento/CheckoutAgreements (45 issues)
  • [ ] app/code/Magento/Analytics (45 issues)
  • [ ] app/code/Magento/Bundle (37 issues)
  • [ ] app/code/Magento/Theme (31 issues)
  • [ ] app/code/Magento/Variable (30 issues)
  • [ ] app/code/Magento/Persistent (30 issues)
  • [ ] app/code/Magento/GroupedProduct (30 issues)
  • [ ] app/code/Magento/CurrencySymbol (23 issues)
  • [ ] app/code/Magento/Weee (15 issues)
  • [ ] app/code/Magento/ProductVideo (15 issues)
  • [ ] app/code/Magento/PageCache (15 issues)
  • [ ] app/code/Magento/Integration (15 issues)
  • [ ] app/code/Magento/GiftMessage (15 issues)
  • [x] app/code/Magento/Captcha (15 issues)
  • [x] app/code/Magento/Backup (9 issues)
  • [x] app/code/Magento/Indexer (2 issues)
Fixed in 2.4.x Format is valid Reported on 2.3.x good first issue

Most helpful comment

I'm working on Magento/Indexer, Magento/Backup, Magento/Captcha modules

All 4 comments

Hi @lbajsarowicz. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@lbajsarowicz do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

I'm working on Magento/Indexer, Magento/Backup, Magento/Captcha modules

Was this page helpful?
0 / 5 - 0 ratings