GD-152: Implement a TestEngine
to discover and execute tests as Godot engine process or inline execution
#152
Labels
Milestone
Is your feature request related to a problem? Please describe.
Currently, all tests in GdUnitNet are executed within the Godot engine, including unit tests that don't require engine functionality. This leads to unnecessary overhead and slower test execution for pure logic tests that could run independently of the engine.
Describe the solution you'd like
Introduce a way to explicitly mark which tests require the Godot engine runtime, allowing other tests to run more efficiently outside the engine context.
Option A: Extended TestCase Attribute
Add an engine parameter to the existing TestCase attribute:
Pros:
Cons:
Option B: New GodotTestCase Attribute
Introduce a new attribute specifically for engine-dependent tests:
Pros:
Cons:
Error Handling
When a test uses Godot engine features without the appropriate attribute/flag:
Test should fail immediately with a clear error message
Suggested error message: "This test uses Godot engine features but is not marked for engine execution. Please add [GodotTestCase] or [TestCase(engine = true)] to this test."
The framework should detect attempts to use engine features in non-engine tests, including:
The text was updated successfully, but these errors were encountered: