"fixing review comments"
This commit is contained in:
+6
-11
@@ -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)
|
||||
@@ -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')
|
||||
+3
-4
@@ -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
|
||||
+3
-4
@@ -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
|
||||
+6
-17
@@ -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()
|
||||
+3
-4
@@ -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
|
||||
+3
-5
@@ -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"
|
||||
|
||||
+3
-4
@@ -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
|
||||
+4
-2
@@ -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)
|
||||
+3
-4
@@ -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"),
|
||||
Reference in New Issue
Block a user