TestSuite_Main.py 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(EditorBatchedTest):
  19. from .EditorScripts import AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude as test_module
  20. class test_AltitudeFilter_FilterStageToggle(EditorBatchedTest):
  21. from .EditorScripts import AltitudeFilter_FilterStageToggle as test_module
  22. class test_AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(EditorBatchedTest):
  23. from .EditorScripts import AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude as test_module
  24. class test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(EditorBatchedTest):
  25. from .EditorScripts import AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea as test_module
  26. class test_AssetWeightSelector_InstancesExpressBasedOnWeight(EditorBatchedTest):
  27. from .EditorScripts import AssetWeightSelector_InstancesExpressBasedOnWeight as test_module
  28. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/4155")
  29. class test_DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius(EditorBatchedTest):
  30. from .EditorScripts import DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius as test_module
  31. @pytest.mark.skip(reason="https://github.com/o3de/o3de/issues/4155")
  32. class test_DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius(EditorBatchedTest):
  33. from .EditorScripts import DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius as test_module
  34. class test_EmptyInstanceSpawner_EmptySpawnerWorks(EditorBatchedTest):
  35. from .EditorScripts import EmptyInstanceSpawner_EmptySpawnerWorks as test_module
  36. class test_InstanceSpawnerPriority_LayerAndSubPriority_HigherValuesPlantOverLower(EditorBatchedTest):
  37. from .EditorScripts import InstanceSpawnerPriority_LayerAndSubPriority as test_module
  38. class test_LayerBlender_E2E_Editor(EditorSingleTest):
  39. from .EditorScripts import LayerBlender_E2E_Editor as test_module
  40. # Custom setup/teardown to remove test level created during test
  41. def setup(self, request, workspace):
  42. TestAutomation.cleanup_test_level(self, workspace)
  43. def teardown(self, request, workspace, editor_test_results):
  44. TestAutomation.cleanup_test_level(self, workspace)
  45. class test_LayerBlocker_InstancesBlockedInConfiguredArea(EditorBatchedTest):
  46. from .EditorScripts import LayerBlocker_InstancesBlockedInConfiguredArea as test_module
  47. class test_LayerSpawner_FilterStageToggle(EditorBatchedTest):
  48. from .EditorScripts import LayerSpawner_FilterStageToggle as test_module
  49. class test_LayerSpawner_InheritBehaviorFlag(EditorBatchedTest):
  50. from .EditorScripts import LayerSpawner_InheritBehaviorFlag as test_module
  51. class test_LayerSpawner_InstancesPlantInAllSupportedShapes(EditorBatchedTest):
  52. from .EditorScripts import LayerSpawner_InstancesPlantInAllSupportedShapes as test_module
  53. @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/6549")
  54. class test_LayerSpawner_InstancesRefreshUsingCorrectViewportCamera(EditorBatchedTest):
  55. from .EditorScripts import LayerSpawner_InstancesRefreshUsingCorrectViewportCamera as test_module
  56. class test_MeshBlocker_InstancesBlockedByMesh(EditorBatchedTest):
  57. from .EditorScripts import MeshBlocker_InstancesBlockedByMesh as test_module
  58. class test_MeshBlocker_InstancesBlockedByMeshHeightTuning(EditorBatchedTest):
  59. from .EditorScripts import MeshBlocker_InstancesBlockedByMeshHeightTuning as test_module
  60. class test_MeshSurfaceTagEmitter_DependentOnMeshComponent(EditorBatchedTest):
  61. from .EditorScripts import MeshSurfaceTagEmitter_DependentOnMeshComponent as test_module
  62. class test_MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(EditorBatchedTest):
  63. from .EditorScripts import MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module
  64. class test_PhysXColliderSurfaceTagEmitter_E2E_Editor(EditorBatchedTest):
  65. from .EditorScripts import PhysXColliderSurfaceTagEmitter_E2E_Editor as test_module
  66. class test_PositionModifier_AutoSnapToSurfaceWorks(EditorBatchedTest):
  67. from .EditorScripts import PositionModifier_AutoSnapToSurfaceWorks as test_module
  68. class test_PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets(EditorBatchedTest):
  69. from .EditorScripts import \
  70. PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets as test_module
  71. class test_PrefabInstanceSpawner_Embedded_E2E_Editor(EditorSingleTest):
  72. from .EditorScripts import PrefabInstanceSpawner_Embedded_E2E as test_module
  73. # Custom setup/teardown to remove test level created during test
  74. def setup(self, request, workspace):
  75. TestAutomation.cleanup_test_level(self, workspace)
  76. def teardown(self, request, workspace, editor_test_results):
  77. TestAutomation.cleanup_test_level(self, workspace)
  78. class test_PrefabInstanceSpawner_External_E2E_Editor(EditorSingleTest):
  79. from .EditorScripts import PrefabInstanceSpawner_External_E2E as test_module
  80. # Custom setup/teardown to remove test level created during test
  81. def setup(self, request, workspace):
  82. TestAutomation.cleanup_test_level(self, workspace)
  83. def teardown(self, request, workspace, editor_test_results):
  84. TestAutomation.cleanup_test_level(self, workspace)
  85. class test_RotationModifier_InstancesRotateWithinRange(EditorBatchedTest):
  86. from .EditorScripts import RotationModifier_InstancesRotateWithinRange as test_module
  87. class test_RotationModifierOverrides_InstancesRotateWithinRange(EditorBatchedTest):
  88. from .EditorScripts import RotationModifierOverrides_InstancesRotateWithinRange as test_module
  89. class test_ScaleModifier_InstancesProperlyScale(EditorBatchedTest):
  90. from .EditorScripts import ScaleModifier_InstancesProperlyScale as test_module
  91. class test_ScaleModifierOverrides_InstancesProperlyScale(EditorBatchedTest):
  92. from .EditorScripts import ScaleModifierOverrides_InstancesProperlyScale as test_module
  93. class test_ShapeIntersectionFilter_FilterStageToggle(EditorBatchedTest):
  94. from .EditorScripts import ShapeIntersectionFilter_FilterStageToggle as test_module
  95. class test_ShapeIntersectionFilter_InstancesPlantInAssignedShape(EditorBatchedTest):
  96. from .EditorScripts import ShapeIntersectionFilter_InstancesPlantInAssignedShape as test_module
  97. class test_SlopeAlignmentModifier_InstanceSurfaceAlignment(EditorBatchedTest):
  98. from .EditorScripts import SlopeAlignmentModifier_InstanceSurfaceAlignment as test_module
  99. class test_SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment(EditorBatchedTest):
  100. from .EditorScripts import SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment as test_module
  101. class test_SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlopes(EditorBatchedTest):
  102. from .EditorScripts import SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope as test_module
  103. class test_SpawnerPrefabs_PrefabCreationAndVisibilityToggleWorks(EditorBatchedTest):
  104. from .EditorScripts import SpawnerPrefabs_PrefabCreationAndVisibilityToggleWorks as test_module
  105. class test_SurfaceDataRefreshes_RemainsStable(EditorBatchedTest):
  106. from .EditorScripts import SurfaceDataRefreshes_RemainsStable as test_module
  107. class test_SurfaceMaskFilter_BasicSurfaceTagCreation(EditorBatchedTest):
  108. from .EditorScripts import SurfaceMaskFilter_BasicSurfaceTagCreation as test_module
  109. class test_SurfaceMaskFilter_ExclusiveSurfaceTags_Function(EditorBatchedTest):
  110. from .EditorScripts import SurfaceMaskFilter_ExclusionList as test_module
  111. class test_SurfaceMaskFilter_InclusiveSurfaceTags_Function(EditorBatchedTest):
  112. from .EditorScripts import SurfaceMaskFilter_InclusionList as test_module
  113. class test_SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected(EditorBatchedTest):
  114. from .EditorScripts import SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected as test_module
  115. class test_SystemSettings_SectorPointDensity(EditorBatchedTest):
  116. from .EditorScripts import SystemSettings_SectorPointDensity as test_module
  117. class test_SystemSettings_SectorSize(EditorBatchedTest):
  118. from .EditorScripts import SystemSettings_SectorSize as test_module
  119. class test_VegetationInstances_DespawnWhenOutOfRange(EditorBatchedTest):
  120. from .EditorScripts import VegetationInstances_DespawnWhenOutOfRange as test_module