Closed
Description
After upgrading MFTF higher then 2.3.14 - command run:group return error (trying on MFTF 2.4.5 which is supported according to official documentation and also on MFTF 2.6.2 which is last available version).
Preconditions
- Magento ver. 2.3.3
- PHP 7.2.24-0ubuntu0.18.04.2 (cli) (built: Jan 13 2020 18:39:59) ( NTS )
- selenium-server-standalone-3.141.59, Chrome Version 79.0.3945.130 (Official Build) (64-bit)
- require-dev{
"allure-framework/allure-phpunit": "~1.2.0",
"magento/magento2-functional-testing-framework": "2.6.2",
"phpunit/phpunit": "~6.5.0",
"sebastian/phpcpd": "~3.0.0",
}
Steps to reproduce
- Correctly installed and configured Magento 2 instance. Selenium server is up and running. .env file is correctly filled.
- You have MFTF tests at app/code/<vendor_name>/<module_name>/Test/Mftf/Tests module, tests are corrects and running perfect if you run each of them as:
vendor/bin/mftf run:test <Test_Name>
- Then you try to run tests as one group using command:
vendor/bin/mftf run:group <group_name> -r
Expected result
- Tests are generated successfully at directory:
/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/default
- Tests start running.
Actual result
- Before generating we recieved a lot of PHP Warning:
PHP Warning: array_merge(): Argument #1 is not an array in /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php on line 274
PHP Warning: array_diff(): Argument #2 is not an array in /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php on line 512
PHP Warning: array_diff(): Argument #2 is not an array in /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php on line 512
PHP Warning: array_diff(): Argument #2 is not an array in /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php on line 512
PHP Warning: array_diff(): Argument #2 is not an array in /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php on line 512
...
And after that tests are generated successfully at directory:
/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/_generated/default
- Then MFTF trying to run them - recieved error while trying:
Magento\FunctionalTestingFramework.functional Tests (1) ------------------------
Modules: \Magento\FunctionalTestingFramework\Module\MagentoWebDriver, \Magento\FunctionalTestingFramework\Helper\Acceptance, \Magento\FunctionalTestingFramework\Helper\MagentoFakerData, \Magento\FunctionalTestingFramework\Module\MagentoSequence, \Magento\FunctionalTestingFramework\Module\MagentoAssert, \Magento\FunctionalTestingFramework\Module\MagentoActionProxies, Asserts
--------------------------------------------------------------------------------
In ErrorHandler.php line 83:
[PHPUnit\Framework\Exception (2)]
array_merge(): Argument #1 is not an array
Exception trace:
() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:83
Codeception\Subscriber\ErrorHandler->errorHandler() at n/a:n/a
array_merge() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php:274
Magento\FunctionalTestingFramework\Util\ModuleResolver->getModulesPath() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Config/FileResolver/Module.php:58
Magento\FunctionalTestingFramework\Config\FileResolver\Module->getPaths() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Config/FileResolver/Root.php:38
Magento\FunctionalTestingFramework\Config\FileResolver\Root->get() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Config/Reader/Filesystem.php:129
Magento\FunctionalTestingFramework\Config\Reader\Filesystem->read() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Config/Data.php:100
Magento\FunctionalTestingFramework\Config\Data->load() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Config/Data.php:36
Magento\FunctionalTestingFramework\Config\Data->__construct() at n/a:n/a
ReflectionClass->newInstanceArgs() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/ObjectManager/Factory.php:249
Magento\FunctionalTestingFramework\ObjectManager\Factory->create() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/ObjectManager/ObjectManager.php:71
Magento\FunctionalTestingFramework\ObjectManager\ObjectManager->get() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/ObjectManager/Factory.php:159
Magento\FunctionalTestingFramework\ObjectManager\Factory->resolveArguments() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/ObjectManager/Factory.php:240
Magento\FunctionalTestingFramework\ObjectManager\Factory->create() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/ObjectManager/ObjectManager.php:58
Magento\FunctionalTestingFramework\ObjectManager\ObjectManager->create() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/Handlers/SuiteObjectHandler.php:121
Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler->initSuiteData() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Suite/Handlers/SuiteObjectHandler.php:62
Magento\FunctionalTestingFramework\Suite\Handlers\SuiteObjectHandler::getInstance() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php:106
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter->sanitizeGroupName() at /home/ivpel/Development/magento/magento2/src/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php:77
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter->suiteBefore() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/event-dispatcher/EventDispatcher.php:260
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/event-dispatcher/EventDispatcher.php:235
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/event-dispatcher/EventDispatcher.php:73
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/SuiteManager.php:156
Codeception\SuiteManager->run() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Codecept.php:189
Codeception\Codecept->runSuite() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Codecept.php:158
Codeception\Codecept->run() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Command/Run.php:466
Codeception\Command\Run->runSuites() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Command/Run.php:361
Codeception\Command\Run->execute() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/console/Application.php:893
Symfony\Component\Console\Application->doRunCommand() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/console/Application.php:262
Symfony\Component\Console\Application->doRun() at /home/ivpel/Development/magento/magento2/src/vendor/symfony/console/Application.php:145
Symfony\Component\Console\Application->run() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Application.php:108
Codeception\Application->run() at /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/codecept:42
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--coverage-phpunit [COVERAGE-PHPUNIT]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--] [<suite> [<test>]]
PHP Fatal error: Uncaught RuntimeException: Command Did Not Finish Properly in /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:101
Stack trace:
#0 [internal function]: Codeception\Subscriber\ErrorHandler->shutdownHandler()
#1 {main}
thrown in /home/ivpel/Development/magento/magento2/src/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php on line 101
Temporary trick: to avoid that error I commented row:
/src/vendor/codeception/codeception/src/Codeception/Subscriber/ErrorHandler.php:83
and after that everything work as expected.
On MFTF version 2.3.14 everything worked also as expected withour any errors.
Metadata
Metadata
Assignees
Labels
No labels