Skip to content

Commit 2e81113

Browse files
authored
Merge pull request #178 from magento/develop
MQE-1114: Merge the release branch to master
2 parents 4177204 + e95107f commit 2e81113

File tree

302 files changed

+11237
-3131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

302 files changed

+11237
-3131
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ coverage/
1313
.vscode
1414
codeception.yml
1515
dev/tests/functional/MFTF.suite.yml
16-
dev/tests/functional/_output
16+
dev/tests/functional/_output
17+
dev/mftf.log
18+
dev/tests/mftf.log

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,59 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
2.3.0
5+
-----
6+
### Enhancements
7+
* Traceability
8+
* MFTF now outputs generation run-time information, warnings, and errors to an `mftf.log` file.
9+
* Overall error messages for various generation errors have been improved. Usage of the `--debug` flag provides file-specific errors for all XML-related errors.
10+
* Allure Reports now require a unique `story` and `title` combination, to prevent collisions in Allure Report generation.
11+
* The `features` annotation now ignores user input and defaults to the module the test lives under (for clear Allure organization).
12+
* The `<group value="skip"/>` annotation has been replaced with a `<skip>` annotation, allowing for nested `IssueId` elements.
13+
* Tests now require the following annotations: `stories`, `title`, `description`, `severity`.
14+
* This will be enforced in a future major release.
15+
* Modularity
16+
* MFTF has been decoupled from MagentoCE:
17+
* MFTF can now generate and run tests by itself via `bin/mftf` commands.
18+
* It is now a top level MagentoCE dependency, and no longer relies on supporting files in MagentoCE.
19+
* It can be used as an isolated dependency for Magento projects such as extensions.
20+
* `generate:tests` now warns the user if any declared `<page>` has an inconsistent `module` (`Backend` vs `Magento_Backend`)
21+
* The `--force` flag now completely ignores checking of the Magento Installation, allowing generation of tests without a Magento Instance to be running.
22+
* Customizability
23+
* Various test materials can now be extended via an `extends="ExistingMaterial"` attribute. This allows for creation of simple copies of any `entity`, `actionGroup`, or `test`, with small modifications.
24+
* `test` and `actionGroup` deltas can now be provided in bulk via a `before/after` attribute on the `test` or `actionGroup` element. Deltas provided this way do not need individual `before/after` attributes, and are inserted sequentially.
25+
* Secure and sensitive test data can now be stored and used via a new `.credentials` file, with declaration and usage syntax similar to `.env` file references.
26+
* A new `<generateDate>` action has been added to allow users to create and use dates according to the given `date` and `format`.
27+
* See DevDocs for more information on all above `Customizability` features.
28+
* Maintainability
29+
* New `bin/mftf` commands have been introduced with parity to existing `robo` commands.
30+
* `robo` commands are still supported, but will be deprecated in a future major release.
31+
* The `mftf upgrade:tests` command has been introduced, which runs all test upgrade scripts against the provided path.
32+
* A new upgrade script was created to replace all test material schema paths to instead use a URN path.
33+
* The `mftf generate:urn-catalog` command has been introduced to create a URN catalog in PHPStorm to support the above upgrade.
34+
* A warning is now shown on generation if a page's url is referenced without specifying the url (`{{page}}` vs `{{page.url}}`).
35+
* An error is now thrown if any test materials contain any overriding element (eg different `<element>`s in a `<section>` with the same `name`)
36+
* This previously would cause the last read element to override the previous, causing a silent but potentially incorrect test addition.
37+
* Test distribution algorithm for `--config parallel` has been enhanced to take average step length into account.
38+
39+
### Fixes
40+
* `_after` hook of tests now executes if a non test-related failure causes the test to error.
41+
* Fixed periods in Allure Report showing up as ``.
42+
* Fixed Windows incompatibility of relative paths in various files.
43+
* Suites will no longer generate if they do not contain any tests.
44+
* Fixed an issue in generation where users could not use javascript variables in `executeJS` actions.
45+
* Fixed an issue in generation where entity replacement in action-groups replaced all entities with the first reference found.
46+
* Fixed an issue in generation where `createData` actions inside `actionGroups` could not properly reference the given `createDataKey`.
47+
* Fixed an issue where `suites` could not generate if they included an `actionGroup` with two arguments.
48+
* Fixed an issue in generation where calling the same entity twice (with different parameters) would replace both calls with the first resolved value.
49+
* The `magentoCLI` action now correctly executes the given command if the `MAGENTO_BASE_URL` contains `index.php` after the domain (ex `https://magento.instance/index.php`)
50+
* The `stepKey` attribute can no longer be an empty.
51+
* Variable substitution has been enabled for `regex` and `command` attributes in test actions.
52+
53+
### GitHub Issues/Pull requests:
54+
* [#161](https://github.com/magento/magento2-functional-testing-framework/pull/161) -- MAGETWO-46837: Implementing extension to wait for readiness metrics.
55+
* [#72](https://github.com/magento/magento2-functional-testing-framework/issues/72) -- declare(strict_types=1) causes static code check failure (fixed in [#154](https://github.com/magento/magento2-functional-testing-framework/pull/154))
56+
457
2.2.0
558
-----
659
### Enhancements

RoboFile.php

Lines changed: 0 additions & 214 deletions
This file was deleted.

bin/all-checks.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:: Copyright © Magento, Inc. All rights reserved.
2+
:: See COPYING.txt for license details.
3+
4+
@echo off
5+
call bin\static-checks.bat
6+
7+
@echo off
8+
call bin\phpunit-checks.bat

bin/blacklist.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# THIS FILE CANNOT CONTAIN BLANK LINES #
55
###################################################################
66
bin/blacklist.txt
7-
dev/tests/static/Magento/Sniffs/Annotations/Helper.php
8-
dev/tests/static/Magento/Sniffs/Annotations/RequireAnnotatedAttributesSniff.php
9-
dev/tests/static/Magento/Sniffs/Annotations/RequireAnnotatedMethodsSniff.php
7+
dev/tests/static/Magento/Sniffs/Commenting/FunctionCommentSniff.php
8+
dev/tests/static/Magento/Sniffs/Commenting/VariableCommentSniff.php
109
dev/tests/verification/_generated

bin/copyright-check.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
:: Copyright © Magento, Inc. All rights reserved.
2+
:: See COPYING.txt for license details.
3+
4+
@echo off
5+
SETLOCAL EnableDelayedExpansion
6+
SET BLACKLIST_FILE=bin/blacklist.txt
7+
SET i=0
8+
9+
FOR /F %%x IN ('git ls-tree --full-tree -r --name-only HEAD') DO (
10+
SET GOOD_EXT=
11+
if "%%~xx"==".php" set GOOD_EXT=1
12+
if "%%~xx"==".xml" set GOOD_EXT=1
13+
if "%%~xx"==".xsd" set GOOD_EXT=1
14+
IF DEFINED GOOD_EXT (
15+
SET BLACKLISTED=
16+
FOR /F "tokens=* skip=5" %%f IN (%BLACKLIST_FILE%) DO (
17+
SET LINE=%%x
18+
IF NOT "!LINE!"=="!LINE:%%f=!" (
19+
SET BLACKLISTED=1
20+
)
21+
)
22+
IF NOT DEFINED BLACKLISTED (
23+
FIND "Copyright © Magento, Inc. All rights reserved." %%x >nul
24+
IF ERRORLEVEL 1 (
25+
SET /A i+=1
26+
SET NO_COPYRIGHT_LIST[!i!]=%%x
27+
)
28+
)
29+
)
30+
)
31+
32+
IF DEFINED NO_COPYRIGHT_LIST[1] (
33+
ECHO THE FOLLOWING FILES ARE MISSING THE MAGENTO COPYRIGHT:
34+
ECHO.
35+
ECHO Copyright © Magento, Inc. All rights reserved.
36+
ECHO See COPYING.txt for license details.
37+
ECHO.
38+
FOR /L %%a IN (1,1,%i%) DO (
39+
ECHO !NO_COPYRIGHT_LIST[%%a]!
40+
)
41+
)

bin/mftf

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,30 @@ if (PHP_SAPI !== 'cli') {
1111
exit(1);
1212
}
1313

14+
$autoloadPath = realpath(__DIR__ . '/../../../autoload.php');
15+
$testBootstrapPath = realpath(__DIR__ . '/../dev/tests/functional/_bootstrap.php');
16+
17+
try {
18+
if (file_exists($autoloadPath)) {
19+
require_once $autoloadPath;
20+
} else {
21+
require_once $testBootstrapPath;
22+
}
23+
} catch (\Exception $e) {
24+
echo 'Autoload error: ' . $e->getMessage();
25+
exit(1);
26+
}
27+
28+
1429
try {
15-
require_once __DIR__ . '/../bootstrap.php';
1630
$application = new Symfony\Component\Console\Application();
1731
$application->setName('Magento Functional Testing Framework CLI');
18-
$application->setVersion('1.0.0');
19-
$application->add(new Magento\FunctionalTestingFramework\Console\SetupEnvCommand());
20-
$application->add(new Magento\FunctionalTestingFramework\Console\BuildProjectCommand());
32+
$application->setVersion('2.3.0');
33+
/** @var \Magento\FunctionalTestingFramework\Console\CommandListInterface $commandList */
34+
$commandList = new \Magento\FunctionalTestingFramework\Console\CommandList;
35+
foreach ($commandList->getCommands() as $command) {
36+
$application->add($command);
37+
}
2138
$application->run();
2239
} catch (\Exception $e) {
2340
while ($e) {

0 commit comments

Comments
 (0)