Skip to content

Geometry Node Tests

Geometry Nodes tests are located in the folder tests/files/modeling/geometry_nodes. Each test file must have an object named test_object with the modifiers to be evaluated. When the test runs, all modifiers on the test object are applied and the result is compared to the geometry of the object named expected_object.

When adding a new test, to get it to run, execute cmake . in the build folder. If the test is added in a new category (i.e. folder), the new category must be added in tests/python/CMakeLists.txt.

To run a test, use ctest -R test_file_name. Unless you created the expected object manually, it should fail at first. Running BLENDER_TEST_UPDATE=1 ctest -R test_file_name can be used to automatically create the expected object.

Currently only meshes are compared, so the two objects compared must be mesh objects, though other object types can be used for the tests if the final result is copied to the expected mesh object with the object info node. Instance data is not compared either.

When testing assets from the essentials library, they should be manually linked with a relative path rather than packed, so that changes to assets are actually tested.