Decouple kernel tests from XbTestSetup

Created on 22 June 2025, 1 day ago

Overview

For velocity sake, quite a few of our kernel tests make use of XbTestSetup to setup a test environment.
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.

In πŸ› Page status changes from "Published" to "Changed" even when no actual changes are made Active I was working on fixing fails in \Drupal\Tests\experience_builder\Kernel\AutoSaveManagerTest 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.

Before time to execute the 5 test methods is 3 mins 20 seconds
After - 28 sec

Here's the list of tests that are making use of it

tests/src/Kernel/AutoSaveManagerTest.php // πŸ‘ˆοΈ This one is updated in 
            
              
              
              πŸ›
              Page status changes from "Published" to "Changed" even when no actual changes are made
                Active
              
            
tests/src/Kernel/ComponentInputsFormTest.php
tests/src/Kernel/ClientServerConversionTraitTest.php
tests/src/Kernel/ApiLayoutControllerGetTest.php
tests/src/Kernel/ApiLayoutControllerPostTest.php
tests/src/Kernel/ComponentTreeLoaderTest.php
tests/src/Kernel/ApiLayoutControllerPatchTest.php
tests/src/Kernel/ClientDataToEntityConverterTest.php
tests/src/Kernel/ApiAutoSaveControllerTest.php

Proposed resolution

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Miscellaneous

Created by

πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024