More test filename cleanup/re-org and enabled existing tests alongside optimized tests
Signed-off-by: jckand-amzn <jckand@amazon.com>
This commit is contained in:
@@ -36,6 +36,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
|
|||||||
Editor
|
Editor
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ly_add_pytest(
|
||||||
|
NAME AutomatedTesting::EditorTests_Periodic
|
||||||
|
TEST_SUITE periodic
|
||||||
|
TEST_SERIAL
|
||||||
|
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic.py
|
||||||
|
RUNTIME_DEPENDENCIES
|
||||||
|
Legacy::Editor
|
||||||
|
AZ::AssetProcessor
|
||||||
|
AutomatedTesting.Assets
|
||||||
|
COMPONENT
|
||||||
|
Editor
|
||||||
|
)
|
||||||
|
|
||||||
ly_add_pytest(
|
ly_add_pytest(
|
||||||
NAME AutomatedTesting::EditorTests_Sandbox
|
NAME AutomatedTesting::EditorTests_Sandbox
|
||||||
TEST_SUITE sandbox
|
TEST_SUITE sandbox
|
||||||
@@ -49,4 +62,46 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
|
|||||||
Editor
|
Editor
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ly_add_pytest(
|
||||||
|
NAME AutomatedTesting::EditorTests_Main_Optimized
|
||||||
|
TEST_SUITE main
|
||||||
|
TEST_SERIAL
|
||||||
|
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py
|
||||||
|
PYTEST_MARKS "not REQUIRES_gpu"
|
||||||
|
RUNTIME_DEPENDENCIES
|
||||||
|
Legacy::Editor
|
||||||
|
AZ::AssetProcessor
|
||||||
|
AutomatedTesting.Assets
|
||||||
|
COMPONENT
|
||||||
|
Editor
|
||||||
|
)
|
||||||
|
|
||||||
|
ly_add_pytest(
|
||||||
|
NAME AutomatedTesting::EditorTests_Main_GPU_Optimized
|
||||||
|
TEST_SUITE main
|
||||||
|
TEST_SERIAL
|
||||||
|
TEST_REQUIRES gpu
|
||||||
|
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main_Optimized.py
|
||||||
|
PYTEST_MARKS "REQUIRES_gpu"
|
||||||
|
RUNTIME_DEPENDENCIES
|
||||||
|
Legacy::Editor
|
||||||
|
AZ::AssetProcessor
|
||||||
|
AutomatedTesting.Assets
|
||||||
|
COMPONENT
|
||||||
|
Editor
|
||||||
|
)
|
||||||
|
|
||||||
|
ly_add_pytest(
|
||||||
|
NAME AutomatedTesting::EditorTests_Sandbox_Optimized
|
||||||
|
TEST_SUITE sandbox
|
||||||
|
TEST_SERIAL
|
||||||
|
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox_Optimized.py
|
||||||
|
RUNTIME_DEPENDENCIES
|
||||||
|
Legacy::Editor
|
||||||
|
AZ::AssetProcessor
|
||||||
|
AutomatedTesting.Assets
|
||||||
|
COMPONENT
|
||||||
|
Editor
|
||||||
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -7,69 +7,37 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
|
import sys
|
||||||
|
|
||||||
import ly_test_tools.environment.file_system as file_system
|
import ly_test_tools.environment.file_system as file_system
|
||||||
from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
|
|
||||||
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
|
||||||
|
from base import TestAutomationBase
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def remove_test_level(request, workspace, project):
|
||||||
|
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True)
|
||||||
|
|
||||||
|
def teardown():
|
||||||
|
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True)
|
||||||
|
|
||||||
|
request.addfinalizer(teardown)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
|
||||||
@pytest.mark.SUITE_main
|
@pytest.mark.SUITE_main
|
||||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||||
class TestAutomationNoAutoTestMode(EditorTestSuite):
|
class TestAutomation(TestAutomationBase):
|
||||||
|
|
||||||
# Disable -autotest_mode and -BatchMode. Tests cannot run in -BatchMode due to UI interactions, and these tests
|
def test_BasicEditorWorkflows_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform,
|
||||||
# interact with modal dialogs
|
remove_test_level):
|
||||||
global_extra_cmdline_args = []
|
|
||||||
|
|
||||||
class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest):
|
|
||||||
# Custom teardown to remove slice asset created during test
|
|
||||||
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
|
|
||||||
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
|
|
||||||
True, True)
|
|
||||||
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
||||||
|
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False)
|
||||||
|
|
||||||
@pytest.mark.REQUIRES_gpu
|
@pytest.mark.REQUIRES_gpu
|
||||||
class test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(EditorSingleTest):
|
def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform,
|
||||||
# Disable null renderer
|
remove_test_level):
|
||||||
use_null_renderer = False
|
|
||||||
|
|
||||||
# Custom teardown to remove slice asset created during test
|
|
||||||
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
|
|
||||||
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
|
|
||||||
True, True)
|
|
||||||
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
||||||
|
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False,
|
||||||
class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest):
|
use_null_renderer=False)
|
||||||
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
|
||||||
class test_AssetPicker_UI_UX(EditorSharedTest):
|
|
||||||
from .EditorScripts import AssetPicker_UI_UX as test_module
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
|
||||||
@pytest.mark.SUITE_main
|
|
||||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
|
||||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
|
||||||
class TestAutomationAutoTestMode(EditorTestSuite):
|
|
||||||
|
|
||||||
# Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions
|
|
||||||
global_extra_cmdline_args = ["-autotest_mode"]
|
|
||||||
|
|
||||||
class test_AssetBrowser_TreeNavigation(EditorSharedTest):
|
|
||||||
from .EditorScripts import AssetBrowser_TreeNavigation as test_module
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
|
||||||
class test_AssetBrowser_SearchFiltering(EditorSharedTest):
|
|
||||||
from .EditorScripts import AssetBrowser_SearchFiltering as test_module
|
|
||||||
|
|
||||||
class test_ComponentCRUD_Add_Delete_Components(EditorSharedTest):
|
|
||||||
from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module
|
|
||||||
|
|
||||||
class test_Menus_ViewMenuOptions_Work(EditorSharedTest):
|
|
||||||
from .EditorScripts import Menus_ViewMenuOptions as test_module
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="Times out due to dialogs failing to dismiss: LYN-4208")
|
|
||||||
class test_Menus_FileMenuOptions_Work(EditorSharedTest):
|
|
||||||
from .EditorScripts import Menus_FileMenuOptions as test_module
|
|
||||||
|
|||||||
@@ -1,43 +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 os
|
|
||||||
import pytest
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import ly_test_tools.environment.file_system as file_system
|
|
||||||
|
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
|
|
||||||
from base import TestAutomationBase
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def remove_test_level(request, workspace, project):
|
|
||||||
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True)
|
|
||||||
|
|
||||||
def teardown():
|
|
||||||
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", "tmp_level")], True, True)
|
|
||||||
|
|
||||||
request.addfinalizer(teardown)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.SUITE_main
|
|
||||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
|
||||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
|
||||||
class TestAutomation(TestAutomationBase):
|
|
||||||
|
|
||||||
def test_BasicEditorWorkflows_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform,
|
|
||||||
remove_test_level):
|
|
||||||
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False)
|
|
||||||
|
|
||||||
@pytest.mark.REQUIRES_gpu
|
|
||||||
def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform,
|
|
||||||
remove_test_level):
|
|
||||||
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False,
|
|
||||||
use_null_renderer=False)
|
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
"""
|
||||||
|
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 os
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
import ly_test_tools.environment.file_system as file_system
|
||||||
|
from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||||
|
@pytest.mark.SUITE_main
|
||||||
|
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||||
|
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||||
|
class TestAutomationNoAutoTestMode(EditorTestSuite):
|
||||||
|
|
||||||
|
# Disable -autotest_mode and -BatchMode. Tests cannot run in -BatchMode due to UI interactions, and these tests
|
||||||
|
# interact with modal dialogs
|
||||||
|
global_extra_cmdline_args = []
|
||||||
|
|
||||||
|
class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest):
|
||||||
|
# Custom teardown to remove slice asset created during test
|
||||||
|
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
|
||||||
|
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
|
||||||
|
True, True)
|
||||||
|
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
||||||
|
|
||||||
|
@pytest.mark.REQUIRES_gpu
|
||||||
|
class test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(EditorSingleTest):
|
||||||
|
# Disable null renderer
|
||||||
|
use_null_renderer = False
|
||||||
|
|
||||||
|
# Custom teardown to remove slice asset created during test
|
||||||
|
def teardown(self, request, workspace, editor, editor_test_results, launcher_platform):
|
||||||
|
file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
|
||||||
|
True, True)
|
||||||
|
from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module
|
||||||
|
|
||||||
|
class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest):
|
||||||
|
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||||
|
class test_AssetPicker_UI_UX(EditorSharedTest):
|
||||||
|
from .EditorScripts import AssetPicker_UI_UX as test_module
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||||
|
@pytest.mark.SUITE_main
|
||||||
|
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||||
|
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||||
|
class TestAutomationAutoTestMode(EditorTestSuite):
|
||||||
|
|
||||||
|
# Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions
|
||||||
|
global_extra_cmdline_args = ["-autotest_mode"]
|
||||||
|
|
||||||
|
class test_AssetBrowser_TreeNavigation(EditorSharedTest):
|
||||||
|
from .EditorScripts import AssetBrowser_TreeNavigation as test_module
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="Crashes Editor: ATOM-15493")
|
||||||
|
class test_AssetBrowser_SearchFiltering(EditorSharedTest):
|
||||||
|
from .EditorScripts import AssetBrowser_SearchFiltering as test_module
|
||||||
|
|
||||||
|
class test_ComponentCRUD_Add_Delete_Components(EditorSharedTest):
|
||||||
|
from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module
|
||||||
|
|
||||||
|
class test_Menus_ViewMenuOptions_Work(EditorSharedTest):
|
||||||
|
from .EditorScripts import Menus_ViewMenuOptions as test_module
|
||||||
|
|
||||||
|
@pytest.mark.skip(reason="Times out due to dialogs failing to dismiss: LYN-4208")
|
||||||
|
class test_Menus_FileMenuOptions_Work(EditorSharedTest):
|
||||||
|
from .EditorScripts import Menus_FileMenuOptions as test_module
|
||||||
+2
-6
@@ -48,17 +48,13 @@ class TestAutomation(TestAutomationBase):
|
|||||||
from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module
|
from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
||||||
|
|
||||||
def test_Docking_BasicDockedTools(self, request, workspace, editor, launcher_platform):
|
|
||||||
from .EditorScripts import Docking_BasicDockedTools as test_module
|
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
|
||||||
|
|
||||||
def test_InputBindings_Add_Remove_Input_Events(self, request, workspace, editor, launcher_platform):
|
def test_InputBindings_Add_Remove_Input_Events(self, request, workspace, editor, launcher_platform):
|
||||||
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
|
from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False)
|
self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False)
|
||||||
|
|
||||||
def test_Menus_EditMenuOptions_Work(self, request, workspace, editor, launcher_platform):
|
|
||||||
from .EditorScripts import Menus_EditMenuOptions as test_module
|
|
||||||
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
|
||||||
|
|
||||||
def test_Menus_ViewMenuOptions_Work(self, request, workspace, editor, launcher_platform):
|
def test_Menus_ViewMenuOptions_Work(self, request, workspace, editor, launcher_platform):
|
||||||
from .EditorScripts import Menus_ViewMenuOptions as test_module
|
from .EditorScripts import Menus_ViewMenuOptions as test_module
|
||||||
@@ -7,21 +7,21 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
import pytest
|
||||||
|
import sys
|
||||||
|
|
||||||
from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
|
||||||
|
from base import TestAutomationBase
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
|
||||||
@pytest.mark.SUITE_sandbox
|
@pytest.mark.SUITE_sandbox
|
||||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||||
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||||
class TestAutomationAutoTestMode(EditorTestSuite):
|
class TestAutomation(TestAutomationBase):
|
||||||
|
|
||||||
# Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions
|
def test_Menus_EditMenuOptions_Work(self, request, workspace, editor, launcher_platform):
|
||||||
global_extra_cmdline_args = ["-autotest_mode"]
|
|
||||||
|
|
||||||
class test_Docking_BasicDockedTools(EditorSharedTest):
|
|
||||||
from .EditorScripts import Docking_BasicDockedTools as test_module
|
|
||||||
|
|
||||||
class test_Menus_EditMenuOptions_Work(EditorSharedTest):
|
|
||||||
from .EditorScripts import Menus_EditMenuOptions as test_module
|
from .EditorScripts import Menus_EditMenuOptions as test_module
|
||||||
|
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
||||||
|
|
||||||
|
def test_Docking_BasicDockedTools(self, request, workspace, editor, launcher_platform):
|
||||||
|
from .EditorScripts import Docking_BasicDockedTools as test_module
|
||||||
|
self._run_test(request, workspace, editor, test_module, batch_mode=False)
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
"""
|
||||||
|
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 os
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.xfail(reason="Optimized tests are experimental, we will enable xfail and monitor them temporarily.")
|
||||||
|
@pytest.mark.SUITE_sandbox
|
||||||
|
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||||
|
@pytest.mark.parametrize("project", ["AutomatedTesting"])
|
||||||
|
class TestAutomationAutoTestMode(EditorTestSuite):
|
||||||
|
|
||||||
|
# Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions
|
||||||
|
global_extra_cmdline_args = ["-autotest_mode"]
|
||||||
|
|
||||||
|
class test_Docking_BasicDockedTools(EditorSharedTest):
|
||||||
|
from .EditorScripts import Docking_BasicDockedTools as test_module
|
||||||
|
|
||||||
|
class test_Menus_EditMenuOptions_Work(EditorSharedTest):
|
||||||
|
from .EditorScripts import Menus_EditMenuOptions as test_module
|
||||||
Reference in New Issue
Block a user