Problem/Motivation

PHPUnit tests are grouped in 'test suites'. The definition of the test suites is contained in the phpunit.xml.dist configuration file - for each test suite a set of directories are defined; the files identified as tests in those directories are associated to the defined suite.

For historical reasons, the naming of the test suites defined in Drupal's PHPUnit configuration file does not match the naming used by Drupal's test runner run-tests.sh in its --types command line argument.

The current mapping is

    'PHPUnit-FunctionalJavascript' => 'functional-javascript',
    'PHPUnit-Functional' => 'functional',
    'PHPUnit-Kernel' => 'kernel',
    'PHPUnit-Unit' => 'unit',
    'PHPUnit-Unit-Component' => 'unit-component',
    'PHPUnit-Build' => 'build',

run-tests.sh is using some mapping and reverse mapping methods to switch back and forth between pure PHPUnit and legacy naming when discovering tests.

This is confusing for anyone coming from outside Drupal as they will trust the naming in phpunit.xml.dist.

Proposed resolution

1) remove the mapping and only use PHPUnit's names
2) adjust core pipelines to use the PHPUnit names when running jobs for run-tests.sh.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3581399

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
longwave’s picture

Status: Needs review » Needs work

Added some suggestions/nits.

mondrake’s picture

Status: Needs work » Needs review

Thanks, applied.

longwave’s picture

Are we only going to make this change in main/Drupal 12?

I think this needs a change record for anyone who might have custom CI jobs running test suites via run-tests.sh.

mondrake’s picture

Are we only going to make this change in main/Drupal 12?

Trying to backport may require to change deprecated code, which I'd rather not do at this point. But I have not looked in details.

Added draft CR.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Let's do it, I think this can go into main only, I don't see the need to backport and disrupt things there.

mondrake’s picture

Issue tags: +Major version only
needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mondrake’s picture

Status: Needs work » Reviewed & tested by the community

  • godotislate committed ed828b00 on main
    task: #3581399 Stop using legacy names for test suites
    
    By: mondrake
    By...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

Committed ed828b0 and pushed to main. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.