Skip to content

Commit f56c556

Browse files
authored
Merge pull request magento#596 from magento/2.6.1-RC
2.6.1 rc
2 parents 3609f4f + 4bc7155 commit f56c556

14 files changed

+163
-66
lines changed

Diff for: CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
2.6.1
5+
-----
6+
7+
* Usability
8+
* Introduced new `.env` configuration `ELASTICSEARCH_VERSION` to support multiple elasticsearch versions
9+
* Maintainability
10+
* Added deprecation notices for upcoming MFTF 3.0.0
11+
* Replaced facebook webdriver with php-webdriver to support PHP version updates
12+
413
2.6.0
514
-----
615

Diff for: composer.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "2.6.0",
5+
"version": "2.6.1",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {
@@ -25,7 +25,8 @@
2525
"monolog/monolog": "^1.0",
2626
"mustache/mustache": "~2.5",
2727
"symfony/process": "^2.8 || ^3.1 || ^4.0",
28-
"vlucas/phpdotenv": "^2.4"
28+
"vlucas/phpdotenv": "^2.4",
29+
"php-webdriver/webdriver": "^1.8.0"
2930
},
3031
"require-dev": {
3132
"squizlabs/php_codesniffer": "~3.2",
@@ -44,6 +45,9 @@
4445
"suggest": {
4546
"epfremme/swagger-php": "^2.0"
4647
},
48+
"replace": {
49+
"facebook/webdriver": "^1.7.1"
50+
},
4751
"autoload": {
4852
"files": ["src/Magento/FunctionalTestingFramework/_bootstrap.php"],
4953
"psr-4": {

Diff for: composer.lock

+66-62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dev/tests/verification/Resources/BasicFunctionalTest.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId;
1515
/**
1616
* @Title("[NO TESTCASEID]: A Functional Cest")
1717
* @group functional
18-
* @Description("<h3>Test files</h3>verification/TestModule/Test/BasicFunctionalTest.xml<br>")
18+
* @Description("<h3 class='y-label y-label_status_broken'>Deprecated Notice(s):</h3><ul><li>DEPRECATED ACTION in Test: at step performOnKey1 "performOn" is DEPRECATED and will be removed in MFTF 3.0.0.</li></ul><h3>Test files</h3>verification/TestModule/Test/BasicFunctionalTest.xml<br>")
1919
*/
2020
class BasicFunctionalTestCest
2121
{

Diff for: dev/tests/verification/Resources/ExecuteInSeleniumTest.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use Yandex\Allure\Adapter\Model\SeverityLevel;
1313
use Yandex\Allure\Adapter\Annotation\TestCaseId;
1414

1515
/**
16-
* @Description("<h3>Test files</h3>verification/TestModule/Test/ExecuteInSeleniumTest.xml<br>")
16+
* @Description("<h3 class='y-label y-label_status_broken'>Deprecated Notice(s):</h3><ul><li>DEPRECATED ACTION in Test: at step executeInSeleniumStep "executeInSelenium" is DEPRECATED and will be removed in MFTF 3.0.0.</li></ul><h3>Test files</h3>verification/TestModule/Test/ExecuteInSeleniumTest.xml<br>")
1717
*/
1818
class ExecuteInSeleniumTestCest
1919
{

Diff for: docs/test/actions.md

+4
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,8 @@ Attribute|Type|Use|Description
973973

974974
### executeInSelenium
975975

976+
#### NOTE: `executeInSelenium` action is DEPRECATED and will be removed in MFTF 3.0.0.
977+
976978
See [executeInSelenium docs on codeception.com](http://codeception.com/docs/modules/WebDriver#executeInSelenium).
977979

978980
Attribute|Type|Use|Description
@@ -1460,6 +1462,8 @@ Attribute|Type|Use|Description
14601462

14611463
### performOn
14621464

1465+
#### NOTE: `performOn` action is DEPRECATED and will be removed in MFTF 3.0.0.
1466+
14631467
See [performOn docs on codeception.com](http://codeception.com/docs/modules/WebDriver#performOn).
14641468

14651469
Attribute|Type|Use|Description

Diff for: etc/config/.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@ MODULE_WHITELIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProdu
6363
#ENABLE_BROWSER_LOG=true
6464
#BROWSER_LOG_BLACKLIST=other
6565

66+
#*** Elastic Search version used for test ***#
67+
ELASTICSEARCH_VERSION=7
6668
#*** End of .env ***#

Diff for: src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php

+45
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,31 @@
1212
use Magento\FunctionalTestingFramework\Test\Handlers\TestObjectHandler;
1313
use Magento\FunctionalTestingFramework\Util\Path\FilePathFormatter;
1414
use Symfony\Component\Console\Command\Command;
15+
use Symfony\Component\Console\Input\InputInterface;
1516
use Symfony\Component\Console\Input\InputOption;
1617
use Symfony\Component\Console\Output\OutputInterface;
1718
use Magento\FunctionalTestingFramework\Util\Filesystem\DirSetupUtil;
1819
use Magento\FunctionalTestingFramework\Util\TestGenerator;
1920
use Magento\FunctionalTestingFramework\Config\MftfApplicationConfig;
2021
use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler;
22+
use Symfony\Component\Console\Style\SymfonyStyle;
2123

2224
class BaseGenerateCommand extends Command
2325
{
26+
const MFTF_3_O_0_DEPRECATION_MESSAGE = "MFTF NOTICES:\n"
27+
. "DEPRECATED ACTIONS: \"executeInSelenium\" and \"performOn\" actions will be removed in MFTF 3.0.0\n"
28+
. "DEPRECATED TEST PATH: support for \"dev/tests/acceptance/tests/functional/Magento/FunctionalTest will be "
29+
. "removed in MFTF 3.0.0\n"
30+
. "XSD schema change to only allow single entity per xml file for all entities except data and metadata in "
31+
. "MFTF 3.0.0\n";
32+
33+
/**
34+
* Console output style
35+
*
36+
* @var SymfonyStyle
37+
*/
38+
private $ioStyle = null;
39+
2440
/**
2541
* Configures the base command.
2642
*
@@ -178,4 +194,33 @@ protected function getGroupAndSuiteConfiguration(array $groupOrSuiteNames)
178194
$json = json_encode($result);
179195
return $json;
180196
}
197+
198+
/**
199+
* Set Symfony Style for output
200+
*
201+
* @param InputInterface $input
202+
* @param OutputInterface $output
203+
*/
204+
protected function setOutputStyle(InputInterface $input, OutputInterface $output)
205+
{
206+
// For output style
207+
if (null === $this->ioStyle) {
208+
$this->ioStyle = new SymfonyStyle($input, $output);
209+
}
210+
}
211+
212+
/**
213+
* Show predefined global notice messages
214+
*
215+
* @param OutputInterface $output
216+
* @return void
217+
*/
218+
protected function showMftfNotices(OutputInterface $output)
219+
{
220+
if (null !== $this->ioStyle) {
221+
$this->ioStyle->note(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
222+
} else {
223+
$output->writeln(self::MFTF_3_O_0_DEPRECATION_MESSAGE);
224+
}
225+
}
181226
}

Diff for: src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
5858
$allowSkipped
5959
);
6060

61+
$this->setOutputStyle($input, $output);
62+
$this->showMftfNotices($output);
63+
6164
// Remove previous GENERATED_DIR if --remove option is used
6265
if ($remove) {
6366
$this->removeGeneratedDirectory($output, $output->isVerbose());

Diff for: src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
8282
$allowSkipped
8383
);
8484

85+
$this->setOutputStyle($input, $output);
86+
$this->showMftfNotices($output);
87+
8588
if (!empty($tests)) {
8689
$json = $this->getTestAndSuiteConfiguration($tests);
8790
}

Diff for: src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8484
$allowSkipped
8585
);
8686

87+
$this->setOutputStyle($input, $output);
88+
$this->showMftfNotices($output);
89+
8790
$testConfiguration = $this->getTestAndSuiteConfiguration($tests);
8891

8992
if (!$skipGeneration) {

Diff for: src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9696
$allowSkipped
9797
);
9898

99+
$this->setOutputStyle($input, $output);
100+
$this->showMftfNotices($output);
101+
99102
$testConfiguration = $this->getFailedTestList();
100103

101104
if ($testConfiguration === null) {

Diff for: src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7979
$allowSkipped
8080
);
8181

82+
$this->setOutputStyle($input, $output);
83+
$this->showMftfNotices($output);
84+
8285
if (!$skipGeneration) {
8386
$testConfiguration = $this->getGroupAndSuiteConfiguration($groups);
8487
$command = $this->getApplication()->find('generate:tests');

Diff for: src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

+14
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class TestGenerator
5959
const ARRAY_WRAP_OPEN = '[';
6060
const ARRAY_WRAP_CLOSE = ']';
6161

62+
const MFTF_3_O_0_DEPRECATION_MESSAGE = ' is DEPRECATED and will be removed in MFTF 3.0.0.';
63+
6264
/**
6365
* Actor name for AcceptanceTest
6466
*
@@ -1041,6 +1043,8 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato
10411043
);
10421044
break;
10431045
case "executeInSelenium":
1046+
$this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"executeInSelenium\""
1047+
. self::MFTF_3_O_0_DEPRECATION_MESSAGE;
10441048
$testSteps .= $this->wrapFunctionCall($actor, $actionObject, $function);
10451049
break;
10461050
case "executeJS":
@@ -1052,6 +1056,16 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato
10521056
);
10531057
break;
10541058
case "performOn":
1059+
$this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"performOn\""
1060+
. self::MFTF_3_O_0_DEPRECATION_MESSAGE;
1061+
$testSteps .= $this->wrapFunctionCall(
1062+
$actor,
1063+
$actionObject,
1064+
$selector,
1065+
$function,
1066+
$time
1067+
);
1068+
break;
10551069
case "waitForElementChange":
10561070
$testSteps .= $this->wrapFunctionCall(
10571071
$actor,

0 commit comments

Comments
 (0)