Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Magento 2 functional testing framework above 4.2.1 breaks test because of Namespace Changes in allure-framework #912

Open
JesperHerrloff opened this issue Dec 19, 2023 · 2 comments

Comments

@JesperHerrloff
Copy link

When trying to run tests in newer version than 4.2.1 it gets an exception that it cant find AllureCodeception class.

Referenced here with Namespace Yandex\Allure
https://github.com/magento/magento2-functional-testing-framework/blob/develop/src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php#L20

And in composer.lock Namespace Qameta\Allure\Codeception
https://github.com/magento/magento2-functional-testing-framework/blob/develop/composer.lock#L39

Which is references to allure-phpcommons Yandex\Allure Namespace
https://github.com/magento/magento2-functional-testing-framework/blob/develop/composer.lock#L111

But if we check The repo at allure-codeception The AllureCodeception is now declared Final class
https://github.com/allure-framework/allure-codeception/blob/main/src/AllureCodeception.php#L38

Preconditions

Not Relevant

Steps to reproduce

Update Magento2 Functional Testing Framework above 4.2.1
Then it updates the dependency to allure-framework/allure-codeception which breaks because of namespace changes.

Expected result

Test to be executed

Actual result

Because of Namespace changes in allure-codeception an exception is thrown when MagentoAllureAdapter extending not existing class.

If you lock the testing framework to version 4.2.1 and not ^4.2.1 and run composer update everything works again.

Copy link

m2-assistant bot commented Dec 19, 2023

Hi @JesperHerrloff. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

@JesperHerrloff
Copy link
Author

Found the reason on Why it happens. When you update the Testing Framework, the codeception.yml and functional.suite.yml doesnt get updated if you dont remove them.

Maybe there should be a form of warning/error message when you run mftf build:project if the files cant be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant