- Maintainability
command.phpis now configured with anidleTimeoutof60seconds, which will allow tests to continue execution if a CLI command is hanging indefinitely.
- Traceability
- Failed test steps are now marked with a red
xin the generated Allure report. - A failed
suite<before>now correctly causes subsequent tests to marked asfailedinstead ofskipped.
- Failed test steps are now marked with a red
- Customizability
- Added
waitForPwaElementVisibleandwaitForPwaElementNotVisibleactions.
- Added
- Modularity
- Added support for parsing of symlinked modules under
vendor.
- Added support for parsing of symlinked modules under
- Fixed a PHP Fatal error that occurred if the given
MAGENTO_BASE_URLresponded with anything but a200. - Fixed an issue where a test's
<after>would run twice with Codeception2.4.x - Fixed an issue where tests using
extendswould not correctly override parent test steps - Test actions can now send an empty string to parameterized selectors.
- #297 -- Allow = to be part of the secret value
- #267 -- Add PHPUnit missing in dependencies
- #266 -- General refactor: ext-curl dependency + review of singletones (refactor constructs)
- #264 -- Use custom Backend domain, refactoring to Executors responsible for calling HTTP endpoints
- #258 -- Removed unused variables in FunctionCommentSniff.php
- #256 -- Removed unused variables
- Fetched latest allure-codeception package
mftf run:failednow correctly regenerates tests that are in suites that were parallelized (suite=>suite_0,suite_1)
- Maintainability
- Added new
mftf run:failedcommands, which reruns all failed tests from last run configuration.
- Added new
- Fixed an issue where mftf would fail to parse test materials for extensions installed under
vendor. - Fixed a Windows compatibility issue around the use of Magento's
ComponentRegistrarto aggregate paths. - Fixed an issue where an
elementwith notypewould cause PHP warnings during test runs.
- Logic for parallel execution were updated to split default tests and suites from running in one group.
ModuleResolverwill now only scan underMAGENTO_BP/app/code/...andMAGENTO_BP/vendor/...for/Test/Mftfdirectories.- Fixed an issue where
Test.xmlfiles that did not end with*Test.xmlwould not be scanned for duplicates and other XML validation.
- Traceability
- Test generation errors output xml filename where they were encountered, as well as xml parent nodes where applicable.
- Duplicate element detection now outputs parent element where duplicate was found.
- Maintainability
- Standalone MFTF can now be pointed at a Magento installation folder to generate and execute tests.
- See DevDocs for more information.
- MFTF now checks for
testandactionGroupelements that have the samenamein the same file.
- Standalone MFTF can now be pointed at a Magento installation folder to generate and execute tests.
- Customizability
- Updated prefered syntax for
actionGrouparguments that usexml.data(old syntax is still supported)- Old:
xml.data - New:
{{xml.data}}
- Old:
- Updated prefered syntax for
- Modularity
ModuleResolvernow utilizes each Magento module'sregistration.phpto map MFTF test material directories.
- The
waitForPageLoadaction now correctly uses the giventimeoutattribute for all of its checks. - Firefox compatibility issues in javascript error logging were fixed.
- Fixed an issue where arguments containing
-would not properly resolve parameterized selectors. - Fixed an issue where actions using
parameterArraywould not resolve$persisted.data$references. - Fixed an issue where composer installations of Magento would fail to parse MFTF materials under a path
vendor/magento/module-<module>/
- Maintainability
- A
-ror--removeflag has been introduced tobin/mftfcommands to clear out the contents of the_generatedfolder before generation. This flag has been added to the following commands:generate:testsgenerate:suiterun:testrun:group
- A
- Customizability
- Persisted data handling mechanisms have been reworked.
- All persisted data is now referenced with the single
$syntax (old syntax is still supported):$persistedData.field$
- Persisted data resolution now starts in its own scope and broadens if no matching
stepKeywas found in the current scope. - Added support for referencing
suitepersisted data in tests. - Added support for removing data created in between test scopes (
test,before/after,suite).
- All persisted data is now referenced with the single
- An attribute
skipReadinesshas been added to all test actions, allowing the individual test action to completely bypass theReadinessExtensionif it is enabled.
- Persisted data handling mechanisms have been reworked.
- To prevent Allure reporting from collating tests with identical
title, thetestCaseIdannotation is now automatically prepended to thetitleannotation when tests are generated. - The
magentoCLIcommand now correctly removesindex.phpif it is present in theMAGENTO_BASE_URL. - Invalid XML errors now indicate which XML file caused the error.
- Attempting to
extenda test that does not exist now skips the generation of the test. - Fixed an issue where a
suitewould generate invalid PHP if thebeforeoraftercontained onlycreateDataactions. - Fixed an issue where a selector inside an
actionGroupwould incorrectly append theactionGroup'sstepKeyto the selector.
- Removed
PageReadinessExtensionfrom default enabled extensions due to Jenkins instability.
- MagentoWebDriver overrides
parent::_after()function and remaps torunAfter(), necessary to solve compatibility issues in Codeception2.3.x.
- Defaults in
etc/config/functional.suite.dist.ymlchanged: window-size to1280x1024, and removed--ingonitoflag.
- The
executeJsfunctionno longer escapes persisted variables referenced via$$persisted.key$$. - Extending a test no longer fails to generate the parent
test'sbefore/afterblocks if the parent was skipped.
- Maintainability
mftf build:projectnow copies over thecommand.phpfile into the parent Magento installation, if detected.
- Traceability
- MFTF now outputs generation run-time information, warnings, and errors to an
mftf.logfile. - Overall error messages for various generation errors have been improved. Usage of the
--debugflag provides file-specific errors for all XML-related errors. - Allure Reports now require a unique
storyandtitlecombination, to prevent collisions in Allure Report generation. - The
featuresannotation now ignores user input and defaults to the module the test lives under (for clear Allure organization). - The
<group value="skip"/>annotation has been replaced with a<skip>annotation, allowing for nestedIssueIdelements. - Tests now require the following annotations:
stories,title,description,severity.- This will be enforced in a future major release.
- MFTF now outputs generation run-time information, warnings, and errors to an
- Modularity
- MFTF has been decoupled from MagentoCE:
- MFTF can now generate and run tests by itself via
bin/mftfcommands. - It is now a top level MagentoCE dependency, and no longer relies on supporting files in MagentoCE.
- It can be used as an isolated dependency for Magento projects such as extensions.
- MFTF can now generate and run tests by itself via
generate:testsnow warns the user if any declared<page>has an inconsistentmodule(BackendvsMagento_Backend)- The
--forceflag now completely ignores checking of the Magento Installation, allowing generation of tests without a Magento Instance to be running.
- MFTF has been decoupled from MagentoCE:
- Customizability
- Various test materials can now be extended via an
extends="ExistingMaterial"attribute. This allows for creation of simple copies of anyentity,actionGroup, ortest, with small modifications. testandactionGroupdeltas can now be provided in bulk via abefore/afterattribute on thetestoractionGroupelement. Deltas provided this way do not need individualbefore/afterattributes, and are inserted sequentially.- Secure and sensitive test data can now be stored and used via a new
.credentialsfile, with declaration and usage syntax similar to.envfile references. - A new
<generateDate>action has been added to allow users to create and use dates according to the givendateandformat.- See DevDocs for more information on all above
Customizabilityfeatures.
- See DevDocs for more information on all above
- Various test materials can now be extended via an
- Maintainability
- New
bin/mftfcommands have been introduced with parity to existingrobocommands.robocommands are still supported, but will be deprecated in a future major release.
- The
mftf upgrade:testscommand has been introduced, which runs all test upgrade scripts against the provided path.- A new upgrade script was created to replace all test material schema paths to instead use a URN path.
- The
mftf generate:urn-catalogcommand has been introduced to create a URN catalog in PHPStorm to support the above upgrade. - A warning is now shown on generation if a page's url is referenced without specifying the url (
{{page}}vs{{page.url}}). - An error is now thrown if any test materials contain any overriding element (eg different
<element>s in a<section>with the samename)- This previously would cause the last read element to override the previous, causing a silent but potentially incorrect test addition.
- Test distribution algorithm for
--config parallelhas been enhanced to take average step length into account.
- New
_afterhook of tests now executes if a non test-related failure causes the test to error.- Fixed periods in Allure Report showing up as
•. - Fixed Windows incompatibility of relative paths in various files.
- Suites will no longer generate if they do not contain any tests.
- Fixed an issue in generation where users could not use javascript variables in
executeJSactions. - Fixed an issue in generation where entity replacement in action-groups replaced all entities with the first reference found.
- Fixed an issue in generation where
createDataactions insideactionGroupscould not properly reference the givencreateDataKey. - Fixed an issue where
suitescould not generate if they included anactionGroupwith two arguments. - Fixed an issue in generation where calling the same entity twice (with different parameters) would replace both calls with the first resolved value.
- The
magentoCLIaction now correctly executes the given command if theMAGENTO_BASE_URLcontainsindex.phpafter the domain (exhttps://magento.instance/index.php) - The
stepKeyattribute can no longer be an empty. - Variable substitution has been enabled for
regexandcommandattributes in test actions.
- #161 -- MAGETWO-46837: Implementing extension to wait for readiness metrics.
- #72 -- declare(strict_types=1) causes static code check failure (fixed in #154)
- Traceability
- Javascript errors are now logged and reported in test output.
- Test failures are no longer overwritten by failures in an
<after>hook. - Tests will no longer execute an
<after>hook twice if a failure triggered in the<after>hook. - Tests marked with
<group value="skip">will now appear in generated Allure reports.- Along with the above, the
robo groupcommand no longer omits theskipgroup (skipped tests are picked up but not fully executed).
- Along with the above, the
- Modularity
- MFTF no longer relies on relative pathing to determine its path to tests or Magento (favoring composer information if available).
- Tests and test materials are now read in from Magento modules as well as extensions in addition to
dev/tests/acceptance.- See DevDocs
Getting Startedfor details on expected paths and merge order.
- See DevDocs
- Customizability
- Creation of Suites is now supported
<suite>can include tests vianame, module, or<group>tags.- Consolidation of preconditions can be achieved via use of
<before/after>tags in a<suite>- All normal test actions are supported
- Data returned from actions is not available for reference in subsequent tests (
createDataorgrabactions).
robo generate:testsgenerates all suites and tests, and can be given a JSON configuration to generate specific test/suites.- See MFTF Devdocs "Suite" page for more details.
<deleteData>may now be called against aurlinstead of a stepKey reference.<dragAndDrop>may now be given an additionalx/yoffset.<executeJS>now returns a variable based on what the executed script returns.- Added
<element>type="block". <page>elements may now be blank (contain no child sections).
- Creation of Suites is now supported
- Maintainability
robo generate:tests --config parallelnow accepts a--linesargument, for grouping and sorting based on test length.robo generate:testsnow checks for:- Duplicate step keys within an
actionGroup. - Ambiguous or invalid
stepKeyreferences (in merge files).
- Duplicate step keys within an
robo generate:testsnow suppresses warnings by default. The command now accepts a--verboseflag to show full output including warnings.
- Exception message for the
<conditionalClick>action now correctly references theselectorgiven. - Usage of multiple parameterized elements in a
selectornow correctly resolves all element references. - Usage of multiple uniqueness references on the same entity now generate correctly.
- Persisted entity references are correctly interpolated with
<page>url oftype="admin". - Metadata that contains 2 or more params in its
urlnow correctly resolve parameters. - Arguments can now be passed to
xandyattributes inactionGroup. - Arguments can now be passed to nested
<assert*>action elements. - The
<seeInField>action can now be used to assert against empty strings. - Empty
<data>elements within an<entity>now generate correctly. - Mapping of the
<magentoCLI>to the custom command has been fixed.
- #89 -- Add ability to use array entities as arguments.
- #68 -- Excessive double quotes are being generated in WaitForElementChange method arguments (fixed in #103)
- #31 -- Can't run tests without a store having "default" store code (fixed in #86)
- Added support for PHP version 7.2
- Modularity
- MFTF now supports the existence of tests as composer package dependencies or as living alongside core modules. Supported paths:
magento2ce/vendor/[vendor]/[module]/Test/Acceptancemagento2ce/app/code/[vendor]/[module]/Test/Acceptance
- MFTF now supports the existence of tests as composer package dependencies or as living alongside core modules. Supported paths:
- Maintainability
- Robo command
generate:testsnow accepts a--nodesargument that specifies the number of test manifest files to generate for parallel configuration.
- Robo command
- Data returned by
grabandcreateDataactions can now be used in<actionGroup>test steps by theirstepKeyreference. - Fixed an issue where
<requiredEntity>elements inside<entity>data xml would overwrite one another when merged. - Fixed an issue where
<object>elements inside<operation>metadata xml would overwrite one another when merged. - Nested assertion syntax now correctly allows for values passed in to resolve
{{entity.data}}references. - Test action
<selectMultiOption>now correctly resolves entity references passed in tofilterSelectorandoptionSelector. - The robo command
generate:tests --forceno longer requires aMAGENTO_BASE_URLto be defined in the.envfile. - All
featureandstoryannotations now live under in the method and not class level in output test php.- This is to work around a bug with the Allure-Codeception adapter version
1.2.6, which was a dependency update in MFTF2.1.0.
- This is to work around a bug with the Allure-Codeception adapter version
- Traceability
- Severity in
<annotation>tags now properly reflect Magento severity values.
- Severity in
- Modularity
- Added ability to pass in simple values to actionGroups via addition of
typeattribute in actionGroup<argument>declaration.- For examples, see devdocs article on actionGroups.
- Merging resolution now depends on Magento instance's installed modules. This also means merging order now follows the expected module merging order.
- Added ability to pass in simple values to actionGroups via addition of
- Customizability
- Added
<assertArrayIsSorted>action. This action takes in an array of data and asserts that the array is properly sorted, according to the providedsortOrder - Added
<selectMultipleOptions>action. This is a variation of<searchAndSelectOptions>that is given afilterSelector,optionSelector, and an<array>of options to select.- For a working sample, see
SearchAndMultiselectActionGroup.xmlunderCatalogin magento2ce.
- For a working sample, see
- Test actions that deal with
<url...>now utilize and grab the page's full url, not just the/path?query#fragmentportion. - All
<assert...>actions support a clearer, more readable nested syntax.- Both old and new syntax are supported. See devdocs
Assertionsarticle for examples.
- Both old and new syntax are supported. See devdocs
- Added support for overriding a data-entity's
fieldvalues during test runtime, prior to persistence via<createData>actions. - Added
removeBackend="true"attribute to<operation>. Only applicable tooperationdefinitions oftype="adminFormKey", attribute prevents pre-pending ofMAGENTO_BACKEND_NAMEto theurlspecified.- Specific to use case where
adminFormKeyoperations don't followMAGENTO_BASE_URL/MAGENTO_BACKEND_NAME/MAGENTO_BACKEND_NAME/API_URLformat.
- Specific to use case where
- Added
- Readability
- Data Entities used in tests (
<test>,<page>,<section>,<element>,<data>) now require alphanumeric naming.
- Data Entities used in tests (
- Maintainability
- Documentation for all test actions have been added to XML schema. Turning on documentation hinting will display relevant information while writing test XML.
- All references to
.envfile contents are now resolved at test runtime, as opposed to generation.
- Fixed an issue with using the character
-in parameterized selector references.- Users should now be able to use any characters except for
'when providing a'stringLiteral'to a parameterized selector/url.
- Users should now be able to use any characters except for
- Fixed an issue where entity substitution was not enabled in all
<assert...>test actions.
- Readability
- Added the ability to refer to
custom_attributedata in persisted entities viakeyinstead of index.- ex.
url_keyin category entity:$category.custom_attributes[3][value]$and$category.custom_attributes[url_key]$are both valid.
- ex.
- Added the ability to refer to
- Maintainability
- Added check for duplicate
stepKeyattributes at test generation. This check is scoped to<testAction>tags within a single<test>tag in a single file.
- Added check for duplicate
- Fixed inability to use
<actionGroup>with<arguments>in test hooks. - Fixed inability to use
0as data in an entity. - Fixed an issue where using
<annotation>tag of<useCaseId>would cause test generation failures. - Fixed an issue where the
<closeAdminNotification>action could not be used twice in in a<test>. - Fixed an issue where specifying duplicate test actions in test delta's would cause generation errors.
- Fixed an issue where test failure screenshots were being taken at the end of the test hook, as opposed to at the point of failure.
- Operation
metadatawith anauthof typeadminFormKeywill now automatically append specifiedMAGENTO_BACKEND_NAMEif necessary.
- Customizability
- Added the
<magentoCLI>test action. Action takes the givencommand=""and passes it for execution in Magento Environment.- Note: Installation step to enable above action has been added. See
Step 5in the MFTFGetting Startedarticle.
- Note: Installation step to enable above action has been added. See
- Added the
- Maintainability
- Tests now run actions declared in
<after>hook in both successful and failed test runs.
- Tests now run actions declared in
- Fixed inability to use
[]characters within selector/url parameters. - Fixed a bug where the
<formatMoney>action did not return a variable for test use. - Fixed a bug where the
<waitForLoadingMaskToDisappear>action could not be used twice in an<actionGroup>.
- Fixed an issue with
groupannotation.
- Modularity
- Replaced the
<loginAsAdmin>test action with the action groupLoginAsAdmin. - Added the
.envfile variableCUSTOM_MODULE_PATHSwhich can be used to point to any custom extensions that you may want to write tests against. - Added the
<page area="..">property to distinguish between admin and storefront. - Added support for
SectionName.elementNamereferences in anyfunctionattributes.
- Replaced the
- Customizability
- Changed page objects where
area="admin"to prepend theMAGENTO_BACKEND_NAMEvalue from the.envfile. - Added support for HTTP requests that do not require authentication.
- Changed page objects where
- Readability
- Renamed
<config>XML root nodes to match the content they contain, e.g.<tests>or<pages>. - Renamed all instances of the word Cest with Test. The Cest name will no longer be used in the MFTF project.
- Renamed
- Maintainability
- Removed the
returnVariableproperty from any test actions that return values. Instead, thestepKeyproperty will be used as the name of the variable and be referenced as before.
- Removed the
- Fixed the
unselectOption.parameterArrayproperty to work as expected. - Fixed a crash if you had a system environment variable set with the same name as any variable in the
.envfile. - Fixed any actions that refer to CurrentUrl, such as
<seeInCurrentUrl>, to now look at the full webdriver address. - Fixed the
<waitForPageLoad>test action to not assume that you always want to dismiss UI notifications.
- Traceability for clear logging and reporting capabilities
- Modularity to run tests based on modules/extensions installed
- Customizability to have an ability to customize existed tests
- Readability using clear declarative XML test steps
- Maintainability based on simple test creation and overall structure
- Windows 10
- macOS Sierra
- Chrome (Latest) with ChromeDriver Latest
- Support for Firefox is currently incomplete. This will be resolved to support Firefox 57 (Quantum) and latest Gecko driver in next minor release.
MAGENTO_BASE_URLin .env file must have/at the end. Example: http://magento.com/