0

I am using Magento 2.3.4 and MFTF 2.6.3. I have setup the MFTF by

  • setting environment credentials in dev/test/acceptance/.env
  • running vendor/bin/mftf build:project
  • running vendor/bin/mftf generate:tests

When I execute vendor/bin mftf run:test AdminLoginTest I am getting the following error:

PHP Fatal error: Uncaught Error: Class 'Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser' not found in root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php:76
Stack trace:
/root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php(43): Magento\FunctionalTestingFramework\Allure\Event\AddUniqueAttachmentEvent-guessFileMimeType('/tmp/allure-att...')
/root/html/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Event/AddAttachmentEvent.php(35): Magento\FunctionalTestingFramework\Allure\Event\AddUniqueAttachmentEvent-getAttachmentFileName(Object(PHPUnit\Framework\ExceptionWrapper), NULL)
/root/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Allure.php(116): Yandex\Allure\Adapter\Event\AddAttachmentEvent->process(Object(Ya in
/root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php:76
2
  • What is your question? What did you execute? Did you install Magento using composer?
    – Daniel
    May 12, 2020 at 9:58
  • 1
    Hi Daniel, I have install magento using composer, and created user credentials for backend. Configured details in MFTF .env File inside dev/test/acceptance folder. I have run vendor/bin/mftf build:project and generate:tests commands. when i execute vendor/bin mftf run:test AdminLoginTest i'm getting the above error in console: PHP Fatal error: Uncaught Error: Class 'Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser'
    – Dhruva's
    May 12, 2020 at 10:49

2 Answers 2

0

The problem lies in the missing requirement of symfony/http-foundation. See https://github.com/magento/magento2-functional-testing-framework/issues/758 for more details.

Updating the MFTF to ^2.6.4 should solve your issue since they added symfony/http-foundation to the composer.json.

If you're running Magento <2.3.4 and an update is not possible you can downgrade to version ~2.4.5.

Your Answer

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

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