4

Preconditions (*)

  1. Magento 2.3.1 upgraded from Magento 2.3.0
  2. Php 7.2.15
  3. OS : Ubuntu 18.04 Bionic
  4. Phpstorm 2019.1.1
  5. Evnironemnt : Magento development

Steps to reproduce (*)

  • Issue appears after upgrading magento from 2.3.0 to 2.3.1.
  • Removing magento/magento2-functional-testing-framework
  • installing latest magento/magento2-functional-testing-framework:~2.3.13
  • Running below commands.

bin/magento dev:tests:run unit

OR

vendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist

These commands should run unit test on entire magento project not just on one mdoule.

NOPTE: Above commands will work if version 2.3.0 is installed directly and also for 2.3.1 if installed directly.

0

1 Answer 1

8

Install following package as follows since 2.3.0 didn't came with allure-phpunit.

This issue is related with following issue

Fatal error: Class 'Codeception\Platform\Extension' not found. Issue occurred after magento 2.3.0 upgrade to 2.3.1

So in order for upgraded 2.3.0 to 2.3.1 magento to work install following.

composer require allure-framework/allure-phpunit:~1.2.0 --dev

Then run

bin/magento dev:tests:run unit
5
  • How come it doesn't come with Magento out of the box?
    – Erfan
    May 27, 2019 at 11:45
  • 2
    While doing unit tests this was the error I was getting. I have updated the header. From investigation it appeared that magento 2.3.1 upgraded from 2.3.0 created compatibility issues for the allure-framework versions. Clean 2.3.1 comes with different allure-framework and upgraded 2.3.1 stays on the older version which has a different implementation.
    – PhantomS
    May 28, 2019 at 1:22
  • Ah right interesting.. during the Magento 2.3.0 to 2.3.1 upgrade, did you diff composer.json files and bring over the new changes?
    – Erfan
    May 29, 2019 at 6:58
  • No I didn't I just followed the cli procedure recommended by magento for upgrades. [devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html]
    – PhantomS
    May 29, 2019 at 7:15
  • Option --dev is default. It's not necessary to specify it. From documentation: --dev: Install packages listed in require-dev (this is the default behavior). Feb 15, 2020 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.