-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix issue when using includes in combination with override config #5978
Conversation
+1 |
Any update on this PR? |
Looks very good to me. If no objections we can merge this and release a new version |
@bramstroker is it possible to set up a test for it? and create a test in "cli" suite to run tests using |
@DavertMik thanks. yes I can have a look into this somewhere next week. |
@bramstroker I am waiting for test. |
I'm having a look into it now. |
@DavertMik @Naktibalda |
tests/data/claypit directory is copied to tests/data/sandbox before running each test in Cli test suite and tests are executed against sandbox directory because many tests generate code. Yes, you can put your custom printer to tests/data/claypit/tests/_data directory. |
Is anybody still working on this? What's missing to merge this? This is a major pain point in a multi-application setup. |
Custom reporters won't be supported in Codeception, they must be converted to extensions and used with @calvinalkan Do you have an issue with custom reporters or some other setting? |
I have found that no matter what settings you put into the "root apps" configuration file, it has zero effects on included apps when you run it as a multi-app setup. Neither options passed as command-line arguments nor options in the root codeception.yml file. This causes the described PHPStrom UI bug here. But it's not exclusive to reporters. I find this a bit counterintuitive: I would expect it to work like this:
But how it currently works is:
@Naktibalda Note, Im using 4.3.X. We currently cant upgrade but are tracking this at wp-browser: lucatume/wp-browser#571 |
A test. Could you add one?
I agree, please improve that behavior and we will merge it |
I can try, the static |
@DavertMik I fixed this including a test in #6452. |
Replaced by #6452 , released as 4.2.0 |
I am using include configs in my project to run multiple applications/modules in a single test run. https://codeception.com/docs/08-Customization#One-Runner-for-Multiple-Applications
In my root
codeception.yml
:In my
src/OtherModule
I have anothercodeception.yml
and seperate tests.This is working perfectly and tests of the other module are also executed when I run
vendor/bin codecept run
.However when using these feature the overriden configs (using
-o
parameter) are removed from the test run.This was caused by line 365-368 which reset the complete config object to that of the main
codeception.yml
, but don't apply theoverride
config again.PHPStorm also uses this method to set a custom reporter
-o "reporters: report: PhpStorm_Codeception_ReportPrinter"
, but because this was removed the complete UI reporting in PHPStorm was broken for me.I also refactored to ONLY override the config when the test should be run by an include config. This seems less fragile to me.