- Issue created by @joachim
- Merge request !130Issue #3541217: Fixed test module installs all the config config in each test. → (Merged) created by joachim
The entity_share_test has a ton of dependencies and installs a ton of config. It's been made to hold ALL the config requirements for ALL the functional tests.
But only some tests need some of the config -- e.g. only the BlockFieldTest test needs block_field module and the config to set up the relevant fields. Some tests like ContentEntityReferenceTest barely need anything at all.
This makes the tests slower run run, and means that a developer debugging a single failing test needs to install ALL the dependencies.
Ideally, instead of one test module, we'd have several, each one with a small set of dependencies -- entity_share_test_block_field, entity_share_test_path, entity_share_test_media, etc.
However, splitting up that config is going to be fiddly.
Instead, we can make all the config in entity_share_test optional, remove the dependencies, and then each test installs the modules it needs.
Preliminary work shows that a simple test like ContentEntityReferenceTest halves its execution time from 10 to 5 seconds.
Active
4.0
Code