Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298556

[META] Convert Functional tests classes which make no HTTP requests into Kernel tests

$
0
0

Problem/Motivation

Through #3046959: Convert RelationshipNodeTermDataTest into a Kernel test I/we discovered that there are Functional tests that make no HTTP requests but are still a Functional test.

The overhead for a Functional test is way more than for a Kernel test, so converting tests that are eligible will make the overall test time go down.

Steps to reproduce

I've created the below list with eligible candidates by comparing the list with tests and number of passed assertions on top of each of the seven Functional test jobs on Gitlab (Test summary) with the list of *.counter files in /artifacts/sites/simpletest/browser_output of the artifact of the same testjob.

Reasoning here is that when there's a *.counter file for a Functional test, HTML output was logged and thus a HTTP request was made.

Present in the list of tests that ran, but no *.counter file means no HTTP request was made and thus the test might be eligible for converting into a Kernel test.

Eligible Functional test for conversionAction taken
Drupal\FunctionalTests\Core\Config\SchemaConfigListenerTestThis tests that Functional tests have schema checking turned on by default, so needs to be a Functional test.
Drupal\FunctionalTests\Core\Container\ServiceDeprecationTest From class PHPDoc: "Note: this test must be a BrowserTestBase so the container is properly compiled.
Drupal\FunctionalTests\Core\Test\ModuleInstallBatchTest#3045736: Convert ModuleInstallBatchTest into a Kernel test
Drupal\FunctionalTests\FolderTestTests hook_install() during setup of image module. Needs to run on serialized container.
Drupal\FunctionalTests\GetTestMethodCallerExtendsTestTest for BrowserTestBase::getTestMethodCaller() in child classes. Needs to extend BrowserTestBase.
Drupal\FunctionalTests\GetTestMethodCallerTestExplicit test for BrowserTestBase::getTestMethodCaller() Needs to extend BrowserTestBase.
Drupal\FunctionalTests\Installer\DrupalFlushAllCachesInInstallerTestUses drupal_flush_all_caches(). Needs to run on serialized container.
Drupal\FunctionalTests\Installer\InstallerDeprecatedDriverNameTestUses \Drupal\Core\Test\FunctionalTestSetupTrait::installParameters.
Drupal\FunctionalTests\Installer\InstallerPerformanceTestThis tests an actual install, so needs to be a Functional test.
Drupal\FunctionalTests\Installer\TestingProfileInstallTestThis tests an actual install, so needs to be a Functional test.
Drupal\FunctionalTests\MailCaptureTest#3042994: MailCaptureTest provides the same test coverage as AssertMailTraitTest and should be removed
Drupal\FunctionalTests\Routing\LazyRouteProviderInstallTestTests that the lazy route provider is used during a module install. Needs to run on serialized container.
Drupal\Tests\block_content\Functional\Views\FieldTypeTest#3414259: Convert FieldTypeTest into a Kernel test
Drupal\Tests\config\Functional\ConfigInstallProfileOverrideTest
Drupal\Tests\config\Functional\ConfigOtherModuleTest
Drupal\Tests\contact\Functional\Rest\MessageXmlAnonTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\contact\Functional\Rest\MessageXmlBasicAuthTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\contact\Functional\Rest\MessageXmlCookieTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\editor\Functional\Rest\EditorJsonAnonTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\image\Functional\FileMoveTest#3415038: Convert FileMoveTest into a Kernel test
Drupal\Tests\image\Functional\Rest\ImageStyleXmlAnonTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\image\Functional\Rest\ImageStyleXmlBasicAuthTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\image\Functional\Rest\ImageStyleXmlCookieTestAll classes extending \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase should be Functional tests.
Drupal\Tests\locale\Functional\LocaleNonInteractiveDevInstallTestTest class is skipped due to due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322. Otherwise it would do a HTTP request.
Drupal\Tests\locale\Functional\LocaleNonInteractiveInstallTestest class is skipped due to due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322. Otherwise it would do a HTTP request.
Drupal\Tests\menu_ui\Functional\MenuUninstallTestTests that uninstalling menu does not remove custom menus. Needs to run on serialized container.
Drupal\Tests\mysql\Functional\RequirementsTest#3414957: \Drupal\Tests\mysql\Functional\RequirementsTest is always skipped
Drupal\Tests\node\Functional\NodeTemplateSuggestionsTest#3414499: Convert NodeTemplateSuggestionsTest into a Kernel test
Drupal\Tests\node\Functional\Views\PathPluginTest#3414481: Convert PathPluginTest into a Kernel test
Drupal\Tests\node\Functional\Views\RowPluginTest#3415557: Convert RowPluginTest into a Kernel test
Drupal\Tests\options\Functional\OptionsDynamicValuesApiTest#3414501: Convert OptionsDynamicValuesApiTest into a Kernel test
Drupal\Tests\options\Functional\OptionsDynamicValuesValidationTest#3414557: Convert OptionsDynamicValuesValidationTest into a Kernel test
Drupal\Tests\pgsql\Functional\Database\PostgreSqlSequenceUpdateTestThis test will only run in jobs that are using PostgreSQL as a DB. I've checked and then it makes HTTP calls.
Drupal\Tests\search\Functional\SearchSetLocaleTest#3414589: Convert SearchSetLocaleTest into a Kernel test
Drupal\Tests\system\Functional\Cache\ClearTestTests our clearing is done the proper way. Needs to run on serialized container.
Drupal\Tests\system\Functional\Common\AlterTest#3415060: Convert AlterTest into a Kernel test
Drupal\Tests\system\Functional\Entity\EntityReferenceSelection\EntityReferenceSelectionAccessTest#3414776: Move EntityReferenceSelectionAccessTest to Kernel namespace and directory
Drupal\Tests\system\Functional\FileTransfer\FileTransferTest
Drupal\Tests\system\Functional\Mail\HtmlToTextTest#3414914: Convert HtmlToTextTest into a Unit test
Drupal\Tests\system\Functional\System\SitesDirectoryHardeningTestNeeds to run on serialized container.
Drupal\Tests\system\Functional\Theme\TwigDebugMarkupTestUses \Drupal\Core\Test\FunctionalTestSetupTrait::rebuildContainer
Drupal\Tests\system\Functional\Theme\TwigLoaderTest#3414969: Convert TwigLoaderTest into a Kernel test
Drupal\Tests\system\Functional\UpdateSystem\DependencyHookInvocationTestUses update_retrieve_dependencies which needs to run on serialized container.
Drupal\Tests\system\Functional\UpdateSystem\DependencyMissingTestUses update_resolve_dependencies which needs to run on serialized container.
Drupal\Tests\system\Functional\UpdateSystem\DependencyOrderingTestUses update_resolve_dependencies which needs to run on serialized container.
Drupal\Tests\taxonomy\Functional\Views\RelationshipNodeTermDataTest#3046959: Convert RelationshipNodeTermDataTest into a Kernel test
Drupal\Tests\taxonomy\Functional\Views\RelationshipRepresentativeNodeTest#3414664: Convert RelationshipRepresentativeNodeTest into a Kernel test
Drupal\Tests\taxonomy\Functional\Views\TaxonomyTermFilterDepthTest#3414667: Delete TaxonomyTermFilterDepthTest Functional test
Drupal\Tests\views\Functional\Handler\FieldTimeIntervalTest#3414699: Convert FieldTimeIntervalTest into a Kernel test
Drupal\Tests\views\Functional\Handler\HandlerAllTest#3041755: Convert HandlerAllTest into a kernel test
Drupal\Tests\views\Functional\Plugin\CacheTagTest#3041813: Convert CacheTagTest into a kernel test

Proposed resolution

Look at each Functional test in the list and determine if it can be converted in a Kernel test.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298556


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>