[meta] Convert remaining tests using Standard profile to use Testing profile instead

Created on 20 March 2022, over 2 years ago
Updated 5 February 2024, 5 months ago

Problem/Motivation

The start of these changes was in #1373142: Use the Testing profile. Speed up testbot by 50% and to reducing test time and cost.

Use the testing profile instead of standard where possible. For example some tests just need a bit of configuration setup but do not need the full standard profile.

Steps to reproduce

grep -lr "\$profile = 'standard'" core | nl
     1  core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php
     2  core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
     3  core/profiles/standard/tests/src/Functional/StandardTest.php
     4  core/modules/config/tests/src/Functional/ConfigImportAllTest.php
     5  core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
     6  core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTe
st.php
     7  core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTe
st.php
     8  core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php
     9  core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
    10  core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php
    11  core/modules/rdf/tests/src/Functional/StandardProfileTest.php
    12  core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php
    13  core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php
    14  core/modules/system/tests/src/Functional/Common/NoJavaScriptAnonymousTest.php
    15  core/modules/comment/tests/src/Functional/Views/CommentEditTest.php
    16  core/modules/comment/tests/src/Functional/CommentPreviewTest.php
    17  core/modules/help/tests/src/Functional/HelpTest.php
    18  core/modules/workspaces/tests/src/Functional/WorkspacesUninstallTest.php
    19  core/modules/node/tests/src/Functional/NodeTranslationUITest.php
    20  core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
    21  core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php
    22  core/modules/user/tests/src/Functional/UserPictureTest.php

Proposed resolution

Create an issue for each item. If the test cannot be converted note it in the remaining tasks section.

Remaining tasks

Tests to do
None!

Done

Tests that can not be converted

  • core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
  • core/modules/rdf/tests/src/Functional/StandardProfileTest.php
  • core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
  • core/profiles/standard/tests/src/Functional/StandardTest.php
  • core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

📌 Task
Status

Fixed

Version

11.0 🔥

Component
PHPUnit 

Last updated about 11 hours ago

Created by

🇳🇿New Zealand quietone New Zealand

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone New Zealand

    Grouped the remaining issues in the IS.

  • 🇳🇿New Zealand quietone New Zealand
  • 🇺🇸United States smustgrave

    Thanks for bringing this back up. Some of these were my first core contribution attempts so glad to be able to circle back

  • 🇳🇿New Zealand quietone New Zealand

    Moved two tests that are testing the Standard profile to the list of the one not to be converted.

  • 🇳🇿New Zealand quietone New Zealand
  • 🇺🇸United States smustgrave

    @quietone can help on these but want to get one reviewed before moving on to the next. Been having trouble with that part.

  • 🇳🇿New Zealand quietone New Zealand

    Converted another one and updated the IS.

  • 🇳🇿New Zealand quietone New Zealand
  • 🇳🇿New Zealand quietone New Zealand
  • 🇳🇿New Zealand quietone New Zealand

    Just 3 more to do.

  • 🇺🇸United States smustgrave

    With regards to MediaStandardProfileTest it appears to only be testing the media bundles that ship with standard. We could move those config to a test module thoughts?

  • 🇳🇿New Zealand quietone New Zealand

    The remaining test is core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php. I asked in Slack #media if this needs to use the standard profile. marcoscano, a maintainer, replied that it does, stating "In principle that's testing the config that ships with the standard profile, so I'd say yes, I think so". It is good I asked because when I first looked at the file I didn't think it needed to use the standard profile.

    I did some digging and found the comment where the test was added. In that comment seanB states,

    Added MediaStandardProfileTest to test the standard profile form configuration, creation, field mapping and display configuration. We could expand on that in the future. See if we can move/remove the media specific code in Drupal\Tests\standard\Functional\StandardTest and see what we want to do with Drupal\Tests\media\FunctionalJavascript\MediaDisplayTest since there is some overlap.

    I spent a few minutes comparing the two tests and I found that MediaDisplayTest is testing the standard profile configuration. So, this needs a followup up issue to remove that overlap.

  • Status changed to Fixed 6 months ago
  • 🇳🇿New Zealand quietone New Zealand

    Made a follow up to look at the overlap mentioned in #25, 📌 Remove overlap in StandardTest and MediaDisplayTest Active .

    All the children are done and the followup is made. I am setting this to Fixed

    Thanks to everyone who worked in the child issues to speed up the tests.

    Woohoo!

  • 🇳🇿New Zealand quietone New Zealand

    The follow up was made, see previous comment

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

Production build 0.69.0 2024