Pārlūkot izejas kodu

Moving failing Multiplayer Tests to Sandbox

Signed-off-by: Gene Walters <[email protected]>
Gene Walters 3 gadi atpakaļ
vecāks
revīzija
e9f36c9dff

+ 0 - 13
AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt

@@ -7,19 +7,6 @@
 #
 #
 
 
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
 if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
-    ly_add_pytest(
-        NAME AutomatedTesting::MultiplayerTests_Main
-        TEST_SUITE main
-        TEST_SERIAL
-        PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py
-        RUNTIME_DEPENDENCIES
-            Legacy::Editor
-            AZ::AssetProcessor
-            AutomatedTesting.Assets
-            AutomatedTesting.ServerLauncher
-        COMPONENT
-            Multiplayer
-    )
     ly_add_pytest(
     ly_add_pytest(
         NAME AutomatedTesting::MultiplayerTests_Sandbox
         NAME AutomatedTesting::MultiplayerTests_Sandbox
         TEST_SUITE sandbox
         TEST_SUITE sandbox

+ 0 - 56
AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py

@@ -1,56 +0,0 @@
-"""
-Copyright (c) Contributors to the Open 3D Engine Project.
-For complete copyright and license terms please see the LICENSE at the root of this distribution.
-
-SPDX-License-Identifier: Apache-2.0 OR MIT
-
-"""
-
-import pytest
-import os
-from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest
-
-
-# Saves the level cache folder.
-# These artifacts will be saved in the test results so developers can access the level assets
-# to debug should the test ever fail.
-def save_multiplayer_level_cache_folder_artifact(workspace, multiplayer_level):
-    level_cache_folder_path = os.path.join(workspace.paths.platform_cache(), "levels", "multiplayer", multiplayer_level)
-
-    if os.path.exists(level_cache_folder_path):
-        workspace.artifact_manager.save_artifact(level_cache_folder_path)
-    else:
-        pytest.fail(f"Failed to find level asset cache for '{multiplayer_level}', located here: '{level_cache_folder_path}'! Make sure AssetProcessor successfully built the level.")
-
[email protected]_main
[email protected]("project", ["AutomatedTesting"])
[email protected]("launcher_platform", ['windows_editor'])
-class TestAutomation(EditorTestSuite):
-    class test_Multiplayer_AutoComponent_NetworkInput(EditorSingleTest):
-        from .tests import Multiplayer_AutoComponent_NetworkInput as test_module
-
-        @classmethod
-        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
-            save_multiplayer_level_cache_folder_artifact(workspace, "autocomponent_networkinput")
-
-    @pytest.mark.xfail(reason="GHI #9869: Test periodically fails")
-    class test_Multiplayer_AutoComponent_RPC(EditorSingleTest):
-        from .tests import Multiplayer_AutoComponent_RPC as test_module
-
-        @classmethod
-        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
-            save_multiplayer_level_cache_folder_artifact(workspace, "autocomponent_rpc")
-
-    class test_Multiplayer_BasicConnectivity_Connects(EditorSingleTest):
-        from .tests import Multiplayer_BasicConnectivity_Connects as test_module
-        
-        @classmethod
-        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
-            save_multiplayer_level_cache_folder_artifact(workspace, "basicconnectivity_connects")
-
-    class test_Multiplayer_SimpleNetworkLevelEntity(EditorSingleTest):
-        from .tests import Multiplayer_SimpleNetworkLevelEntity as test_module
-
-        @classmethod
-        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
-            save_multiplayer_level_cache_folder_artifact(workspace, "simplenetworklevelentity")

+ 41 - 0
AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py

@@ -19,10 +19,51 @@ from Tools.LyTestTools.ly_test_tools.log.log_monitor import LogMonitor
 
 
 import Tools.LyTestTools.ly_test_tools.environment.waiter as waiter
 import Tools.LyTestTools.ly_test_tools.environment.waiter as waiter
 
 
+# Saves the level cache folder.
+# These artifacts will be saved in the test results so developers can access the level assets
+# to debug should the test ever fail.
+def save_multiplayer_level_cache_folder_artifact(workspace, multiplayer_level):
+    level_cache_folder_path = os.path.join(workspace.paths.platform_cache(), "levels", "multiplayer", multiplayer_level)
+
+    if os.path.exists(level_cache_folder_path):
+        workspace.artifact_manager.save_artifact(level_cache_folder_path)
+    else:
+        pytest.fail(f"Failed to find level asset cache for '{multiplayer_level}', located here: '{level_cache_folder_path}'! Make sure AssetProcessor successfully built the level.")
+
+
 @pytest.mark.SUITE_sandbox
 @pytest.mark.SUITE_sandbox
 @pytest.mark.parametrize("project", ["AutomatedTesting"])
 @pytest.mark.parametrize("project", ["AutomatedTesting"])
 @pytest.mark.parametrize("launcher_platform", ['windows_editor'])
 @pytest.mark.parametrize("launcher_platform", ['windows_editor'])
 class TestAutomation(EditorTestSuite):
 class TestAutomation(EditorTestSuite):
+    class test_Multiplayer_AutoComponent_NetworkInput(EditorSingleTest):
+        from .tests import Multiplayer_AutoComponent_NetworkInput as test_module
+
+        @classmethod
+        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
+            save_multiplayer_level_cache_folder_artifact(workspace, "autocomponent_networkinput")
+
+    @pytest.mark.xfail(reason="GHI #9869: Test periodically fails")
+    class test_Multiplayer_AutoComponent_RPC(EditorSingleTest):
+        from .tests import Multiplayer_AutoComponent_RPC as test_module
+
+        @classmethod
+        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
+            save_multiplayer_level_cache_folder_artifact(workspace, "autocomponent_rpc")
+
+    class test_Multiplayer_BasicConnectivity_Connects(EditorSingleTest):
+        from .tests import Multiplayer_BasicConnectivity_Connects as test_module
+        
+        @classmethod
+        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
+            save_multiplayer_level_cache_folder_artifact(workspace, "basicconnectivity_connects")
+
+    class test_Multiplayer_SimpleNetworkLevelEntity(EditorSingleTest):
+        from .tests import Multiplayer_SimpleNetworkLevelEntity as test_module
+
+        @classmethod
+        def setup(cls, instance, request, workspace, editor, editor_test_results, launcher_platform):
+            save_multiplayer_level_cache_folder_artifact(workspace, "simplenetworklevelentity")
+
     def test_Multiplayer_SimpleGameServerLauncher_ConnectsSuccessfully(self, workspace, launcher_platform, crash_log_watchdog):
     def test_Multiplayer_SimpleGameServerLauncher_ConnectsSuccessfully(self, workspace, launcher_platform, crash_log_watchdog):
         unexpected_lines = []
         unexpected_lines = []
         expected_lines = ["New outgoing connection to remote address:"]
         expected_lines = ["New outgoing connection to remote address:"]