magento / magento/magento2-functional-testing-framework
Helpers Autoload Issue - Class `Group\AppConfigDumpSuite` is not defined. Autoload it or include into '_bootstrap.php' file of 'tests' directory
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 154
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
Preconditions
- PHP8.2
- latest MFTF Standalone (4.7.2) in /home/kali/mftf
- unmodified Magento 2.4.7 in /var/www/html/magento2test
Hello,
I'm getting errors like:
[Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException]
Make sure cest files are generated before running bin/mftf codecept:run
Class `Group\AppConfigDumpSuite` is not defined. Autoload it or include into '_bootstrap.php' file of 'tests' directory
Exception trace:
at /home/kali/mftf/src/Magento/FunctionalTestingFramework/Console/CodeceptRunCommand.php:50
Magento\FunctionalTestingFramework\Console\CodeceptRunCommand->execute() at /home/kali/mftf/vendor/symfony/console/Command/Command.php:326
whenever I run a test that uses a custom helper.
I can run any tests that don't use Helpers.
My /home/kali/mftf/dev/.env looks like:
MAGENTO_BASE_URL=https://magento2test.com/
MAGENTO_BACKEND_NAME=admin
MAGENTO_ADMIN_USERNAME=admin
SELENIUM_CLOSE_ALL_SESSIONS=true
BROWSER=chrome
WINDOW_WIDTH=1920
WINDOW_HEIGHT=1080
MODULE_ALLOWLIST=Magento_Framework,ConfigurableProductWishlist,ConfigurableProductCatalogSearch
WAIT_TIMEOUT=60
MAGENTO_CLI_WAIT_TIMEOUT=60
BROWSER_LOG_BLOCKLIST=other
ELASTICSEARCH_VERSION=7
MAGENTO_BP=/var/www/html/magento2test
ENABLE_PAUSE=true
I can see /var/www/html/magento2test/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Group/AppConfigDumpSuite.php was generated in the magento2test project vendor folder.
When I search for "AppConfigDump" it in ~/mftf then I see what's on the screenshot below.
Any ideas how can I fix this autoload issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Magento/FunctionalTestingFramework/Console/CodeceptRunCommand.php:50 and inspect how generated tests load Group/AppConfigDumpSuite.php. Compare the generated file in the Magento vendor directory with the tests directory's _bootstrap.php and reproduce the failure using a test with a custom helper. Done means custom-helper tests run without the class-not-defined error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100