Testing in this area revolves around CRUD operations on prefabs, as well as spawning prefabs at runtime.
Any
Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
- Console log errors/warnings/spam
- Asserts
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/
Product: myLevel.prefab, mylevel.spawnable, Levels running in Editor and game launcher
Suggested Time Box: 30 mins
Workflow | Requests | Things to Watch For |
---|---|---|
Create a new/open an existing level | * Errors reported upon opening a new level or an existing level * Default environment is loaded (if there is one) * Load times |
|
Create new entities | * Create entities and child entities in the Entity Outliner and some in the Viewport * Drag prefab from Asset Browser * Instantiate prefab from context menu * Duplicating entities to create new copies * Undo/Redo any of the above |
* Entity Id * Entity name * Parent entity linked to (parent entity should be linked to the level prefab and child entities should be linked to its parent entities) * Creating many entities (30+ entities) |
Edit Entities | * Add/remove components to an entity * Change values of a property on a component * Reparenting entities * Copy & paste components from one entity to another * Undo/Redo any of the above |
* Adding multiple components to a single entity * Components appearing in the viewport and how it changes after editing |
Remove Entities | * Remove parent entities, child entities, entities with components * Undo/Redo any of the above |
|
Save Level | * File > Save * File > Save as * Save level within another folder * Overwrite an existing level * Shortcut keys (Ctrl + S or Ctrl + Shift + S) * Edit > Editor settings > Global Preferences > Prefabs to change the Save Prefabs Preferences |
* Level is saved in the correct location (o3de\Game Project\levels<Level Name>\Level Name.prefab) * Spawnable file is saved in correct location (o3de\Game Project\Cache\pc\levels\Level Name\Level Name.spawnable) * Asset Processor errors with level processing * After using "Save As" make some changes to the level such a deleting a few entities > Editor should remain stable Global Preferences/Save Prefabs = Ask every time
* has unsaved entities changes > simply saves level * has both unsaved prefabs and entities changes > show new prefabs modal with list of unsaved prefabs * has unsaved nested prefab > show new prefabs modal with list of unsaved prefabs including the nested prefab
|
Load/Switch Levels | Editor
* Shortcut key (Ctrl + O) * File > Open Recent * Using the filter to find and load a specific level * Switch levels a few times after adding prefabs to ensure that template is not stale * Prefab Save modal appears if there are any unsaved prefab changes (only occurs if preferences is set to "Ask every time")
LoadLevel <o3de dir>\<Game Project>\Cache\pc\levels\<Level Name>\<Level Name>.spawnable UnloadLevel <o3de dir>\<Game Project>\Cache\pc\levels\<Level Name>\<Level Name>.spawnable |
* Load time * All assets are loaded properly * Exiting game mode works, no crashing * After exiting game mode, editor should remain stable |
Exit Level | * File > Exit * Closing the editor by clicking on the 'X' mark |
* Has unsaved changes (either direct entity changes or changes within a prefab) > Show new level modal * Has no unsaved changes > Simply close the level |
Run Game | * Press Ctrl + G to run game in the editor * Run the level in the game launcher |
* Game renders without crashing * Camera is at the right position |
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/
Product: myPrefab.prefab
Suggested Time Box: 1 hour
Use Case | Requests | Things to Watch For |
---|---|---|
Create Prefab from entity | * Create Prefab from entity with child entities * Create prefab from a single entity * Create prefab from multiple entities * Create prefab with multiple prefabs * Create prefab with entities and prefab * Create prefab from entities with components attached to them * Create prefab after re-parenting (entity, prefab, nested prefab, nested entities, etc..) * Create prefab from two entities that do not share the same parent (should have an error that pops up) |
* Prefab is created with the correct parenting structure if it has child entities or prefabs * Check that prefab is created with dark blue capsule around it * All entities and prefabs should be inside the level container * Errors in AP * Saving level after prefab creation * Instantiating prefab afterwards |
Save Prefab to disk | * Make some changes to the prefab then save via Right-clicking and selecting 'Save Prefab to File' (The asterisk * symbol next to the prefab's filename, indicating that there are unsaved changes, should disappear once prefab is saved to file) * Make some changes to the prefab and then press Ctrl + S keyboard shortcut |
* When loading a level, if all prefabs have been saved to disk, then there should not be any asterisk * symbols that indicate unsaved changes * Changes are saved to prefab with the Right-click save option, but the prefab itself is not saved to the level unless the level is saved * When using Ctrl + S the level is saved and then a prefabs save modal appears with list of unsaved prefabs (only occurs if preferences is set to "Ask every time") |
Instantiate Prefab | * Instantiate prefab by dragging the asset from Asset Browser * Instantiate prefab via the context menu in Entity Outliner * Instantiate a prefab in Viewport * Instantiate a prefab level * Instantiating existing prefabs (prefabs that are checked into the branch) |
* Look at the Transform component and make sure that the prefab that has been instantiated is in the correct position * Prefab level that has been instantiated should retain all the prefabs and entities within it * Cyclical dependency error pops up when instantiating a prefab with itself |
Edit Prefab | * Enter prefab Focus mode via the Right-click context menu (or via double-clicking on prefab) * Prefab changes the dark blue capsule surrounding the prefab to light blue and opens up the prefab container * In prefab Focus mode, the user is able to select a child independently in the Viewport * Exit prefab Focus mode via the Right-click context menu (or via double-clicking on prefab) * Undo/Redo any of the above use cases |
* Unsaved prefab edits/changes NOT being retained when re-instantiating |
Remove Prefab | * Delete a single prefab * Delete the parent prefab with child entities or child prefabs * Delete a child prefab under a root prefab * Delete a child entity under a root prefab * Undo/Redo any of the above use cases * Deleting a prefab after duplicating it * Deleting a prefab after instantiating it * Deleting a level prefab that had been instantiated |
* When undoing and redoing a deletion, the prefab should not change * Deleting prefab should not cause any errors |
Product: myPrefab.prefab, myLevel.prefab
Suggested Time Box: 30 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Sharing individual prefabs | * Create a level with prefabs * Save prefab to disk * Give prefab file to another person (prefab file located in <GAME PROJECT DIR>\Prefabs\<prefab name>.prefab) |
* AP automatically picking up the prefab level and processing it * The users must have matching projects or at least the following to share prefabs: <GAME PROJECT DIR>\Registry\assets_scan_folders.setreg <GAME PROJECT DIR>\Gem\Code\tool_dependencies.cmake <GAME PROJECT DIR>\Gem\Code\runtime_dependencies.cmake |
Sharing level prefabs | * Create a level with entities and prefabs * Save the level * Give prefab file to another person (level file located in <GAME PROJECT DIR>\Levels\\<level name>.prefab) |
* The users must have matching projects or at least the following to share prefabs: <GAME PROJECT DIR>\Registry\assets_scan_folders.setreg <GAME PROJECT DIR>\Gem\Code\tool_dependencies.cmake <GAME PROJECT DIR>\Gem\Code\runtime_dependencies.cmake |
Load individual prefabs as levels | * Take a prefab from the prefab game folder and place it inside the level folder * Launch Editor and load the prefab level |
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/
Product: Nested hierarchies of prefabs/entities
Suggested Time Box: 10 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Reparenting Prefabs | * Reparenting prefab under a prefab * Reparenting prefab under an entity * Reparenting prefab under nested prefabs * Reparenting prefab under nested entities * Reparenting prefab under nested prefabs and entities * Reparenting a nested prefab under all the above scenarios * Undo/redo of any of the above use cases |
* The order of the prefabs and their respective child entities/prefabs * Saving level or prefabs after re-parenting prefabs * Instantiating prefabs after re-parenting * Reparenting prefabs to another prefab should NOT change it's world position |
Reparenting Entities | * Reparenting entity under an entity * Reparenting entity under a prefab * Reparentingentity under nested entities * Reparentingentity under nested prefabs * Reparentingentity under nested prefabs and entities * Reparenting a nested entity under all the above scenarios * Undo/redo of any of the above use cases |
* The order of the entities under the parent prefab/entities |
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/
Product: Non-prefab entity hierarchy
Suggested Time Box: 5 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Can detach a prefab | * RMB on prefab and select "Detach Prefab..." * Undo/redo the above request |
* Detaching prefabs within prefabs or prefabs within entities * The structure of the entities after detaching |
Can detach a child prefab from the root prefab | * RMB on child prefab and select "Detach Prefab..." * Undo/redo the above request |
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/entity-and-prefab-basics/
Product: Multiple exact copies of prefabs or entities inside a level
Suggested Time Box: 10 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Duplicating prefabs | * Duplicate a single prefab * Duplicate parent prefab with child entities * Duplicate parent prefab with child prefabs * Duplicate parent prefab with both child prefabs and entities * Delete duplicated prefab * Undo/redo duplication |
* The structure of nested prefabs after duplication should remain the same * Components attached to prefabs should remain the same * After duplicating prefab, it should select the new instance that was duplicated |
Duplicating entities | * Duplicate a single Entity * Duplicate parent Entity with child entities * Duplicate parent Entity with child Entities * Duplicate parent Entity with both child prefabs and entities * Delete duplicated entities * Undo/redo duplication |
* The structure of nested entities after duplication should remain the same * Components attached to entities should remain the same |
Product: None
Suggested Time Box: 10 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Undo/Redo changes with multiple prefabs | * Instantiate mulitiple prefabs * Duplicate multiple prefabs * Translate with multiple prefabs selected * Move * Scale * Rotate * Undo/redo changes made with multiple prefabs selected |
* Long hitch times when performing undo/redo on multiple prefabs * Wait times should roughly match the time it took to make those changes * Entity Inspector window is open |
Undo/Redo changes with multiple entities | * Create multiple entities * Duplicate multiple entities * Translate with multiple entities selected * Move * Scale * Rotate * Undo/redo changes made with multiple entities selected |
* Long hitch times when performing undo/redo on multiple entities * Wait times should roughly match the time it took to make those changes * Entity Inspector window is open |
Testing in this area should revolve primarily around Script Canvas configuration to spawn or despawn prefabs in Game Mode.
https://www.o3de.org/docs/learning-guide/tutorials/entities-and-prefabs/spawn-a-prefab/
Product: Runtime spawnables using ScriptCanvas Scripting
Suggested Time Box: 30 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Spawn a prefab with Script Canvas | * Create an entity with a mesh and Script Canvas component * Create a Script Canvas graph with the following nodes and variables:
* Create Spawn Ticket * Spawn * Delay * Despawn * Game Entity * EntitySpawnTicket (Variable) * SpawnableScriptAssetRef (Variable) * Run game mode |
* Changes to node input/output options after saving or reloading script canvas graph. |
Product: Runtime spawnables using Lua Scripting
Suggested Time Box: 10 minutes
Use Case | Requests | Things to Watch For |
---|---|---|
Spawn a prefab with Lua API | * Create an entity with a Lua Script component * Assign multiple spawnable prefabs * Create multiple entities with various Lua scripts * Create custom script events via the Asset Editor * Configure various spawn delay values * Run Game mode |