Show test run time by class in run-tests.sh output

Created on 1 August 2024, about 2 months ago
Updated 28 August 2024, 22 days ago

Problem/Motivation

gitlab collects and displays the amount of time each test method takes to run, which is useful.

However, Drupal core pipelines run concurrently by class, and test classes can have anything from one test method to hundreds of test method (invocations) via data providers. There is not currently an easy way to see how long any particular test class takes to run.

Wish I'd thought of this at the beginning of trying to optimize pipeline runs instead of when a lot of the work is done, since it probably would have saved hours trying to identify the slowest tests, however better late than never.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Drupal\Tests\comment\Functional\CommentPagerTest               5 passes   47s                                      
Drupal\Tests\config_translation\Functional\ConfigTranslation   2 passes   23s                                      
Drupal\Tests\comment\Functional\CommentPreviewTest             3 passes   48s                                      
Drupal\Tests\contact\Functional\ContactSitewideTest            2 passes   22s                                      
Drupal\Tests\contact\Functional\ContactStorageTest             3 passes   27s                                      
Drupal\Tests\contact\Functional\ContactPersonalTest            6 passes   29s                                      
Drupal\Tests\config_translation\Functional\ConfigTranslation   4 passes   38s                                      
Drupal\Tests\config_translation\Functional\ConfigTranslation   2 passes   39s                                      
Test run duration: 4 min 6 sec

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
PHPUnitย  โ†’

Last updated about 4 hours ago

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024