From 1f4cb58c5ebdfa1c1a68e200551737aea358c943 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 4 Nov 2021 13:49:33 -0700 Subject: [PATCH 1/2] Moving flaky multiplayer tests into sandbox so they will still be ran nightly, but we can still fix and create new tests Signed-off-by: Gene Walters --- .../Gem/PythonTests/CMakeLists.txt | 3 ++ .../PythonTests/Multiplayer/CMakeLists.txt | 13 +++++++ .../PythonTests/Multiplayer/TestSuite_Main.py | 4 --- .../Multiplayer/TestSuite_Sandbox.py | 35 +++++++++++++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index fd3222ba83..bec49185bd 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -59,5 +59,8 @@ add_subdirectory(smoke) ## AWS ## add_subdirectory(AWS) +## Multiplayer ## +add_subdirectory(Multiplayer) + ## Integration tests for editor testing framework ## add_subdirectory(editor_test_testing) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt index 5e74d1e93b..506d15c323 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt @@ -20,4 +20,17 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) COMPONENT Multiplayer ) + ly_add_pytest( + NAME AutomatedTesting::MultiplayerTests_Sandbox + TEST_SUITE sandbox + TEST_SERIAL + PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py + RUNTIME_DEPENDENCIES + Legacy::Editor + AZ::AssetProcessor + AutomatedTesting.Assets + AutomatedTesting.ServerLauncher + COMPONENT + Multiplayer + ) endif() diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py index 9cecaa7fe8..df1eb62943 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py @@ -27,7 +27,3 @@ class TestAutomation(TestAutomationBase): batch_mode=batch_mode, autotest_mode=autotest_mode) - def test_Multiplayer_AutoComponent_NetworkInput(self, request, workspace, editor, launcher_platform): - from .tests import Multiplayer_AutoComponent_NetworkInput as test_module - self._run_prefab_test(request, workspace, editor, test_module) - diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py new file mode 100644 index 0000000000..52ac19b26e --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py @@ -0,0 +1,35 @@ +""" +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 + +""" + +# This suite consists of all test cases that are under development and have not been verified yet. +# Once they are verified, please move them to TestSuite_Active.py + +import pytest +import os +import sys + + +sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') + +from base import TestAutomationBase + +@pytest.mark.SUITE_sandbox +@pytest.mark.parametrize("project", ["AutomatedTesting"]) +@pytest.mark.parametrize("launcher_platform", ['windows_editor']) +class TestAutomation(TestAutomationBase): + def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): + self._run_test(request, workspace, editor, test_module, + extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], + batch_mode=batch_mode, + autotest_mode=autotest_mode) + + ## Seems to be flaky, need to investigate + def test_Multiplayer_AutoComponent_NetworkInput(self, request, workspace, editor, launcher_platform): + from .tests import Multiplayer_AutoComponent_NetworkInput as test_module + self._run_prefab_test(request, workspace, editor, test_module) + From 84d38a4f9cc613972513639fa7b5158738cc87e6 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 4 Nov 2021 22:23:00 -0700 Subject: [PATCH 2/2] Removing Multiplayer MainSuite tests, because AR considers no-test to be a failure Signed-off-by: Gene Walters --- .../Gem/PythonTests/Multiplayer/CMakeLists.txt | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt index 506d15c323..367de4da9a 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/CMakeLists.txt @@ -7,19 +7,6 @@ # 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( NAME AutomatedTesting::MultiplayerTests_Sandbox TEST_SUITE sandbox