dev.IntegrationTests - tixl3d/tixl GitHub Wiki
We aim to strike a balance between fast development and stability. Using GUIDs for parameter names allows us to refactor and tweak operators without affecting existing projects. However, the introduction of complex interdependencies through dynamic shader graphs increases the risk of breaking changes.
To maintain stability, we implemented a test integration framework: [VisualTest] can save the output of operators and projects into reference image files and later compare them to the current output. Using [ExecuteTests], these tests can be organized into complex trees:
Reference files are stored as small PNGs (default resolution: 160×90) and shipped with TiXL in the .defaults\Tests\
folder.
The [VisualTest] operator uses its composition and name to group reference images into folders like:
.tixl\tests\<Composition>\<VisualTest>_<ID>_<StepIndex>.png
Example:
.tixl\tests\DemoProjectTests\DemoThere_5LFJi_00.png
Use [ExecuteTests] to group tests or other [ExecuteTests]. Then:
- Click UpdateReferences to generate test images.
- Click Test to verify if the current output still matches.
The [VisualTest] operator supports capturing multiple frames over a time range and includes warm-up steps to stabilize non-deterministic effects like particles or feedback. You can tweak the test threshold and number of warm-up frames.
Running [AllTests] may consume considerable resources and take several seconds.
The key idea is adjusting the requested resolution and local time to force operators into a known state. While this doesn't work for all operators (e.g., [Damp] or [MidiInput]), it works reliably for around 90% of them.
By testing complex projects like Still / Works for Everybody, we can verify many aspects of the system.