Codeception: Trait '_generated/*TesterActions' not found
What are you trying to achieve?
Im trying to run a test,
What do you get instead?
Im suddenly getting this error Trait '_generated/*TesterActions' not found
.
Details
When I go look under _generated the file *TesterActions is still there but its empty. It happens when codeception tries to rebuild the class.
- Codeception version: 2.2.10
- PHP Version: 7.0
- Operating System: Windows 10 / Vagrant
- Installation type: Composer
class_name: SomeTestTester
modules:
enabled:
- REST:
url: https://domain.com/api
depends: PhpBrowser
part: Json
- \Helper\ConfiguratorHelper
- Db
- Asserts
I have the feeling that it has something to do Line seperation between windows and linux but im not sure.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (6 by maintainers)
Yes, that was the reason that I ran
codecept build
I had a sort of workaround, codeception prepends ‘_support’ prefix directory for that class, so I changed ‘_support’ dir settings to ‘./’ in codeception.yml, and the class was found, though I had tests in the root directory ‘./’, when I changed it to ‘tests’ - the default, it was somehow found along despite _support prefix. But along I had some other issue an incorrect number of parameters passed to Cest.php so I removed all codeception.yml files I had in any directory if it could be related to the first problem, and it removed also the second problem.
Edit: the second problem though after investigation might be due to having tests and vendor in the root directory, considers also tests parent Cest.php being a test, thus the tests cannot be at the vendor dir level
We have this issue on macOS so this is not a platform specific issue.