MikeSchulze / gdUnit4

A Godot Unit Test Framework. Support for GDScript and C# unit testing
MIT License
490 stars 28 forks source link

GD-518: Execution/debugging of CS tests via the context menu fails if it is not located below the test root folder #518

Closed MikeSchulze closed 1 week ago

MikeSchulze commented 1 week ago

The used GdUnit4 version

4.3.2 (Latest Release)

The used Godot version

v4.2.2.stable.mono.official [15073afe3]

Operating System

ALL

Describe the bug

This error occurs only when the test root folder is wrongly configured or the test is located not under the test root folder. Test setup, default test root is test res://Tests/MyTest.cs The test explorer shows no tests and pressing the discover button shows no results. image

Using the context menu to run/debug ends up in a script error.

Godot Engine v4.2.2.stable.mono.official.15073afe3 - https://godotengine.org
Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 4070 Ti

GdUnit4CSharpApi type:GdUnit4.GdUnit4NetAPI loaded.
  res://addons/gdUnit4/src/ui/parts/InspectorTreeMainPanel.gd:571 - Out of bounds get index '1' (on base: 'PackedStringArray')
  res://addons/gdUnit4/src/ui/parts/InspectorTreeMainPanel.gd:781 - Cannot call method 'set_text' on a null value.
Scan for test suites.
Scanning of 1 test suites took 52ms
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test suite MingletonTest
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case MingletonTest:Instance_IsNotNull_WhenDefault
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case MingletonTest:Instance_IsNotNull_WhenDefault
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case MingletonTest:Instance_AA
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case MingletonTest:Instance_AA
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test suite MingletonTest
--- Debugging process stopped ---

Steps to Reproduce

Minimal reproduction project

No response