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-90: Aborting test run from Visual Studio causes GdUnitRunner file to persist #90

Closed
DrMouseInc opened this issue Apr 20, 2024 · 9 comments · Fixed by #93
Closed

GD-90: Aborting test run from Visual Studio causes GdUnitRunner file to persist #90

DrMouseInc opened this issue Apr 20, 2024 · 9 comments · Fixed by #93
Assignees
Labels
bug Something isn't working clarified This doesn't seem right gdunit4.test.adapter This issue is related to `gdunit4.test.adapter`
Milestone

Comments

@DrMouseInc
Copy link

The used Test Adapter version

1.1.0

The used Godot version

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

Operating System

Windows 11

Describe the bug

Running tests any which way I expect that after the run is complete, the GdUnitRunner_{GUID here}.cfg file is deleted. Instead the file remains, clogging up the project folder and git changes

Steps to Reproduce

Run tests from Visual Studio using the "Debug Tests" menu option from the right click menu and have a breakpoint set in the test method. Wait for the breakpoint to be hit and the execution halted and then, instead of continuing the run by clicking the Continue with the green arrow, press the "Stop debugging" with the red square.

Minimal reproduction project

No response

@DrMouseInc DrMouseInc added bug Something isn't working gdunit4.test.adapter This issue is related to `gdunit4.test.adapter` labels Apr 20, 2024
@MikeSchulze MikeSchulze added this to the v4.2.4 milestone Apr 20, 2024
@MikeSchulze
Copy link
Owner

Thanks for reporting this issue.

@MikeSchulze MikeSchulze changed the title GD-XXX: Aborting test run from Visual Studio causes GdUnitRunner file to persist GD-90: Aborting test run from Visual Studio causes GdUnitRunner file to persist Apr 20, 2024
@MikeSchulze
Copy link
Owner

close is already fixed with v1.1.1 please update your project

@MikeSchulze MikeSchulze removed this from the v4.2.4 milestone Apr 21, 2024
@DrMouseInc
Copy link
Author

Still seeing this after updating to 1.1.1. I've attached a minimum repro after an aborted test run retained the file
GdUnitSetup.zip

@MikeSchulze MikeSchulze reopened this Apr 21, 2024
@MikeSchulze
Copy link
Owner

Just for steps to reproduce
You do

  • run debug test
  • it holds on your breakpoint
  • you stop the debugger you are not pressed the stop button on the test explorer
    The test run finished

Please attach the test explorer logs

@DrMouseInc
Copy link
Author

After the breakpoint is hit, I hit the Stop debugging button. But I get the same outcome by cancelling the tests from the test explorer window.

image

If by the logs you mean the Tests dropdown from the Output window of VS, that reads as follows:

Building Test Projects
Executing test method: GdUnitSetup.Tests.TestClass1.Test1
========== Starting test run ==========
Start executing tests, 1 TestCases total.
Current directory set to: C:\Temp\GdUnitSetup
Run with args -d --path . res://gdunit4_testadapter/TestAdapterRunner.tscn --testadapter --configfile="C:\Temp\GdUnitSetup\GdUnitRunner_58bc84bf-6b5e-4eb4-8ec2-7017411a62cf.cfg"
stdout: Godot Engine v4.2.2.stable.mono.official.15073afe3 - https://godotengine.org
stdout: Vulkan API 1.3.262 - Forward+ - Using Vulkan Device #0: AMD - AMD Radeon RX 6600M
stdout: Load testsuite C:\Temp\GdUnitSetup\Tests\TestClass1.cs
The active test run was aborted. Reason: Test host process crashed
========== Test run aborted: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========

@MikeSchulze
Copy link
Owner

Interesting, on Visual Studio Code the logs are different.

Debugger attached
stdout: Godot Engine v4.2.1.stable.mono.official.b09f793f5 - https://godotengine.org
stdout: Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 4070 Ti
stdout: Load testsuite D:\development\workspace\gdUnit4Net\test\src\asserts\BoolAssertTest.cs
stdout: Testrun ends with exit code: 0, FailFast:False
Godot ends with exit code: 0
Run TestRunner ends with 0
========== Test run finished: 9 Tests (9 Passed, 0 Failed, 0 Skipped) run in 8.1 sec ==========

looks like the stop do not terminate the process normal, i need to check this inside VS

@MikeSchulze
Copy link
Owner

MikeSchulze commented Apr 21, 2024

Looks like a VS Test issue The active test run was aborted. Reason: Test host process crashed
microsoft/vstest#2952

So I can't really act on this issue as the test execution process is killed/crashed by the testhost.exe.
I can only add a workaround like, clean up existing runner configuration files before writing the new one.

For now, I suggest adding **GdUnitRunner_*.cfg to your .gitignore

@MikeSchulze MikeSchulze added this to the v4.2.4 milestone Apr 21, 2024
@DrMouseInc
Copy link
Author

So I can't really act on this issue as the test execution process is killed/crashed by the testhost.exe. I can only add a workaround like, clean up existing runner configuration files before writing the new one.

Works for me.

For now, I suggest adding **GdUnitRunner_*.cfg to your .gitignore

That'll still leave them on the disk, so I'll rather have them show up in the Git changes tab in VS where from they're easy to delete

@MikeSchulze
Copy link
Owner

That'll still leave them on the disk, so I'll rather have them show up in the Git changes tab in VS where from they're easy to delete

Yes, sorry, but unfortunately there's nothing I can do.

@MikeSchulze MikeSchulze added the clarified This doesn't seem right label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clarified This doesn't seem right gdunit4.test.adapter This issue is related to `gdunit4.test.adapter`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants