Decouple kernel tests from `CanvasTestSetup`: painful to work on, and VERY slow
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3531679. --> Reported by: [larowlan](https://www.drupal.org/user/395439) >>> <h3 id="overview">Overview</h3> <p>For velocity sake, quite a few of our kernel tests make use of XbTestSetup to setup a test environment.<br> This however makes the tests slow. Removing this dependency on XbTestSetup and having them only setup the things they need can speed them up significantly.</p> <p>In <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/experience_builder/issues/3529622" title="Status: Closed (fixed)">#3529622: Make auto-save manager only support passing and returning entity objects, remove support for arbitrary data, use deterministic hashing to ensure entries are actually updates</a></span> I was working on fixing fails in <code>\Drupal\Tests\experience_builder\Kernel\AutoSaveManagerTest</code> and noticed the test was very slow. As I was already dramatically changing that test, I decoupled it from XbTestSetup so I could get faster feedback.</p> <p><strong>Before time</strong> to execute the 5 test methods is 3 mins 20 seconds<br> <strong>After</strong> - 28 sec</p> <p>Here's the list of tests that are making use of it</p> <pre>tests/src/Kernel/AutoSaveManagerTest.php // &#128072;&#65039; This one is updated in [#3529622]<br>tests/src/Kernel/ComponentInputsFormTest.php<br>tests/src/Kernel/ClientServerConversionTraitTest.php<br>tests/src/Kernel/ApiLayoutControllerGetTest.php<br>tests/src/Kernel/ApiLayoutControllerPostTest.php<br>tests/src/Kernel/ComponentTreeLoaderTest.php<br>tests/src/Kernel/ApiLayoutControllerPatchTest.php<br>tests/src/Kernel/ClientDataToEntityConverterTest.php<br>tests/src/Kernel/ApiAutoSaveControllerTest.php</pre><h3 id="proposed-resolution">Proposed resolution</h3> <h3 id="ui-changes">User interface changes</h3> > Related issue: [Issue #3529622](https://www.drupal.org/node/3529622) > Related issue: [Issue #3543834](https://www.drupal.org/node/3543834) > Related issue: [Issue #3532265](https://www.drupal.org/node/3532265) > Related issue: [Issue #3546139](https://www.drupal.org/node/3546139) > Related issue: [Issue #3563216](https://www.drupal.org/node/3563216)
issue