diff --git a/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php b/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
index dc0aab9263..0cf6d1d031 100644
--- a/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
+++ b/core/modules/aggregator/tests/src/Functional/FeedCacheTagsTest.php
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\aggregator\Functional;
 
 use Drupal\aggregator\Entity\Feed;
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php b/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
index 09da343682..edd2ac32a9 100644
--- a/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
+++ b/core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php
@@ -5,7 +5,7 @@
 use Drupal\aggregator\Entity\Feed;
 use Drupal\aggregator\Entity\Item;
 use Drupal\Core\Cache\CacheBackendInterface;
-use Drupal\system\Tests\Entity\EntityCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
index 59f111b965..3e2c580ec6 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php
@@ -7,7 +7,7 @@
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Language\LanguageInterface;
-use Drupal\system\Tests\Entity\EntityCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
diff --git a/core/modules/comment/src/Tests/CommentCacheTagsTest.php b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
similarity index 96%
rename from core/modules/comment/src/Tests/CommentCacheTagsTest.php
rename to core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
index 12e0ef8451..0b0f4863af 100644
--- a/core/modules/comment/src/Tests/CommentCacheTagsTest.php
+++ b/core/modules/comment/tests/src/Functional/CommentCacheTagsTest.php
@@ -1,14 +1,15 @@
 <?php
 
-namespace Drupal\comment\Tests;
+namespace Drupal\Tests\comment\Functional;
 
 use Drupal\comment\CommentInterface;
 use Drupal\comment\CommentManagerInterface;
 use Drupal\comment\Entity\Comment;
+use Drupal\comment\Tests\CommentTestTrait;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\entity_test\Entity\EntityTest;
 use Drupal\field\Entity\FieldConfig;
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/content_translation/tests/src/Functional/Update/ContentTranslationUpdateTest.php b/core/modules/content_translation/tests/src/Functional/Update/ContentTranslationUpdateTest.php
index 25be0def24..34fc579903 100644
--- a/core/modules/content_translation/tests/src/Functional/Update/ContentTranslationUpdateTest.php
+++ b/core/modules/content_translation/tests/src/Functional/Update/ContentTranslationUpdateTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests the upgrade path for the Content Translation module.
diff --git a/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
index e1b6cf7ef1..ece89f43ea 100644
--- a/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
+++ b/core/modules/media/tests/src/Functional/MediaCacheTagsTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\media\Entity\Media;
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 
 /**
  * Tests the media items cache tags.
diff --git a/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php b/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
index ca5a0a9912..e9e40d7da1 100644
--- a/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
+++ b/core/modules/node/tests/src/Functional/NodeCacheTagsTest.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\node\Entity\Node;
 use Drupal\node\Entity\NodeType;
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 
 /**
  * Tests the Node entity's cache tags.
diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
index e2d6a226f2..a2282b1ddf 100644
--- a/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
+++ b/core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\shortcut\Entity\Shortcut;
-use Drupal\system\Tests\Entity\EntityCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php b/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php
index 380c1e66ed..3a24843278 100644
--- a/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php
+++ b/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php
@@ -5,8 +5,13 @@
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\entity_test\FieldStorageDefinition;
 
+@trigger_error(__NAMESPACE__ . '\EntityDefinitionTestTrait is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait. See https://www.drupal.org/node/2946549.', E_USER_DEPRECATED);
+
 /**
  * Provides some test methods used to update existing entity definitions.
+ *
+ * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
+ * Use \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait.
  */
 trait EntityDefinitionTestTrait {
 
diff --git a/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php b/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
index 997a4d28f6..b0b4a26704 100644
--- a/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
+++ b/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
@@ -7,8 +7,13 @@
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\field\Entity\FieldConfig;
 
+@trigger_error(__NAMESPACE__ . '\EntityWithUriCacheTagsTestBase is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase. See https://www.drupal.org/node/2946549.', E_USER_DEPRECATED);
+
 /**
  * Provides helper methods for Entity cache tags tests; for entities with URIs.
+ *
+ * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
+ * Use \Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase.
  */
 abstract class EntityWithUriCacheTagsTestBase extends EntityCacheTagsTestBase {
 
diff --git a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php
index 286e8e62bd..631a89e543 100644
--- a/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php
+++ b/core/modules/system/tests/modules/entity_test_update/src/Entity/EntityTestUpdate.php
@@ -13,7 +13,8 @@
  *
  * This entity type starts out non-revisionable and non-translatable, but during
  * an update test it can be made revisionable and translatable using the helper
- * methods from \Drupal\system\Tests\Entity\EntityDefinitionTestTrait.
+ * methods from
+ * \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait.
  *
  * @ContentEntityType(
  *   id = "entity_test_update",
diff --git a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
index aa9452a4ba..c043a2486e 100644
--- a/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityCacheTagsTestBase.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Url;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\field\Entity\FieldConfig;
-use Drupal\system\Tests\Cache\PageCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Cache\PageCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\RoleInterface;
 
diff --git a/core/modules/system/src/Tests/Entity/EntityFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
similarity index 98%
rename from core/modules/system/src/Tests/Entity/EntityFormTest.php
rename to core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
index 2ebc350617..4f0b7f0f71 100644
--- a/core/modules/system/src/Tests/Entity/EntityFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityFormTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\system\Tests\Entity;
+namespace Drupal\Tests\system\Functional\Entity;
 
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests the entity form.
  *
  * @group Entity
  */
-class EntityFormTest extends WebTestBase {
+class EntityFormTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
similarity index 97%
rename from core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php
rename to core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
index f5134249a7..e008e71e1f 100644
--- a/core/modules/system/src/Tests/Entity/EntityTranslationFormTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityTranslationFormTest.php
@@ -1,18 +1,18 @@
 <?php
 
-namespace Drupal\system\Tests\Entity;
+namespace Drupal\Tests\system\Functional\Entity;
 
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\language\Entity\ConfigurableLanguage;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 
 /**
  * Tests entity translation form.
  *
  * @group Entity
  */
-class EntityTranslationFormTest extends WebTestBase {
+class EntityTranslationFormTest extends BrowserTestBase {
 
   /**
    * Modules to enable.
diff --git a/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php b/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
similarity index 99%
copy from core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
copy to core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
index 997a4d28f6..ed4914407e 100644
--- a/core/modules/system/src/Tests/Entity/EntityWithUriCacheTagsTestBase.php
+++ b/core/modules/system/tests/src/Functional/Entity/EntityWithUriCacheTagsTestBase.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Entity;
+namespace Drupal\Tests\system\Functional\Entity;
 
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Language\LanguageInterface;
diff --git a/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
similarity index 99%
copy from core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php
copy to core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
index 380c1e66ed..e873e096f0 100644
--- a/core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php
+++ b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\system\Tests\Entity;
+namespace Drupal\Tests\system\Functional\Entity\Traits;
 
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\entity_test\FieldStorageDefinition;
diff --git a/core/modules/system/tests/src/Functional/Entity/Update/SqlContentEntityStorageSchemaConverterTest.php b/core/modules/system/tests/src/Functional/Entity/Update/SqlContentEntityStorageSchemaConverterTest.php
index 625ee190ed..4c5dd491cb 100644
--- a/core/modules/system/tests/src/Functional/Entity/Update/SqlContentEntityStorageSchemaConverterTest.php
+++ b/core/modules/system/tests/src/Functional/Entity/Update/SqlContentEntityStorageSchemaConverterTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Entity\Sql\TemporaryTableMapping;
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests updating an entity type with existing data to be revisionable.
diff --git a/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionDefaultTest.php b/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionDefaultTest.php
index e226540b6a..e696da67e8 100644
--- a/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionDefaultTest.php
+++ b/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionDefaultTest.php
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\system\Functional\Update;
 
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests the upgrade path for adding the 'revision_default' field.
diff --git a/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionTranslationAffectedTest.php b/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionTranslationAffectedTest.php
index f7dcd0c41b..018c10f051 100644
--- a/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionTranslationAffectedTest.php
+++ b/core/modules/system/tests/src/Functional/Update/EntityUpdateAddRevisionTranslationAffectedTest.php
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\system\Functional\Update;
 
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests the upgrade path for adding the 'revision_translation_affected' field.
diff --git a/core/modules/system/tests/src/Functional/Update/EntityUpdateToRevisionableAndPublishableTest.php b/core/modules/system/tests/src/Functional/Update/EntityUpdateToRevisionableAndPublishableTest.php
index 2312dc6f0a..e2206bed26 100644
--- a/core/modules/system/tests/src/Functional/Update/EntityUpdateToRevisionableAndPublishableTest.php
+++ b/core/modules/system/tests/src/Functional/Update/EntityUpdateToRevisionableAndPublishableTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests the upgrade path for making an entity revisionable and publishable.
diff --git a/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php b/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
index 35b7d6bd6e..378d02c755 100644
--- a/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/TermCacheTagsTest.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\Tests\taxonomy\Functional;
 
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
 use Drupal\taxonomy\Entity\Vocabulary;
 use Drupal\taxonomy\Entity\Term;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 
 /**
  * Tests the Taxonomy term entity's cache tags.
diff --git a/core/modules/user/tests/src/Functional/UserCacheTagsTest.php b/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
index a9e98575b7..c9ab91fac7 100644
--- a/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
+++ b/core/modules/user/tests/src/Functional/UserCacheTagsTest.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\user\Functional;
 
-use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
+use Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase;
 use Drupal\user\Entity\Role;
 use Drupal\user\Entity\User;
 use Drupal\user\RoleInterface;
diff --git a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
index 2319a7064a..24e4e6af51 100644
--- a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
+++ b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php
@@ -4,7 +4,7 @@
 
 use Drupal\Core\Entity\EntityTypeEvent;
 use Drupal\Core\Entity\EntityTypeEvents;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 use Drupal\Tests\views\Kernel\ViewsKernelTestBase;
 
 /**
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
index 348c33cbb8..7407ab9ef4 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php
@@ -15,7 +15,7 @@
 use Drupal\Core\Field\FieldStorageDefinitionEvents;
 use Drupal\Core\Language\LanguageInterface;
 use Drupal\entity_test_update\Entity\EntityTestUpdate;
-use Drupal\system\Tests\Entity\EntityDefinitionTestTrait;
+use Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait;
 
 /**
  * Tests EntityDefinitionUpdateManager functionality.
diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
index d96193e455..75e4953947 100644
--- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
+++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php
@@ -189,6 +189,7 @@ public static function getSkippedDeprecations() {
       'Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.',
       'Drupal\node\Plugin\Action\DeleteNode is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.',
       'Drupal\comment\Plugin\Action\DeleteComment is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.',
+      'Drupal\system\Tests\Entity\EntityDefinitionTestTrait is deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait. See https://www.drupal.org/node/2946549.',
     ];
   }
 
