How ynput/ayon-pipeline-tests works
Purpose and Entry Points
This repository is an AYON pipeline-test add-on. It validates DCC publish workflows end-to-end from prepared workfiles, alongside targeted unit coverage. Add-on/package entry points are client/ayon_pipeline_tests/addon.py, client/ayon_pipeline_tests/version.py, and packaging scripts package.py and create_package.py. Test execution is organized as a Python/pytest suite under client/ayon_pipeline_tests/tests/.
Test Harness and Shared Boundaries
The shared pytest setup and common test infrastructure establish the boundary between test orchestration, filesystem fixtures, and database state. Core locations are client/ayon_pipeline_tests/tests/conftest.py, client/ayon_pipeline_tests/tests/lib/testing_classes.py, and client/ayon_pipeline_tests/tests/lib/db_handler.py. File-system assertions and fixture copying are centralized separately in client/ayon_pipeline_tests/tests/lib/file_handler.py and client/ayon_pipeline_tests/tests/lib/assert_classes.py.
DCC Publish Integration Stage
Host-specific integration tests drive the primary workflow: load a prepared scene/project fixture, initialize AYON context/startup state, run publishing, then compare generated deliverables with expected filesystem output. The host adapters and test entry modules are represented by client/ayon_pipeline_tests/tests/integration/hosts/maya/lib.py, client/ayon_pipeline_tests/tests/integration/hosts/nuke/lib.py, and client/ayon_pipeline_tests/tests/integration/hosts/aftereffects/lib.py. Photoshop follows the same host-test structure at client/ayon_pipeline_tests/tests/integration/hosts/photoshop/lib.py.
Maya Fixture-Driven Publish Contract
Maya has the most explicit on-disk contract. Inputs include SQL project data, environment variables, Maya startup customization, and a .ma workfile under client/ayon_pipeline_tests/tests/integration/hosts/maya/test_publish_in_maya/input/. Expected output trees model workfiles, model publishes, hero versions, and published representations under client/ayon_pipeline_tests/tests/integration/hosts/maya/test_publish_in_maya/expected/. The flow is exercised by client/ayon_pipeline_tests/tests/integration/hosts/maya/test_publish_in_maya.py.
Local vs. Deadline Publish Paths
Several integration suites distinguish direct host publishing from render-farm/Deadline publishing. Deadline scenarios exist for Maya, Nuke, and After Effects: client/ayon_pipeline_tests/tests/integration/hosts/maya/test_deadline_publish_in_maya.py, client/ayon_pipeline_tests/tests/integration/hosts/nuke/test_deadline_publish_in_nuke.py, and client/ayon_pipeline_tests/tests/integration/hosts/aftereffects/test_deadline_publish_in_aftereffects.py. This is an important control-flow boundary: direct interactive DCC execution versus externally scheduled/rendered publish results.
Artifact and Representation Verification
Expected outputs are not merely status assertions; they verify publish-side artifacts such as Maya scenes, Alembic caches, EXR frame sequences, and MP4 review media. Representative expected contracts are client/ayon_pipeline_tests/tests/integration/hosts/maya/test_deadline_publish_in_maya/expected/, client/ayon_pipeline_tests/tests/integration/hosts/nuke/resources/test_publish_in_nuke.zip, and client/ayon_pipeline_tests/tests/integration/hosts/photoshop/resources/test_publish_in_photoshop_review.zip. ZIP fixtures package host-specific test projects where directory fixtures are not used.
Unit-Test Layer and Dependencies
Unit tests isolate selected APIs and publish plugins from full DCC execution, notably AYON Core colorspace/review behavior, SiteSync module API behavior, Photoshop utilities, and Unreal publish validation. Key paths are client/ayon_pipeline_tests/tests/unit/addons/ayon_core/pipeline/, client/ayon_pipeline_tests/tests/unit/addons/ayon_sitesync/test_module_api.py, and client/ayon_pipeline_tests/tests/unit/hosts/unreal/plugins/publish/test_validate_sequence_frames.py. Material external runtimes/services are the target DCC applications (Maya, Nuke, After Effects, Photoshop, Unreal), AYON add-ons/services implied by the SQL fixture and add-on tests, and Deadline for scheduled publish paths.
Main entry points: conftest.py Shared Fixtures · test_publish_in_maya.py Direct DCC Publish · file_handler.py Filesystem Verification · test_deadline_publish_in_maya.py Deadline Publish Tests
Components 18
Add-on Package
- Pipeline Tests Add-on
client/ayon_pipeline_tests/addon.py - Package Builders
package.py
Test Harness
- Pytest Suite
- Shared Fixtures
client/ayon_pipeline_tests/tests/conftest.py - Test Base Classes
client/ayon_pipeline_tests/tests/lib/testing_classes.py - Database Handler
client/ayon_pipeline_tests/tests/lib/db_handler.py - Filesystem Verification
client/ayon_pipeline_tests/tests/lib/file_handler.py
DCC Integration
- DCC Host Adapters · Maya, Nuke, After Effects, and Photoshop adapters.
client/ayon_pipeline_tests/tests/integration/hosts/maya/lib.py - Direct DCC Publish
client/ayon_pipeline_tests/tests/integration/hosts/maya/test_publish_in_maya.py - Deadline Publish Tests · Covers Maya, Nuke, and After Effects paths.
client/ayon_pipeline_tests/tests/integration/hosts/maya/test_deadline_publish_in_maya.py - DCC Applications · Maya, Nuke, After Effects, Photoshop, and Unreal.
- Deadline
Publish Contracts
- Maya Input Fixture
- Maya Expected Tree · Models workfiles, publishes, hero versions, and representations.
- Host Artifact Fixtures · Contracts include scenes, Alembic, EXR sequences, and review media.
client/ayon_pipeline_tests/tests/integration/hosts/nuke/resources/test_publish_in_nuke.zip
Unit Coverage
- Core and SiteSync Units
client/ayon_pipeline_tests/tests/unit/addons/ayon_sitesync/test_module_api.py - Host Plugin Units · Includes Unreal publish validation and host utilities.
client/ayon_pipeline_tests/tests/unit/hosts/unreal/plugins/publish/test_validate_sequence_frames.py
Other components
- AYON Services & Add-ons · Project data and add-on APIs used by tests.
Connections 22
- Package Builders → Pipeline Tests Add-on: packages
- Pipeline Tests Add-on → Pytest Suite: ships test suite
- Pytest Suite → Shared Fixtures: loads
- Shared Fixtures → Test Base Classes: uses
- Shared Fixtures → Database Handler: sets database state
- Shared Fixtures → Filesystem Verification: prepares and checks files
- Database Handler → AYON Services & Add-ons: provisions project data
- Pytest Suite → Direct DCC Publish: runs
- Pytest Suite → Deadline Publish Tests: runs
- Direct DCC Publish → DCC Host Adapters: uses adapters
- DCC Host Adapters → DCC Applications: drives
- Maya Input Fixture → Direct DCC Publish: loads prepared scene
- Direct DCC Publish → Maya Expected Tree: generates deliverables checked against
- Deadline Publish Tests → Deadline: submits to
- Deadline → DCC Applications: executes publish
- Deadline Publish Tests → Host Artifact Fixtures: verifies outputs
- Filesystem Verification → Maya Expected Tree: compares output tree
- Filesystem Verification → Host Artifact Fixtures: validates artifacts
- Pytest Suite → Core and SiteSync Units: runs isolated tests
- Pytest Suite → Host Plugin Units: runs isolated tests
- Core and SiteSync Units → AYON Services & Add-ons: tests APIs
- Host Plugin Units → DCC Applications: covers host behavior