MikeSchulze / gdUnit4Net

A Godot C# Unit Test Framework.
MIT License
61 stars 5 forks source link

GD-114: The test adapter shows the wrong `gdUnit.api` version at test discovery #114

Closed MikeSchulze closed 5 months ago

MikeSchulze commented 5 months ago

The used Test Adapter version

1.1.1

The used Godot version

v4.3.dev6.mono.official [89850d553]

Operating System

all systems

Describe the bug

The C# Dev Kit console shows the running test discovery for a project.

Tests are available, running test discovery: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll
Scheduling discovery: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll [1718198563164]
Using custom runsettings file at: d:\development\workspace\gdUnit4Net\test\.runsettings
========== Starting test discovery ==========
CheckGdUnit4ApiVersion gdUnit4Api, Version=4.2.3.0
Discover tests for assembly: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll
Discover:  TestSuite Examples.ExampleTest with 2 TestCases found.
Discover:  TestSuite Example.Tests.API.Asserts.AssertionsTest with 9 TestCases found.
Discover tests done, 2 TestSuites and total 11 Tests found.
========== Test discovery finished: 11 Tests found in 407.8 ms ==========
11 tests discovered from D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll in 407.7721 ms

It shows gdUnit4Api, Version=4.2.3.0 but I have set to the latest version (4.2.4) as dependency in my project

    <PackageReference Include="gdUnit4.api" Version="4.2.*" />
    <PackageReference Include="gdUnit4.test.adapter" Version="1.*" />

from list dependencies, the correct versions are resolved

dotnet list package --include-transitive

  [net8.0]:
   Paket oberster Ebene          Angefordert   Aufgelöst
   > gdUnit4.api                 4.2.*         4.2.4
   > gdUnit4.test.adapter        1.*           1.1.1
   > Godot.SourceGenerators      4.2.1         4.2.1
   > GodotSharp                  4.2.1         4.2.1
   > GodotSharpEditor            4.2.1         4.2.1
   > Microsoft.NET.Test.Sdk      17.9.0        17.9.0

Dev hint

The gdUnit4.test.adapter 1.1.1 was original bundled with gdUnit4.api 4.2.3 and shows this version and not the dynamic loaded version.

Steps to Reproduce

checkout the example project and do

Check the Dev Kit explorer console, it shows:

Tests removed: d:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll
Tests are available, running test discovery: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll
Scheduling discovery: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll [1718198563164]
Using custom runsettings file at: d:\development\workspace\gdUnit4Net\test\.runsettings
========== Starting test discovery ==========
CheckGdUnit4ApiVersion gdUnit4Api, Version=4.2.3.0
Discover tests for assembly: D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll
Discover:  TestSuite Examples.ExampleTest with 2 TestCases found.
Discover:  TestSuite Example.Tests.API.Asserts.AssertionsTest with 9 TestCases found.
Discover tests done, 2 TestSuites and total 11 Tests found.
========== Test discovery finished: 11 Tests found in 407.8 ms ==========
11 tests discovered from D:\development\workspace\gdUnit4Net\example\.godot\mono\temp\bin\Debug\exampleProject.dll in 407.7721 ms

Minimal reproduction project

No response

MikeSchulze commented 5 months ago

test