Extension: omni.graph.test-1.10.0 |
Documentation Generated: Dec 04, 2025 |
Overview#
In order to effectively test the OmniGraph access to nodes and scripts that are not necessary for the graph to operate correctly. In order to minimize the unnecessary files, yet still have nodes and files explicitly for testing, all of that functionality has been broken out into this extension.
Dependencies#
As the purpose of this extension is to provide testing facilities for all of OmniGraph it will have load
dependencies on all of the omni.graph.* extensions. If any new ones are added they should be added to
the dependencies in the file config/extension.toml.
Data Files#
Three types of data files are accessed in this extension:
Generic data files, created in other extensions for use by the user (e.g. compound node definitions)
Example files, created to illustrate how to use certain nodes but not intended for general use
Test files, used only for the purpose of loading to test certain features
The data/ subdirectories in this extension contains the latter of those three. The other files live in the
lowest level extension in which they are legal (e.g. if they contain a node from omni.graph.nodes then
they will live in that extension). As this extension has dependencies on all of the OmniGraph extensions it will
have access to all of their data files as well.
Node Files#
Most nodes will come from other extensions. Some nodes are created explicitly for testing purposes. These will appear in this extension and should not be used for any other purpose.
Import Example#
This simple example shows how the test files from the omni.graph.examples.python extension were imported and
enabled in this extension.
The first step was to move the required files into the directory tree:
omni.graph.test/
├── python/
└── tests/
├──── test_omnigraph_simple.py
└── data/
├──── TestEventTrigger.usda
└──── TestExecutionConnections.usda
Note
The two .usda files contain only nodes from the omni.graph.examples.python extension and are solely used
for test purposes. That is why they could be moved into the extension’s test directory.
Next the standard automatic test detection file was added to omni.graph.test/python/tests/__init__.py
1"""There is no public API to this module."""
2
3__all__ = []
4
5scan_for_test_modules = True
6"""The presence of this object causes the test runner to automatically scan the directory for unit test cases"""
Finally, the config/extension.toml had additions made to inform it of the dependency on the new extension:
1[package]
2version = "1.10.0"
3title = "OmniGraph Regression Testing"
4category = "Graph"
5readme = "docs/README.md"
6changelog = "docs/CHANGELOG.md"
7description = "Contains test scripts and files used to test the OmniGraph extensions where the tests cannot live in a single extension."
8repository = "https://gitlab-master.nvidia.com/omniverse/kit-extensions/kit-omnigraph"
9keywords = ["kit", "omnigraph", "tests"]
10python.import_mode = "ParallelThread"
11preview_image = "data/preview.png"
12icon = "data/icon.svg"
13writeTarget.kit = true
14writeTarget.usd = true
15support_level = "Sample"
16
17# Main module for the Python interface
18[[python.module]]
19name = "omni.graph.test"
20
21[[native.plugin]]
22path = "bin/*.plugin"
23recursive = false
24
25# Watch the .ogn files for hot reloading (only works for Python files)
26[fswatcher.patterns]
27include = ["*.ogn", "*.py"]
28exclude = ["Ogn*Database.py"]
29
30# The bare minimum of dependencies required for bringing up the extension
31[dependencies]
32"omni.graph.core" = { version = "3.0.0" }
33"omni.graph" = { version = "1.139.0" }
34"omni.graph.tools" = { version = "1.77.0" }
35
36[[test]]
37timeout = 1800
38
39# Other extensions that need to load in order for this one to work.
40# This list deliberately omits omni.graph and omni.graph.tools to ensure that extensions that rely on recursive
41# dependencies on OmniGraph work properly.
42dependencies = [
43 "omni.kit.ui_test",
44 "omni.kit.usd.layers",
45 "omni.graph.examples.cpp",
46 "omni.graph.examples.python",
47 "omni.graph.nodes",
48 "omni.graph.tutorials",
49 "omni.graph.action",
50 "omni.graph.scriptnode",
51 "omni.kit.stage_template.core",
52 "omni.kit.primitive.mesh",
53 # Needed for tests which use Fabric Scene Delegate
54 "omni.hydra.usdrt_delegate",
55]
56
57stdoutFailPatterns.exclude = [
58 # Exclude carb.events leak that only shows up locally
59 "*[Error] [carb.events.plugin]*PooledAllocator*",
60 # Exclude messages which say they should be ignored
61 "*Ignore this error/warning*",
62 "*Types: unknown and rel*" # OM-86183
63]
64
65pythonTests.unreliable = [
66 "*test_change_pipeline_stage*", # OM-66115
67 "*test_action_compounds*", # OM-120545
68]
69
70args = [
71 "--no-window",
72 "--enable omni.inspect" # here instead of in `dependencies` to avoid 'definition sanity check failure'
73]
74
75[documentation]
76pages = [
77 "docs/Overview.md",
78 "docs/CHANGELOG.md",
79]