Skip to content

MFTF: Acceptance tests break the naming convention #27503

Closed
@lbajsarowicz

Description

@lbajsarowicz

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)
  • app/code/Magento/Captcha (15 issues)
  • app/code/Magento/Backup (9 issues)
  • app/code/Magento/Indexer (2 issues)

Metadata

Metadata

Labels

Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReported on 2.3.xIndicates original Magento version for the Issue report.good first issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions