# Asset Processor Workflow Tests: Testing in this area focuses on the functionality of: * **Asset Processor** * Asset Processor Batch * Asset Processor GUI * **Job Analysis** * XML Schema System * Copy Jobs * Process Jobs * Dependencies * Source Dependencies * Product Dependencies * Job Dependencies * **Source Control** * Perforce Integration * **Asset Cache Server** * **Asset Relocation Tool** * **Missing Dependency Scanner** * **Intermediate Assets** * **Virtual File System** ## Common Issues to Watch For: 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. 1. Console log errors/warnings/spam 2. Asserts 3. Improperly rendered scenes ### Common Terms: ###### Base Resources: * [Asset Pipeline O3DE Resources](https://www.o3de.org/docs/user-guide/assets/pipeline/)
* [Asset Pipeline Concepts and Terms](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/concepts/)
* [O3DE Editor](https://www.o3de.org/docs/user-guide/editor/)
* [Console](https://www.o3de.org/docs/user-guide/editor/console/)
* [Asset Processor](https://www.o3de.org/docs/user-guide/assets/asset-processor/)
* [Asset Cache](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-cache/)
###### Asset Processor: * [Asset Processor Batch](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-processor-batch/)
* [Asset Processor GUI](https://www.o3de.org/docs/user-guide/assets/asset-processor/interface/)
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
* [Asset Relocation Tool](https://www.o3de.org/docs/user-guide/assets/asset-processor/move-assets/)
* [Missing Dependency Scanner](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/assets-resolving/)
* [Virtual File System](https://www.o3de.org/docs/user-guide/)
###### Job Analysis: * [Copy Jobs](https://www.o3de.org/docs/user-guide/assets/asset-types/#copy-jobs)
* [Process Jobs](https://www.o3de.org/docs/user-guide/assets/asset-types/)
* [XML Schema System](https://www.o3de.org/docs/user-guide/)
* [Job Logs](https://www.o3de.org/docs/user-guide/assets/asset-processor/debugging/#view-asset-processor-logs)
###### Asset Types: * [Source Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/source-assets/)
* [Produce Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-processing/)
* [Intermediate Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/intermediate-assets/)
###### Dependencies: * [Source Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#source-dependencies)
* [Product Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#product-dependencies)
* [Job Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#job-dependencies)
###### Source Control: * [Perforce Integration](https://www.o3de.org/docs/user-guide/)
###### Asset Processor Configuration: * [Scan Directories](https://www.o3de.org/docs/user-guide/assets/pipeline/scan-directories/)
* [File Tagging System](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/file-tagging/)
--- ## Feature: Asset Processor **Description:** Testing in this area will focus on Asset Processor and Asset Processor Batch usage. **Project Requirements:** Any project with available source files can be used. **Resources:**
[Asset Processor Interface](https://www.o3de.org/docs/user-guide/assets/asset-processor/interface/)
[Asset Processor Configuration](https://www.o3de.org/docs/user-guide/assets/asset-processor/configuration/) ### Area: Asset Ingestion | Job and Product Validation **Product:** Successfully processed assets are in cache and visible in the Asset Browser. **Suggested Time Box:** 20 Minutes | Workflow | Requests | Things to Watch For | |----------|-----------|---------------------| | **Launch Asset Processor** |
  1. Source assets already exist within a project scan directory.
| | | **Add new assets to the project** |
  1. Create and place new assets within a project scan directory:
| | | **Open new asset Job Log from Jobs tab right-click context menu** |
  1. Opens the log file up in filesystem default program for .log files.
| | | **Open new asset in Asset Browser from Jobs tab right-click context menu** |
  1. Open up Asset Browser.
| | ### Area: Source and Product Asset GUI Navigation **Product:** Source Asset and Product Asset are discoverable. **Suggested Time Box:** 10 Minutes | Workflow | Requests | Things to Watch For | |----------|----------|---------------------| | **From Jobs tab jump to source asset from right-click context menu** |
  1. Source Assets tab is opened to the the selected source asset.
| | | **Jump to a product asset from selected asset's right-click context menu** |
  1. Product Assets tab is opened to the the selected source asset.
| | | **Jump back to Source Asset from selected asset's info panel "Source Asset" button** |
  1. Source Assets tab is opened to the the selected source asset.
| | | **Reprocess asset from selected Source Asset's right-click context menu** |
  1. Asset processor performs job analysis on file.
  2. Asset is reprocessed.
  3. Asset is product cache.
| | | **Open file in Explorer from selected asset's right-click context menu** |
  1. File Explorer is opened to the source file's location.
| | ### Area: Asset Processor Batch basic actions **Project Requirements** * AssetProcessorBatch present in the build folder. If it is not it can be built using `cmake --build build/ --target AssetProcessorBatch --config profile` command from the root engine folder. **Product:** Files modified via Asset Processor Batch. **Suggested Time Box:** 10 Minutes | Workflow | Requests | Things to Watch For | |----------|----------|---------------------| | **Prepare Command Line to execute Asset Processor Batch commands** |
  1. Open Command line in the engine build folder (for example `C:\o3de-install\bin\Windows\profile\Default\`) and confirm AssetProcessorBatch can be executed for a chosen project (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\`).
| | | **Delete an asset** |
  1. Delete an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --delete=C:\Users\\O3DE\Projects\\test.txt --confirm`).
| | | **Rename an asset** |
  1. Rename an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --move=C:\Users\\O3DE\Projects\\test.txt,C:\Users\\O3DE\Projects\\test1.txt --updateReferences --confirm`).
| | | **Move an asset** |
  1. Move an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --move=C:\Users\\O3DE\Projects\\test1.txt,C:\Users\\O3DE\Projects\\Assets\test1.txt --updateReferences --confirm`).
| | --- ## Feature: Job Analysis **Description:** Testing in this area will focus on XMLSchema as well as Source, Product and Job Dependencies scanning. ### Area: XMLSchema Dependencies Scan **Project Requirements:** * XMLSchema asset with dependent files setup. For example the existing `Font.xmlschema` along with `Engine/Fonts/` (on Pre-built SDK engine their paths are `o3de-install/Assets/Engine/Schema/Font.xmlschema` and `o3de-install/Assets/Fonts/` respectively) assets could be used. **Platforms:** * Windows * Linux **Product:** An XMLSchema file scanned for missing dependencies. **Suggested Time Box:** 20 Minutes | Workflow | Requests | Things to Watch For | |----------|----------|---------------------| | **Perform scan for missing dependencies with none missing** |
  1. In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and find your `.xmlschema` file (for example `pc/schema/font.xmlschema`).
  2. In the *Missing Product Dependencies* section to the right, click the *Scan file* button.
  3. In the CLI navigate to your engine build location (for example `C:\o3de-install\bin\Windows\profile\Default\`) and run the AssetProcessorBatch command to scan for the missing dependencies for the fonts (for example `AssetProcessorBatch --project-path=C:\Users\\O3DE\Projects\ --zeroAnalysisMode --dsp=%fonts%.xml`).
| | | **Perform scan for missing dependencies with some missing** |
  1. Move your `.xmlschema` file out of it's original path (for example `o3de-install/Assets/Engine/Schema/Font.xmlschema`).
  2. In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and find an `.xml` asset that was dependent on the removed `.xmlschema` asset (for example `pc/font/vera-italic.xml`).
  3. In the *Missing Product Dependencies* section to the right, click the *Scan file* button.
  4. In the CLI navigate to your engine build location (for example `C:\o3de-install\bin\Windows\profile\Default\`) and run the AssetProcessorBatch command to scan for the missing dependencies for the fonts (for example `AssetProcessorBatch --project-path=C:\Users\\O3DE\Projects\ --zeroAnalysisMode --dsp=%fonts%.xml`).
  5. Remember to return the `.xmlschema` file back to it's original path for any further use.
| | ### Area: Source, Product and Job Dependencies **Project Requirements:** * Any project with at least one asset in each *Asset Processor* > *Assets* category: *Source Assets*, *Intermediate Assets* and *Product Assets* with one or more of *Incoming Dependencies* (*Dependencies - In*) or *Outgoing Dependencies* (*Dependencies - Out*). **Platforms:** * Windows * Linux **Product:** Scanned project cache and assets with dependencies verified to be displayed in the *Asset Processor*. **Suggested Time Box:** 20 Minutes | Workflow | Requests | Things to Watch For | |----------|----------|---------------------| | **Perform an Asset Processor Scan** |
  1. In the *Asset Processor* navigate to the *Assets* > *Settings* tab and in the *Full Scan* section click the *Start Scan* button.
| | | **Verify the Job Dependencies** |
  1. In the *Asset Processor* navigate to the *Assets* > *Source Assets* tab and verify that assets display Dependencies in the pane to the right (for example `engine.json`).
  2. In the *Asset Processor* navigate to the *Assets* > *Intermediate Assets* tab and verify that assets display Dependencies in the pane to the right (for example `materials/reflectionprobe/reflectionprobevisualization_generated.materialtype`).
  3. In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and verify that assets display Dependencies in the pane to the right (for example `pc/fonts/vera-italic.font`).
| | --- ## Feature: AP Source Control Integration **Description:** Testing in this Area will focus on connecting and working with Perforce (p4) as a source control tool. **Project Requirements:** * Perforce installed on the machine. * O3DE added to the p4 depot (without cache folders). **Platforms:** * Windows **Product:** Assets that are shared on p4 server. **Suggested Time Box:** 60 Minutes | Workflow | Requests | Things to Watch For | |----------|----------|---------------------| | **Enable Source Control plugin** |
  1. Open the O3DE Editor.
  2. Close the Welcome to O3DE window or load any level.
  3. Click LMB on the Perforce plugin icon.
  4. Enable the connection.
| | | **Configure connection settings** |
  1. Click LMB on the Perforce plugin icon.
  2. Enable the p4 connection.
  3. Open Settings in the Perforce plugin.
  4. Provide correct values for each setting:
    • Server, User and Workspace should be filled with information from p4v. Those are the same information that user needs to log into p4 applications.
    • Charset should be set to "none".
  5. Press OK.
| | | **Add asset to depot** |
  1. Import any asset to the project you are working on.
  2. Find in Asset Browser newly imported asset.
  3. Click RMB on it.
  4. From the context menu select "Add to Source Control".
  5. Open p4v application and log to it
  6. Submit changes.
|