TestSuite_Main.py 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. """
  2. Copyright (c) Contributors to the Open 3D Engine Project.
  3. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. """
  6. import os
  7. import pytest
  8. import ly_test_tools.environment.file_system as file_system
  9. from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorBatchedTest, EditorParallelTest, EditorTestSuite
  10. @pytest.mark.SUITE_main
  11. @pytest.mark.parametrize("launcher_platform", ['windows_editor'])
  12. @pytest.mark.parametrize("project", ["AutomatedTesting"])
  13. class TestAutomation(EditorTestSuite):
  14. # Helpers for test asset cleanup
  15. def cleanup_test_level(self, workspace):
  16. file_system.delete([os.path.join(workspace.paths.engine_root(), "AutomatedTesting", "Levels", "tmp_level")],
  17. True, True)
  18. class test_AltitudeFilter_Component(EditorBatchedTest):
  19. from .EditorScripts import AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude as test_module
  20. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/17337")
  21. class test_AltitudeFilter_Toggle(EditorBatchedTest):
  22. from .EditorScripts import AltitudeFilter_FilterStageToggle as test_module
  23. class test_AltitudeFilter_Shape(EditorBatchedTest):
  24. from .EditorScripts import AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude as test_module
  25. class test_AssetListCombiner(EditorBatchedTest):
  26. from .EditorScripts import AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea as test_module
  27. class test_AssetWeightSelector(EditorBatchedTest):
  28. from .EditorScripts import AssetWeightSelector_InstancesExpressBasedOnWeight as test_module
  29. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/4155")
  30. class test_DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius(EditorBatchedTest):
  31. from .EditorScripts import DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius as test_module
  32. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/4155")
  33. class test_DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius(EditorBatchedTest):
  34. from .EditorScripts import DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius as test_module
  35. class test_EmptyInstanceSpawner_EmptySpawnerWorks(EditorBatchedTest):
  36. from .EditorScripts import EmptyInstanceSpawner_EmptySpawnerWorks as test_module
  37. class test_InstanceSpawnerPriority(EditorBatchedTest):
  38. from .EditorScripts import InstanceSpawnerPriority_LayerAndSubPriority as test_module
  39. class test_LayerBlender_E2E_Editor(EditorSingleTest):
  40. from .EditorScripts import LayerBlender_E2E_Editor as test_module
  41. # Custom setup/teardown to remove test level created during test
  42. def setup(self, request, workspace):
  43. TestAutomation.cleanup_test_level(self, workspace)
  44. def teardown(self, request, workspace, editor_test_results):
  45. TestAutomation.cleanup_test_level(self, workspace)
  46. class test_LayerBlocker(EditorBatchedTest):
  47. from .EditorScripts import LayerBlocker_InstancesBlockedInConfiguredArea as test_module
  48. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/17337")
  49. class test_LayerSpawner_Toggle(EditorBatchedTest):
  50. from .EditorScripts import LayerSpawner_FilterStageToggle as test_module
  51. class test_LayerSpawner_InheritBehavior(EditorBatchedTest):
  52. from .EditorScripts import LayerSpawner_InheritBehaviorFlag as test_module
  53. class test_LayerSpawner_Plant(EditorBatchedTest):
  54. from .EditorScripts import LayerSpawner_InstancesPlantInAllSupportedShapes as test_module
  55. @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/6549")
  56. class test_LayerSpawner_InstancesRefreshUsingCorrectViewportCamera(EditorBatchedTest):
  57. from .EditorScripts import LayerSpawner_InstancesRefreshUsingCorrectViewportCamera as test_module
  58. class test_MeshBlocker_Mesh(EditorBatchedTest):
  59. from .EditorScripts import MeshBlocker_InstancesBlockedByMesh as test_module
  60. class test_MeshBlocker_Height(EditorBatchedTest):
  61. from .EditorScripts import MeshBlocker_InstancesBlockedByMeshHeightTuning as test_module
  62. class test_MeshSurfaceTagEmitter_Mesh(EditorBatchedTest):
  63. from .EditorScripts import MeshSurfaceTagEmitter_DependentOnMeshComponent as test_module
  64. class test_MeshSurfaceTagEmitter_Tags(EditorBatchedTest):
  65. from .EditorScripts import MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module
  66. class test_SurfaceTagEmitter(EditorBatchedTest):
  67. from .EditorScripts import PhysXColliderSurfaceTagEmitter_E2E_Editor as test_module
  68. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/17337")
  69. class test_PositionModifier_Snap(EditorBatchedTest):
  70. from .EditorScripts import PositionModifier_AutoSnapToSurfaceWorks as test_module
  71. class test_PositionModifier_Plant(EditorBatchedTest):
  72. from .EditorScripts import \
  73. PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets as test_module
  74. class test_PrefabSpawner_Embedded(EditorSingleTest):
  75. from .EditorScripts import PrefabInstanceSpawner_Embedded_E2E as test_module
  76. # Custom setup/teardown to remove test level created during test
  77. def setup(self, request, workspace):
  78. TestAutomation.cleanup_test_level(self, workspace)
  79. def teardown(self, request, workspace, editor_test_results):
  80. TestAutomation.cleanup_test_level(self, workspace)
  81. class test_PrefabSpawner_External(EditorSingleTest):
  82. from .EditorScripts import PrefabInstanceSpawner_External_E2E as test_module
  83. # Custom setup/teardown to remove test level created during test
  84. def setup(self, request, workspace):
  85. TestAutomation.cleanup_test_level(self, workspace)
  86. def teardown(self, request, workspace, editor_test_results):
  87. TestAutomation.cleanup_test_level(self, workspace)
  88. class test_RotationModifier(EditorBatchedTest):
  89. from .EditorScripts import RotationModifier_InstancesRotateWithinRange as test_module
  90. class test_RotationModifierOverrides(EditorBatchedTest):
  91. from .EditorScripts import RotationModifierOverrides_InstancesRotateWithinRange as test_module
  92. class test_ScaleModifier(EditorBatchedTest):
  93. from .EditorScripts import ScaleModifier_InstancesProperlyScale as test_module
  94. class test_ScaleModifierOverrides(EditorBatchedTest):
  95. from .EditorScripts import ScaleModifierOverrides_InstancesProperlyScale as test_module
  96. class test_ShapeFilter_Toggle(EditorBatchedTest):
  97. from .EditorScripts import ShapeIntersectionFilter_FilterStageToggle as test_module
  98. class test_ShapeFilter_Plant(EditorBatchedTest):
  99. from .EditorScripts import ShapeIntersectionFilter_InstancesPlantInAssignedShape as test_module
  100. class test_SlopeAlignmentModifier(EditorBatchedTest):
  101. from .EditorScripts import SlopeAlignmentModifier_InstanceSurfaceAlignment as test_module
  102. class test_SlopeAlignmentModifierOverrides(EditorBatchedTest):
  103. from .EditorScripts import SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment as test_module
  104. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/17337")
  105. class test_SlopeFilter_Plant(EditorBatchedTest):
  106. from .EditorScripts import SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope as test_module
  107. class test_SpawnerPrefabs_Toggle(EditorBatchedTest):
  108. from .EditorScripts import SpawnerPrefabs_PrefabCreationAndVisibilityToggleWorks as test_module
  109. class test_SurfaceDataRefreshes(EditorBatchedTest):
  110. from .EditorScripts import SurfaceDataRefreshes_RemainsStable as test_module
  111. class test_SurfaceMaskFilter_BasicTag(EditorBatchedTest):
  112. from .EditorScripts import SurfaceMaskFilter_BasicSurfaceTagCreation as test_module
  113. class test_SurfaceMaskFilter_ExclusiveTag(EditorBatchedTest):
  114. from .EditorScripts import SurfaceMaskFilter_ExclusionList as test_module
  115. class test_SurfaceMaskFilter_InclusiveTag(EditorBatchedTest):
  116. from .EditorScripts import SurfaceMaskFilter_InclusionList as test_module
  117. class test_SurfaceMaskFilterOverrides(EditorBatchedTest):
  118. from .EditorScripts import SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected as test_module
  119. class test_SystemSettings_SectorPointDensity(EditorBatchedTest):
  120. from .EditorScripts import SystemSettings_SectorPointDensity as test_module
  121. class test_SystemSettings_SectorSize(EditorBatchedTest):
  122. from .EditorScripts import SystemSettings_SectorSize as test_module
  123. class test_VegetationInstances_DespawnWhenOutOfRange(EditorBatchedTest):
  124. from .EditorScripts import VegetationInstances_DespawnWhenOutOfRange as test_module