From 309a1f256f24f599355dcddcf3b5364206119692 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Tue, 4 Feb 2020 15:00:06 -0600 Subject: [PATCH 01/18] Remove ref files from repo. --- docs/actiongroup-list.md | 6 ------ docs/mftf-tests.md | 30 ------------------------------ 2 files changed, 36 deletions(-) delete mode 100644 docs/actiongroup-list.md delete mode 100644 docs/mftf-tests.md diff --git a/docs/actiongroup-list.md b/docs/actiongroup-list.md deleted file mode 100644 index 7b469f4ed..000000000 --- a/docs/actiongroup-list.md +++ /dev/null @@ -1,6 +0,0 @@ -# MFTF action group reference - -Action groups are important building blocks for quickly creating tests for the Magento Functional Testing Framework. -This page lists all current action groups so developers can see what is available to them. - -{% include mftf/actiongroup_data.md %} diff --git a/docs/mftf-tests.md b/docs/mftf-tests.md deleted file mode 100644 index cb1941053..000000000 --- a/docs/mftf-tests.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# MFTF functional test reference - -The Magento Functional Testing Framework runs tests on every Module within Magento. These files are stored within each Module folder in the Magento repo. -This page lists all those tests so that developers can have a good sense of what is covered. - -{% include mftf/functional_data.md %} - -{% for item in mftf %} - -### {{ item.name }} -{% for file in item.items %} -#### [{{ file.filename }}]({{file.repo}}) -{: .mftf-test-link} - -{% for test in file.tests %} -{{test.testname}} - : {{test.description}} -{: .mftf-dl} -{% endfor %} -{% endfor %} -{% endfor %} From c67ffdd9f238706a17ee0f4bd3ed7f0688b2cf47 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 6 Feb 2020 16:11:29 -0600 Subject: [PATCH 02/18] MQE-1986: Mark `executeInSelenium` and `performOn` as deprecated in MFTF --- docs/test/actions.md | 4 ++ .../Console/BaseGenerateCommand.php | 41 +++++++++++++++++++ .../Console/GenerateSuiteCommand.php | 3 ++ .../Console/GenerateTestsCommand.php | 3 ++ .../Console/RunTestCommand.php | 3 ++ .../Console/RunTestFailedCommand.php | 3 ++ .../Console/RunTestGroupCommand.php | 3 ++ .../Util/TestGenerator.php | 14 +++++++ 8 files changed, 74 insertions(+) diff --git a/docs/test/actions.md b/docs/test/actions.md index 59fd12aa2..b3aec7204 100644 --- a/docs/test/actions.md +++ b/docs/test/actions.md @@ -973,6 +973,8 @@ Attribute|Type|Use|Description ### executeInSelenium +#### NOTE: `executeInSelenium` action is DEPRECATED and will be removed in MFTF 3.0.0. + See [executeInSelenium docs on codeception.com](http://codeception.com/docs/modules/WebDriver#executeInSelenium). Attribute|Type|Use|Description @@ -1460,6 +1462,8 @@ Attribute|Type|Use|Description ### performOn +#### NOTE: `performOn` action is DEPRECATED and will be removed in MFTF 3.0.0. + See [performOn docs on codeception.com](http://codeception.com/docs/modules/WebDriver#performOn). Attribute|Type|Use|Description diff --git a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php index a0d94b16e..c33b956fb 100644 --- a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php @@ -12,15 +12,27 @@ use Magento\FunctionalTestingFramework\Test\Handlers\TestObjectHandler; use Magento\FunctionalTestingFramework\Util\Path\FilePathFormatter; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Magento\FunctionalTestingFramework\Util\Filesystem\DirSetupUtil; use Magento\FunctionalTestingFramework\Util\TestGenerator; use Magento\FunctionalTestingFramework\Config\MftfApplicationConfig; use Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler; +use Symfony\Component\Console\Style\SymfonyStyle; class BaseGenerateCommand extends Command { + const MFTF_3_O_0_DEPRECATION_MESSAGE = "MFTF NOTICES:\n" + . "\"executeInSelenium\" and \"performOn\" actions are DEPRECATED and will be removed in MFTF 3.0.0\n"; + + /** + * Console output style + * + * @var SymfonyStyle + */ + private $ioStyle = null; + /** * Configures the base command. * @@ -178,4 +190,33 @@ protected function getGroupAndSuiteConfiguration(array $groupOrSuiteNames) $json = json_encode($result); return $json; } + + /** + * Set Symfony Style for output + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function setOutputStyle(InputInterface $input, OutputInterface $output) + { + // For output style + if (null === $this->ioStyle) { + $this->ioStyle = new SymfonyStyle($input, $output); + } + } + + /** + * Show predefined global notice messages + * + * @param OutputInterface $output + * @return void + */ + protected function showMftfNotices(OutputInterface $output) + { + if (null !== $this->ioStyle) { + $this->ioStyle->note(self::MFTF_3_O_0_DEPRECATION_MESSAGE); + } else { + $output->writeln(self::MFTF_3_O_0_DEPRECATION_MESSAGE); + } + } } diff --git a/src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php b/src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php index 8da3493aa..2c91aa7f7 100644 --- a/src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/GenerateSuiteCommand.php @@ -58,6 +58,9 @@ protected function execute(InputInterface $input, OutputInterface $output) $allowSkipped ); + $this->setOutputStyle($input, $output); + $this->showMftfNotices($output); + // Remove previous GENERATED_DIR if --remove option is used if ($remove) { $this->removeGeneratedDirectory($output, $output->isVerbose()); diff --git a/src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php b/src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php index 621f29d03..b9378edc1 100644 --- a/src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/GenerateTestsCommand.php @@ -82,6 +82,9 @@ protected function execute(InputInterface $input, OutputInterface $output) $allowSkipped ); + $this->setOutputStyle($input, $output); + $this->showMftfNotices($output); + if (!empty($tests)) { $json = $this->getTestAndSuiteConfiguration($tests); } diff --git a/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php b/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php index 373256cfc..08b84d6a1 100644 --- a/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php @@ -84,6 +84,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $allowSkipped ); + $this->setOutputStyle($input, $output); + $this->showMftfNotices($output); + $testConfiguration = $this->getTestAndSuiteConfiguration($tests); if (!$skipGeneration) { diff --git a/src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php b/src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php index 5f0596a7f..1909c7e0b 100644 --- a/src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/RunTestFailedCommand.php @@ -96,6 +96,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $allowSkipped ); + $this->setOutputStyle($input, $output); + $this->showMftfNotices($output); + $testConfiguration = $this->getFailedTestList(); if ($testConfiguration === null) { diff --git a/src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php b/src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php index 6ea37785d..be6236c73 100644 --- a/src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/RunTestGroupCommand.php @@ -79,6 +79,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $allowSkipped ); + $this->setOutputStyle($input, $output); + $this->showMftfNotices($output); + if (!$skipGeneration) { $testConfiguration = $this->getGroupAndSuiteConfiguration($groups); $command = $this->getApplication()->find('generate:tests'); diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index e40f60dcf..527ed7323 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -59,6 +59,8 @@ class TestGenerator const ARRAY_WRAP_OPEN = '['; const ARRAY_WRAP_CLOSE = ']'; + const MFTF_3_O_0_DEPRECATION_MESSAGE = ' is DEPRECATED and will be removed in MFTF 3.0.0.'; + /** * Actor name for AcceptanceTest * @@ -1041,6 +1043,8 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "executeInSelenium": + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"executeInSelenium\"" + . self::MFTF_3_O_0_DEPRECATION_MESSAGE; $testSteps .= $this->wrapFunctionCall($actor, $actionObject, $function); break; case "executeJS": @@ -1052,6 +1056,16 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "performOn": + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"performOn\"" + . self::MFTF_3_O_0_DEPRECATION_MESSAGE; + $testSteps .= $this->wrapFunctionCall( + $actor, + $actionObject, + $selector, + $function, + $time + ); + break; case "waitForElementChange": $testSteps .= $this->wrapFunctionCall( $actor, From 165ed37bb4e02f4e8b5f993db99056926afdc017 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 6 Feb 2020 16:29:01 -0600 Subject: [PATCH 03/18] MQE-1989: added deprecation notices for upcoming MFTF 3.0.0 changes. --- .../Console/BaseGenerateCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php index c33b956fb..889f631cc 100644 --- a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php @@ -24,7 +24,10 @@ class BaseGenerateCommand extends Command { const MFTF_3_O_0_DEPRECATION_MESSAGE = "MFTF NOTICES:\n" - . "\"executeInSelenium\" and \"performOn\" actions are DEPRECATED and will be removed in MFTF 3.0.0\n"; + . "DEPRECATED ACTIONS: \"executeInSelenium\" and \"performOn\" actions will be removed in MFTF 3.0.0\n" + . "DEPRECATED TEST PATH: \"dev/tests/acceptance/tests/functional/Magento/FunctionalTest will not be read" + . " in MFTF 3.0.0 and after\n" + . "Single entity per xml file for all entities except data and metadata in MFTF 3.0.0 and after\n"; /** * Console output style From efe681606adae0b93be8051f57f78bc55f58bd92 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 6 Feb 2020 16:36:32 -0600 Subject: [PATCH 04/18] MQE-1992: Add new environment variable ELASTICSEARCH_VERSION and set default value to 7 --- etc/config/.env.example | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/config/.env.example b/etc/config/.env.example index f5b6ef40e..349d7da9c 100644 --- a/etc/config/.env.example +++ b/etc/config/.env.example @@ -63,4 +63,6 @@ MODULE_WHITELIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProdu #ENABLE_BROWSER_LOG=true #BROWSER_LOG_BLACKLIST=other +#*** Elastic Search version used for test ***# +ELASTICSEARCH_VERSION=7 #*** End of .env ***# From db705788997330a43e5eb3f4b5c008f53029ec05 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 6 Feb 2020 17:09:51 -0600 Subject: [PATCH 05/18] MQE-1986: Mark `executeInSelenium` and `performOn` as deprecated in MFTF --- dev/tests/verification/Resources/BasicFunctionalTest.txt | 2 +- dev/tests/verification/Resources/ExecuteInSeleniumTest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/verification/Resources/BasicFunctionalTest.txt b/dev/tests/verification/Resources/BasicFunctionalTest.txt index ac42f395e..e76e409d0 100644 --- a/dev/tests/verification/Resources/BasicFunctionalTest.txt +++ b/dev/tests/verification/Resources/BasicFunctionalTest.txt @@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId; /** * @Title("[NO TESTCASEID]: A Functional Cest") * @group functional - * @Description("

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step performOnKey1 "performOn" is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") */ class BasicFunctionalTestCest { diff --git a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt index bbed61691..48b818200 100644 --- a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt +++ b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt @@ -13,7 +13,7 @@ use Yandex\Allure\Adapter\Model\SeverityLevel; use Yandex\Allure\Adapter\Annotation\TestCaseId; /** - * @Description("

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step executeInSeleniumStep "executeInSelenium" is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") */ class ExecuteInSeleniumTestCest { From 93654b8f69f3964b3f8fdd1dc14a5624a071f4d0 Mon Sep 17 00:00:00 2001 From: Donald Booth Date: Fri, 7 Feb 2020 11:51:23 -0600 Subject: [PATCH 06/18] Updated example code --- docs/test/actions.md | 45 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/docs/test/actions.md b/docs/test/actions.md index 59fd12aa2..6ec519b0f 100644 --- a/docs/test/actions.md +++ b/docs/test/actions.md @@ -22,13 +22,13 @@ This step can be referenced within the test using `conditionalClickStep1`. The value format should met the following principles: -* Must be unique within [``](../test.md#test-tag). -* Naming should be as descriptive as possible: - * Describe the action performed. - * Briefly describe the purpose. - * Describe which data is in use. -* Should be in camelCase with lowercase first letter. -* Should be the last attribute of an element. +* Must be unique within [``](../test.md#test-tag). +* Naming should be as descriptive as possible: + * Describe the action performed. + * Briefly describe the purpose. + * Describe which data is in use. +* Should be in camelCase with lowercase first letter. +* Should be the last attribute of an element. ### `before` and `after` @@ -142,14 +142,14 @@ Here, [``](#click) performs a click on a button that can be found by the The following test actions return a variable: -* [grabAttributeFrom](#grabattributefrom) -* [grabCookie](#grabcookie) -* [grabFromCurrentUrl](#grabfromcurrenturl) -* [grabMultiple](#grabmultiple) -* [grabPageSource](#grabpagesource) -* [grabTextFrom](#grabtextfrom) -* [grabValueFrom](#grabvaluefrom) -* [executeJS](#executejs) +* [grabAttributeFrom](#grabattributefrom) +* [grabCookie](#grabcookie) +* [grabFromCurrentUrl](#grabfromcurrenturl) +* [grabMultiple](#grabmultiple) +* [grabPageSource](#grabpagesource) +* [grabTextFrom](#grabtextfrom) +* [grabValueFrom](#grabvaluefrom) +* [executeJS](#executejs) Learn more in [Using data returned by test actions](../data.md#use-data-returned-by-test-actions). @@ -157,10 +157,10 @@ Learn more in [Using data returned by test actions](../data.md#use-data-returned The following test actions handle data entities using [metadata](../metadata.md): -* [createData](#createdata) -* [deleteData](#deletedata) -* [updateData](#updatedata) -* [getData](#getdata) +* [createData](#createdata) +* [deleteData](#deletedata) +* [updateData](#updatedata) +* [getData](#getdata) Learn more in [Handling a REST API response](../metadata.md#rest-response). @@ -1287,7 +1287,6 @@ Attribute|Type|Use|Description `before`|string|optional| `stepKey` of action that must be executed next. `after`|string|optional| `stepKey` of preceding action. - #### Example ```xml @@ -1974,13 +1973,13 @@ Attribute|Type|Use|Description #### Examples ```xml - + ``` ```xml - - + + ``` ### seeOptionIsSelected From ae0450392ece3e5b7e6f7cd64904ff508b5efa3a Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Tue, 11 Feb 2020 10:00:21 -0600 Subject: [PATCH 07/18] MQE-1989: added deprecation notices for upcoming MFTF 3.0.0 changes. --- .../Console/BaseGenerateCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php index 889f631cc..3433f23a8 100644 --- a/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php +++ b/src/Magento/FunctionalTestingFramework/Console/BaseGenerateCommand.php @@ -25,9 +25,10 @@ class BaseGenerateCommand extends Command { const MFTF_3_O_0_DEPRECATION_MESSAGE = "MFTF NOTICES:\n" . "DEPRECATED ACTIONS: \"executeInSelenium\" and \"performOn\" actions will be removed in MFTF 3.0.0\n" - . "DEPRECATED TEST PATH: \"dev/tests/acceptance/tests/functional/Magento/FunctionalTest will not be read" - . " in MFTF 3.0.0 and after\n" - . "Single entity per xml file for all entities except data and metadata in MFTF 3.0.0 and after\n"; + . "DEPRECATED TEST PATH: support for \"dev/tests/acceptance/tests/functional/Magento/FunctionalTest will be " + . "removed in MFTF 3.0.0\n" + . "XSD schema change to only allow single entity per xml file for all entities except data and metadata in " + . "MFTF 3.0.0\n"; /** * Console output style From f5739a7253c7d91ddd70b697aa787dfc8b62f9d0 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Mon, 10 Feb 2020 12:21:50 -0600 Subject: [PATCH 08/18] MQE-1988: MFTF failures after PHP upgrade (libzip5 v1.60+) moved facebook/webdriver to replace added php-webdriver/webdriver --- composer.json | 6 ++- composer.lock | 133 ++++++++++++++++++++++++++------------------------ 2 files changed, 74 insertions(+), 65 deletions(-) diff --git a/composer.json b/composer.json index e6d081114..3c2fefd7a 100755 --- a/composer.json +++ b/composer.json @@ -25,7 +25,8 @@ "monolog/monolog": "^1.0", "mustache/mustache": "~2.5", "symfony/process": "^2.8 || ^3.1 || ^4.0", - "vlucas/phpdotenv": "^2.4" + "vlucas/phpdotenv": "^2.4", + "php-webdriver/webdriver": "1.8.x-dev" }, "require-dev": { "squizlabs/php_codesniffer": "~3.2", @@ -44,6 +45,9 @@ "suggest": { "epfremme/swagger-php": "^2.0" }, + "replace": { + "facebook/webdriver": "1.7.1" + }, "autoload": { "files": ["src/Magento/FunctionalTestingFramework/_bootstrap.php"], "psr-4": { diff --git a/composer.lock b/composer.lock index ac510665e..db629bea4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "859ddf6506836faaabb056ae7b377c63", + "content-hash": "480a0e5b9ab3d1248398361c90a5e246", "packages": [ { "name": "allure-framework/allure-codeception", @@ -366,7 +366,6 @@ "codeception/stub": "^2.0", "ext-json": "*", "ext-mbstring": "*", - "facebook/webdriver": ">=1.1.3 <2.0", "guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/psr7": "~1.0", "php": ">=5.6.0 <8.0", @@ -1837,67 +1836,6 @@ ], "time": "2019-06-08T11:03:04+00:00" }, - { - "name": "facebook/webdriver", - "version": "1.7.1", - "source": { - "type": "git", - "url": "https://github.com/facebook/php-webdriver.git", - "reference": "e43de70f3c7166169d0f14a374505392734160e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facebook/php-webdriver/zipball/e43de70f3c7166169d0f14a374505392734160e5", - "reference": "e43de70f3c7166169d0f14a374505392734160e5", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-zip": "*", - "php": "^5.6 || ~7.0", - "symfony/process": "^2.8 || ^3.1 || ^4.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "php-coveralls/php-coveralls": "^2.0", - "php-mock/php-mock-phpunit": "^1.1", - "phpunit/phpunit": "^5.7", - "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", - "squizlabs/php_codesniffer": "^2.6", - "symfony/var-dumper": "^3.3 || ^4.0" - }, - "suggest": { - "ext-SimpleXML": "For Firefox profile creation" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-community": "1.5-dev" - } - }, - "autoload": { - "psr-4": { - "Facebook\\WebDriver\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "description": "A PHP client for Selenium WebDriver", - "homepage": "https://github.com/facebook/php-webdriver", - "keywords": [ - "facebook", - "php", - "selenium", - "webdriver" - ], - "abandoned": "php-webdriver/webdriver", - "time": "2019-06-13T08:02:18+00:00" - }, { "name": "flow/jsonpath", "version": "0.5.0", @@ -3035,6 +2973,71 @@ "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, + { + "name": "php-webdriver/webdriver", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-webdriver/php-webdriver.git", + "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "reference": "3e33ee3b8a688d719c55acdd7c6788e3006e1d3e", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-zip": "*", + "php": "^5.6 || ~7.0", + "symfony/polyfill-mbstring": "^1.12", + "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "jakub-onderka/php-parallel-lint": "^1.0", + "php-coveralls/php-coveralls": "^2.0", + "php-mock/php-mock-phpunit": "^1.1", + "phpunit/phpunit": "^5.7", + "sebastian/environment": "^1.3.4 || ^2.0 || ^3.0", + "sminnee/phpunit-mock-objects": "^3.4", + "squizlabs/php_codesniffer": "^3.5", + "symfony/var-dumper": "^3.3 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-SimpleXML": "For Firefox profile creation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "lib/Exception/TimeoutException.php" + ], + "psr-4": { + "Facebook\\WebDriver\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.", + "homepage": "https://github.com/php-webdriver/php-webdriver", + "keywords": [ + "Chromedriver", + "geckodriver", + "php", + "selenium", + "webdriver" + ], + "time": "2020-02-10T15:04:25+00:00" + }, { "name": "phpcollection/phpcollection", "version": "0.5.0", @@ -6861,7 +6864,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "php-webdriver/webdriver": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { From 3497e7dd643d329c5fbe0a9dfef4b4392d67e4fe Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Mon, 10 Feb 2020 15:45:02 -0600 Subject: [PATCH 09/18] MQE-1988: MFTF failures after PHP upgrade (libzip5 v1.60+) moved facebook/webdriver to replace added php-webdriver/webdriver --- composer.json | 2 +- composer.lock | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 3c2fefd7a..2e2b89877 100755 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "mustache/mustache": "~2.5", "symfony/process": "^2.8 || ^3.1 || ^4.0", "vlucas/phpdotenv": "^2.4", - "php-webdriver/webdriver": "1.8.x-dev" + "php-webdriver/webdriver": "1.8.0" }, "require-dev": { "squizlabs/php_codesniffer": "~3.2", diff --git a/composer.lock b/composer.lock index db629bea4..975d034eb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "480a0e5b9ab3d1248398361c90a5e246", + "content-hash": "b96147186af064985bb758d6f51bd01d", "packages": [ { "name": "allure-framework/allure-codeception", @@ -2975,7 +2975,7 @@ }, { "name": "php-webdriver/webdriver", - "version": "dev-master", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", @@ -6864,9 +6864,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "php-webdriver/webdriver": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { From e69feab8c97716c87cb6d7f923b34323d8f962df Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Tue, 11 Feb 2020 09:53:44 -0600 Subject: [PATCH 10/18] MQE-1988: MFTF failures after PHP upgrade (libzip5 v1.60+) Added Caret Version Range --- composer.json | 4 ++-- composer.lock | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 2e2b89877..a63184c18 100755 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "mustache/mustache": "~2.5", "symfony/process": "^2.8 || ^3.1 || ^4.0", "vlucas/phpdotenv": "^2.4", - "php-webdriver/webdriver": "1.8.0" + "php-webdriver/webdriver": "^1.8.0" }, "require-dev": { "squizlabs/php_codesniffer": "~3.2", @@ -46,7 +46,7 @@ "epfremme/swagger-php": "^2.0" }, "replace": { - "facebook/webdriver": "1.7.1" + "facebook/webdriver": "^1.7.1" }, "autoload": { "files": ["src/Magento/FunctionalTestingFramework/_bootstrap.php"], diff --git a/composer.lock b/composer.lock index 975d034eb..fc8de5fce 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b96147186af064985bb758d6f51bd01d", + "content-hash": "02905fa699b13ced15ff44439441c96c", "packages": [ { "name": "allure-framework/allure-codeception", @@ -366,6 +366,7 @@ "codeception/stub": "^2.0", "ext-json": "*", "ext-mbstring": "*", + "facebook/webdriver": ">=1.1.3 <2.0", "guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/psr7": "~1.0", "php": ">=5.6.0 <8.0", From 81f826abfd82b5c4aa13c9d76cf68ffa45c6661d Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Tue, 11 Feb 2020 12:10:49 -0600 Subject: [PATCH 11/18] MQE-1988: MFTF failures after PHP upgrade (libzip5 v1.60+) Version bump + changelog for 2.6.1 --- CHANGELOG.md | 9 +++++++++ composer.json | 2 +- composer.lock | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98db600cc..339e82ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Magento Functional Testing Framework Changelog ================================================ +2.6.1 +----- + +* Usability + * Introduced new `.env` configuration `ELASTICSEARCH_VERSION` to support multiple elasticsearch versions +* Maintainability + * Added deprecation notices for upcoming MFTF 3.0.0 +* Replaced facebook webdriver with php-webdriver to support PHP version updates + 2.6.0 ----- diff --git a/composer.json b/composer.json index a63184c18..9a806e35c 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2-functional-testing-framework", "description": "Magento2 Functional Testing Framework", "type": "library", - "version": "2.6.0", + "version": "2.6.1", "license": "AGPL-3.0", "keywords": ["magento", "automation", "functional", "testing"], "config": { diff --git a/composer.lock b/composer.lock index fc8de5fce..c493c4d77 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "02905fa699b13ced15ff44439441c96c", + "content-hash": "c79110e707cbbf2553f19b50052949e6", "packages": [ { "name": "allure-framework/allure-codeception", From 29711af1512cc07a1e5f22cddb19f2e20c08675c Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Tue, 11 Feb 2020 16:00:00 -0600 Subject: [PATCH 12/18] MQE-1989: added deprecation notices for upcoming MFTF 3.0.0 changes. --- dev/tests/verification/Resources/BasicFunctionalTest.txt | 2 +- dev/tests/verification/Resources/ExecuteInSeleniumTest.txt | 2 +- src/Magento/FunctionalTestingFramework/Util/TestGenerator.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/tests/verification/Resources/BasicFunctionalTest.txt b/dev/tests/verification/Resources/BasicFunctionalTest.txt index e76e409d0..d9ef5cac6 100644 --- a/dev/tests/verification/Resources/BasicFunctionalTest.txt +++ b/dev/tests/verification/Resources/BasicFunctionalTest.txt @@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId; /** * @Title("[NO TESTCASEID]: A Functional Cest") * @group functional - * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step performOnKey1 "performOn" is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step performOnKey1 performOn is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") */ class BasicFunctionalTestCest { diff --git a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt index 48b818200..9728059c2 100644 --- a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt +++ b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt @@ -13,7 +13,7 @@ use Yandex\Allure\Adapter\Model\SeverityLevel; use Yandex\Allure\Adapter\Annotation\TestCaseId; /** - * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step executeInSeleniumStep "executeInSelenium" is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step executeInSeleniumStep executeInSelenium is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") */ class ExecuteInSeleniumTestCest { diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index 527ed7323..97add6c67 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -1043,7 +1043,7 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "executeInSelenium": - $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"executeInSelenium\"" + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} executeInSelenium" . self::MFTF_3_O_0_DEPRECATION_MESSAGE; $testSteps .= $this->wrapFunctionCall($actor, $actionObject, $function); break; @@ -1056,7 +1056,7 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "performOn": - $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} \"performOn\"" + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} performOn" . self::MFTF_3_O_0_DEPRECATION_MESSAGE; $testSteps .= $this->wrapFunctionCall( $actor, From b48fbe5d226102d6fcea73db70f6ce21298801d8 Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Tue, 11 Feb 2020 16:14:52 -0600 Subject: [PATCH 13/18] Update deprecation message --- src/Magento/FunctionalTestingFramework/Util/TestGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index 97add6c67..dda1dbd9f 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -1043,7 +1043,7 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "executeInSelenium": - $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} executeInSelenium" + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} 'executeInSelenium'" . self::MFTF_3_O_0_DEPRECATION_MESSAGE; $testSteps .= $this->wrapFunctionCall($actor, $actionObject, $function); break; @@ -1056,7 +1056,7 @@ public function generateStepsPhp($actionObjects, $generationScope = TestGenerato ); break; case "performOn": - $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} performOn" + $this->deprecationMessages[] = "DEPRECATED ACTION in Test: at step {$stepKey} 'performOn'" . self::MFTF_3_O_0_DEPRECATION_MESSAGE; $testSteps .= $this->wrapFunctionCall( $actor, From 5895be1cfb31fdbe55b26ea33e57472916d52cfd Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Tue, 11 Feb 2020 16:15:45 -0600 Subject: [PATCH 14/18] Update verification test --- dev/tests/verification/Resources/BasicFunctionalTest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/verification/Resources/BasicFunctionalTest.txt b/dev/tests/verification/Resources/BasicFunctionalTest.txt index d9ef5cac6..072b58261 100644 --- a/dev/tests/verification/Resources/BasicFunctionalTest.txt +++ b/dev/tests/verification/Resources/BasicFunctionalTest.txt @@ -15,7 +15,7 @@ use Yandex\Allure\Adapter\Annotation\TestCaseId; /** * @Title("[NO TESTCASEID]: A Functional Cest") * @group functional - * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step performOnKey1 performOn is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step performOnKey1 'performOn' is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/BasicFunctionalTest.xml
") */ class BasicFunctionalTestCest { From 748449dbece5b19788bef2d4442a5a68abae01e2 Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Tue, 11 Feb 2020 16:16:10 -0600 Subject: [PATCH 15/18] Update verification test --- dev/tests/verification/Resources/ExecuteInSeleniumTest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt index 9728059c2..5afd1a6ea 100644 --- a/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt +++ b/dev/tests/verification/Resources/ExecuteInSeleniumTest.txt @@ -13,7 +13,7 @@ use Yandex\Allure\Adapter\Model\SeverityLevel; use Yandex\Allure\Adapter\Annotation\TestCaseId; /** - * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step executeInSeleniumStep executeInSelenium is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") + * @Description("

Deprecated Notice(s):

  • DEPRECATED ACTION in Test: at step executeInSeleniumStep 'executeInSelenium' is DEPRECATED and will be removed in MFTF 3.0.0.

Test files

verification/TestModule/Test/ExecuteInSeleniumTest.xml
") */ class ExecuteInSeleniumTestCest { From fb69c1a94d66e69129a9b357e3ef6873024f94a4 Mon Sep 17 00:00:00 2001 From: Ji Lu Date: Thu, 13 Feb 2020 08:53:56 -0600 Subject: [PATCH 16/18] MQE-1997: type float is wrongly treated as integer in assert actions --- dev/tests/verification/Resources/AssertTest.txt | 1 + dev/tests/verification/TestModule/Test/AssertTest.xml | 4 ++++ src/Magento/FunctionalTestingFramework/Util/TestGenerator.php | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/tests/verification/Resources/AssertTest.txt b/dev/tests/verification/Resources/AssertTest.txt index bb29759d5..c0cf932ae 100644 --- a/dev/tests/verification/Resources/AssertTest.txt +++ b/dev/tests/verification/Resources/AssertTest.txt @@ -49,6 +49,7 @@ class AssertTestCest $I->assertEmpty([], "pass"); // stepKey: assertEmpty $I->assertEquals($text, "Copyright © 2013-2017 Magento, Inc. All rights reserved.", "pass"); // stepKey: assertEquals1 $I->assertEquals("Copyright © 2013-2017 Magento, Inc. All rights reserved.", $text, "pass"); // stepKey: assertEquals2 + $I->assertEquals(1.5, $text, "pass"); // stepKey: assertFloatTypeIsCorrect $I->assertFalse(false, "pass"); // stepKey: assertFalse1 $I->assertFileNotExists("/out.txt", "pass"); // stepKey: assertFileNotExists1 $I->assertFileNotExists($text, "pass"); // stepKey: assertFileNotExists2 diff --git a/dev/tests/verification/TestModule/Test/AssertTest.xml b/dev/tests/verification/TestModule/Test/AssertTest.xml index 82f69b9b0..8cdc724cc 100644 --- a/dev/tests/verification/TestModule/Test/AssertTest.xml +++ b/dev/tests/verification/TestModule/Test/AssertTest.xml @@ -54,6 +54,10 @@ Copyright © 2013-2017 Magento, Inc. All rights reserved. text + + 1.5 + text + 0 diff --git a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php index dda1dbd9f..2ec565c44 100644 --- a/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php +++ b/src/Magento/FunctionalTestingFramework/Util/TestGenerator.php @@ -2194,6 +2194,6 @@ private function wrapParameterArray(string $value): string */ private function hasDecimalPoint(string $outStr) { - return strpos($outStr, localeconv()['decimal_point']) === false; + return strpos($outStr, localeconv()['decimal_point']) !== false; } } From 724ca691b51db6d6aff70195b977dab48345cc54 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Thu, 13 Feb 2020 14:47:35 -0600 Subject: [PATCH 17/18] MQE-2000: CHANGELOG.MD and Composer version bump 2.6.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 339e82ed8..4792fa8ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Magento Functional Testing Framework Changelog ================================================ +2.6.2 +----- + +### Fixes +* Fixed float conversion error in test generation + 2.6.1 ----- From ba72b5a5428996305162cab5c99509a1f3abb3c4 Mon Sep 17 00:00:00 2001 From: Soumya Unnikrishnan Date: Thu, 13 Feb 2020 14:49:57 -0600 Subject: [PATCH 18/18] MQE-2000: CHANGELOG.MD and Composer version bump 2.6.2 --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9a806e35c..ed4656a37 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "magento/magento2-functional-testing-framework", "description": "Magento2 Functional Testing Framework", "type": "library", - "version": "2.6.1", + "version": "2.6.2", "license": "AGPL-3.0", "keywords": ["magento", "automation", "functional", "testing"], "config": { diff --git a/composer.lock b/composer.lock index c493c4d77..caa95e992 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c79110e707cbbf2553f19b50052949e6", + "content-hash": "d9ea4056a8f4501c3f2766e09edce40d", "packages": [ { "name": "allure-framework/allure-codeception",