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

Comments

quietone created an issue. See original summary.

smustgrave’s picture

Removed https://www.drupal.org/project/rdf/issues/2254191 as it's being removed from core

Are there still sub tickets needed to be created?

smustgrave’s picture

Issue summary: View changes
smustgrave’s picture

Not sure

core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php
core/profiles/standard/tests/src/Functional/StandardTest.php

Should be changed

smustgrave’s picture

Adding core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php
to the list of not sure

smustgrave’s picture

Issue summary: View changes
smustgrave’s picture

Issue summary: View changes
smustgrave’s picture

Issue summary: View changes
smustgrave’s picture

Issue summary: View changes

@quietone opened tickets and marked those tests in italics in the IS that I wonder should remain with standard.

  • core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php = seems to be a test about standard profile
  • core/profiles/standard/tests/src/Functional/StandardTest.php = Same for this one.
  • core/modules/config/tests/src/Functional/ConfigImportAllTest.php = This is testing a lot of the config standard ships with
  • core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php = 0 idea what this is testing
  • core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php = seems to be a test about standard profile.
  • core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php = seems to be a test about standard profile
longwave’s picture

FWIW I am not sure that adding dependencies on olivero_test to non-Olivero related tests is a good idea, it just means that we are coupling the tests to Olivero - it seems better to set up the test config that we need manually, or (perhaps) have a more generic module that can do it for us.

smustgrave’s picture

I thought about that. Reason I like olivero_test is because it contains article with comment, body, entity reference and everything you need for a majority of the tests

smustgrave’s picture

Since I needed olivero_test for https://www.drupal.org/project/drupal/issues/2254189 I added a test module there. But can't figure out the error.

smustgrave’s picture

Do any of these need to get in for D10?

quietone’s picture

Issue summary: View changes

Grouped the remaining issues in the IS.

quietone’s picture

Issue summary: View changes
smustgrave’s picture

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

quietone’s picture

Issue summary: View changes

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

quietone’s picture

Issue summary: View changes
smustgrave’s picture

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

quietone’s picture

Issue summary: View changes

Converted another one and updated the IS.

quietone’s picture

Issue summary: View changes
quietone’s picture

Issue summary: View changes
quietone’s picture

Version: 10.0.x-dev » 11.x-dev
Issue summary: View changes

Just 3 more to do.

smustgrave’s picture

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 but then we are testing regular bundles and not the bundles that standard ship with, which not sure is correct thoughts?

quietone’s picture

Issue summary: View changes
Issue tags: +Needs followup

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.

quietone’s picture

Status: Active » Fixed
Related issues: +#3413884: Remove overlap in StandardTest and MediaDisplayTest

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

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!

quietone’s picture

Issue tags: -Needs followup

The follow up was made, see previous comment

Status: Fixed » Closed (fixed)

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