diff --git a/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels.py b/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py similarity index 93% rename from AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels.py rename to AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py index 4e4a037ec9..ce46da494c 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/Editor_NewExistingLevels_Works.py @@ -9,9 +9,7 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -Test case ID: LY-123945 Test Case Title: Create Test for UI apps- Editor -URL of the test case: https://jira.agscollab.com/browse/LY-123945 """ @@ -30,7 +28,7 @@ class Tests(): # fmt: on -def Editor_NewExistingLevels(): +def Editor_NewExistingLevels_Works(): """ Summary: Perform the below operations on Editor @@ -69,9 +67,9 @@ def Editor_NewExistingLevels(): """ import os - import hydra_editor_utils as hydra - from utils import TestHelper as helper - from utils import Report + import editor_python_test_tools.hydra_editor_utils as hydra + from editor_python_test_tools.utils import TestHelper as helper + from editor_python_test_tools.utils import Report import azlmbr.bus as bus import azlmbr.editor as editor import azlmbr.legacy.general as general @@ -146,10 +144,7 @@ def Editor_NewExistingLevels(): if __name__ == "__main__": - import ImportPathHelper as imports - imports.init() + from editor_python_test_tools.utils import Report - from utils import Report - - Report.start_test(Editor_NewExistingLevels) + Report.start_test(Editor_NewExistingLevels_Works) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/ImportPathHelper.py b/AutomatedTesting/Gem/PythonTests/smoke/ImportPathHelper.py deleted file mode 100644 index 70bed6e526..0000000000 --- a/AutomatedTesting/Gem/PythonTests/smoke/ImportPathHelper.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -its licensors. - -For complete copyright and license terms please see the LICENSE at the root of this -distribution (the "License"). All use of this software is governed by the License, -or, if provided, by the license below or the license accompanying this file. Do not -remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -""" - -def init(): - import os - import sys - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools') diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetBuilder.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py similarity index 89% rename from AutomatedTesting/Gem/PythonTests/smoke/test_AssetBuilder.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py index da2abff50f..e20809b1b8 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetBuilder.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBuilder_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124059 : CLI tool - AssetBuilder +CLI tool - AssetBuilder Launch AssetBuilder and Verify the help message """ @@ -23,7 +23,7 @@ import ly_test_tools.environment.process_utils as process_utils @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestAssetBuilder(object): +class TestCLIToolAssetBuilderWorks(object): @pytest.fixture(autouse=True) def setup_teardown(self, request): def teardown(): @@ -31,8 +31,7 @@ class TestAssetBuilder(object): request.addfinalizer(teardown) - @pytest.mark.test_case_id("LY-124059") - def test_AssetBuilder(self, request, editor, build_directory): + def test_CLITool_AssetBuilder_Works(self, request, editor, build_directory): file_path = os.path.join(build_directory, "AssetBuilder") help_message = "AssetBuilder is part of the Asset Processor" # Launch AssetBuilder diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetBundlerBatch.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py similarity index 89% rename from AutomatedTesting/Gem/PythonTests/smoke/test_AssetBundlerBatch.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py index d361c62f5f..8a20715b3f 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetBundlerBatch.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetBundlerBatch_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124060 : CLI tool - AssetBundlerBatch +CLI tool - AssetBundlerBatch Launch AssetBundlerBatch and Verify the help message """ @@ -23,7 +23,7 @@ import ly_test_tools.environment.process_utils as process_utils @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestAssetBundlerBatch(object): +class TestCLIToolAssetBundlerBatchWorks(object): @pytest.fixture(autouse=True) def setup_teardown(self, request): def teardown(): @@ -31,8 +31,7 @@ class TestAssetBundlerBatch(object): request.addfinalizer(teardown) - @pytest.mark.test_case_id("LY-124060") - def test_AssetBundlerBatch(self, request, editor, build_directory): + def test_CLITool_AssetBundlerBatch_Works(self, request, editor, build_directory): file_path = os.path.join(build_directory, "AssetBundlerBatch") help_message = "Specifies the Seed List file to operate on by path" # Launch AssetBundlerBatch diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetProcessorBatch.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py similarity index 54% rename from AutomatedTesting/Gem/PythonTests/smoke/test_AssetProcessorBatch.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py index ab541b94c1..30e681050c 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_AssetProcessorBatch.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AssetProcessorBatch_Works.py @@ -10,34 +10,23 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124061 : CLI tool - AssetProcessorBatch +CLI tool - AssetProcessorBatch Launch AssetProcessorBatch and Shutdown AssetProcessorBatch without any crash """ # Import builtin libraries import pytest -import os -import sys - -sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../assetpipeline/") - -# Import fixtures -from ap_fixtures.asset_processor_fixture import asset_processor as asset_processor +from ly_test_tools.o3de.asset_processor import AssetProcessor @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") -@pytest.mark.usefixtures("asset_processor") @pytest.mark.SUITE_smoke -class TestsAssetProcessorBatchs(object): - @pytest.mark.test_case_id("LY-124061") - def test_AssetProcessorBatch(self, asset_processor): +class TestsCLIToolAssetProcessorBatchWorks(object): + def test_CLITool_AssetProcessorBatch_Works(self, workspace): """ Test Launching AssetProcessorBatch and verifies that is shuts down without issue """ - # Create a sample asset root so we don't process every asset for every platform - asset_processor.create_temp_asset_root() - # Launch AssetProcessorBatch, assert batch processing success - result, _ = asset_processor.batch_process() - assert result, "AP Batch failed" + asset_processor = AssetProcessor(workspace) + asset_processor.batch_process() diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_AzTestRunner.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py similarity index 90% rename from AutomatedTesting/Gem/PythonTests/smoke/test_AzTestRunner.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py index d1bc44fe2f..5983cd7496 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_AzTestRunner.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_AzTestRunner_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124062 : CLI tool - AzTestRunner +CLI tool - AzTestRunner Launch AzTestRunner and Verify the help message """ @@ -23,7 +23,7 @@ import ly_test_tools.environment.process_utils as process_utils @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestAzTestRunner(object): +class TestCLIToolAzTestRunnerWorks(object): @pytest.fixture(autouse=True) def setup_teardown(self, request): def teardown(): @@ -31,8 +31,7 @@ class TestAzTestRunner(object): request.addfinalizer(teardown) - @pytest.mark.test_case_id("LY-124062") - def test_AzTestRunner(self, request, editor, build_directory): + def test_CLITool_AzTestRunner_Works(self, request, editor, build_directory): file_path = os.path.join(build_directory, "AzTestRunner") help_message = "OKAY Symbol found: AzRunUnitTests" # Launch AzTestRunner diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_PythonBindingsExample.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py similarity index 87% rename from AutomatedTesting/Gem/PythonTests/smoke/test_PythonBindingsExample.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py index 140e76fc96..68d12d0e70 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_PythonBindingsExample.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_PythonBindingsExample_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124064 : CLI tool - PythonBindingsExample +CLI tool - PythonBindingsExample Launch PythonBindingsExample and Verify the help message """ @@ -23,7 +23,7 @@ import ly_test_tools.environment.process_utils as process_utils @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestPythonBindingsExample(object): +class TestCLIToolPythonBindingsExampleWorks(object): @pytest.fixture(autouse=True) def setup_teardown(self, request): def teardown(): @@ -31,8 +31,7 @@ class TestPythonBindingsExample(object): request.addfinalizer(teardown) - @pytest.mark.test_case_id("LY-124064") - def test_PythonBindingsExample(self, request, editor, build_directory): + def test_CLITool_PythonBindingsExample_Works(self, request, editor, build_directory): file_path = os.path.join(build_directory, "PythonBindingsExample") help_message = "--help Prints the help text" # Launch PythonBindingsExample @@ -42,4 +41,3 @@ class TestPythonBindingsExample(object): ), f"Error occurred while launching {file_path}: {output.stderr}" # Verify help message assert help_message in str(output.stdout), f"Help Message: {help_message} is not present" - diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_SerializeContextTools.py b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py similarity index 88% rename from AutomatedTesting/Gem/PythonTests/smoke/test_SerializeContextTools.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py index 763d84625d..94178ca9d6 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_SerializeContextTools.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_CLITool_SerializeContextTools_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124066 : CLI tool - SerializeContextTools +CLI tool - SerializeContextTools Launch SerializeContextTools and Verify the help message """ @@ -23,7 +23,7 @@ import ly_test_tools.environment.process_utils as process_utils @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestSerializeContextTools(object): +class TestCLIToolSerializeContextToolsWorks(object): @pytest.fixture(autouse=True) def setup_teardown(self, request): def teardown(): @@ -31,8 +31,7 @@ class TestSerializeContextTools(object): request.addfinalizer(teardown) - @pytest.mark.test_case_id("LY-124066") - def test_SerializeContextTools(self, request, editor, build_directory): + def test_CLITool_SerializeContextTools_Works(self, request, editor, build_directory): file_path = os.path.join(build_directory, "SerializeContextTools") help_message = "Converts a file with an ObjectStream to the new JSON" # Launch SerializeContextTools diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels.py b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py similarity index 88% rename from AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py index 85d53d098d..510734a4a2 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py @@ -24,11 +24,13 @@ import ly_test_tools.environment.file_system as file_system @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.parametrize("level", ["temp_level"]) class TestAutomation(TestAutomationBase): - def test_Editor_NewExistingLevels(self, request, workspace, editor, level, project, launcher_platform): + def test_Editor_NewExistingLevels_Works(self, request, workspace, editor, level, project, launcher_platform): def teardown(): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) + request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) - from . import Editor_NewExistingLevels as test_module + from . import Editor_NewExistingLevels_Works as test_module + self._run_test(request, workspace, editor, test_module) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_Statictool_Scripts.py b/AutomatedTesting/Gem/PythonTests/smoke/test_StaticTools_GenPakShaders_Works.py similarity index 90% rename from AutomatedTesting/Gem/PythonTests/smoke/test_Statictool_Scripts.py rename to AutomatedTesting/Gem/PythonTests/smoke/test_StaticTools_GenPakShaders_Works.py index 8eac2ff099..05b91a602d 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_Statictool_Scripts.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_StaticTools_GenPakShaders_Works.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ """ -LY-124058: Static tool scripts +Static tool scripts Launch Static tool and Verify the help message """ @@ -34,9 +34,8 @@ def verify_help_message(static_tool): @pytest.mark.parametrize("project", ["AutomatedTesting"]) @pytest.mark.usefixtures("automatic_process_killer") @pytest.mark.SUITE_smoke -class TestStatictoolScripts(object): - @pytest.mark.test_case_id("LY-124058") - def test_Statictool_Scripts(self, request, editor): +class TestStaticToolsGenPakShadersWorks(object): + def test_StaticTools_GenPakShaders_Works(self, request, editor): static_tools = [ os.path.join(editor.workspace.paths.engine_root(), "scripts", "bundler", "gen_shaders.py"), os.path.join(editor.workspace.paths.engine_root(), "scripts", "bundler", "get_shader_list.py"),