Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 opened this issue Jun 25, 2024 · 0 comments · Fixed by #524
Assignees
Labels
bug Something isn't working UI
Milestone

Comments

@MikeSchulze
Copy link
Owner

MikeSchulze commented Jun 25, 2024

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

  • do use the default gdunit settings (test root it test)
    image
  • create a CS test under res://Tests/MyTest.cs
  • press the test discovery button
    image
    the test explorer is empty
    image
  • use the context menu to debug the test
    image

Minimal reproduction project

No response

@MikeSchulze MikeSchulze added the bug Something isn't working label Jun 25, 2024
@MikeSchulze MikeSchulze self-assigned this Jun 25, 2024
@MikeSchulze MikeSchulze changed the title GD-XXX: Run/Debug CS test fails via context menu GD-518: Execution/debugging of CS tests via the context menu fails if it is not located below the test root folder Jun 25, 2024
@MikeSchulze MikeSchulze added this to the v4.3.3 milestone Jun 25, 2024
@MikeSchulze MikeSchulze added the UI label Jun 26, 2024
MikeSchulze added a commit that referenced this issue Jun 27, 2024
# Why
see #518

# What
- Use of `localize_path` for all resource paths used (cs scripts contain the system path)
- `create_tree_item()` has been corrected to split the test path into tree items depending on the view mode.
- It takes into account if the test root folder does not exist to split the full path then
MikeSchulze added a commit that referenced this issue Jun 27, 2024
# Why
see #518

# What
- Use of `localize_path` for all resource paths used (cs scripts contain
the system path)
- `create_tree_item()` has been corrected to split the test path into
tree items depending on the view mode.
- It takes into account if the test root folder does not exist to split
the full path then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant