Skip to content

Conversation

dealproc
Copy link

Migrates to xUnit.v3 v1.1.0 from xUnit testing framework.

This is nothing more than re-targeting to xunit.v3 libraries and code patches to relieve code analysis warnings in the solution.

If running nCrunch, you will need to set two custom settings, as shown in the screenshot below:

image

@dealproc dealproc requested a review from a team as a code owner February 13, 2025 10:30
@joshkempner
Copy link
Contributor

From the failure of the build checks, these changes don't appear to be compatible with .NET 6.

@dealproc
Copy link
Author

From what I can see, it looks like building in both netfx8/netfx6, as well as the release command that is shown in the build that is failing works (at least on my machine).

image

@dealproc
Copy link
Author

Looking over the settings between the two builds, they are using different machines with different os:

22.04 (successful build machine from last PR review):
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#net-tools

24.04 (failing build machine from this PR):
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#net-tools

The 24.04 instance does not have dotnet sdk6 installed. We can discuss either amending the script to forcefully install the net6.0 sdk, or we keep the target to use ubuntu-22.04

@joshkempner
Copy link
Contributor

If the relevant GitHub Action file needs changes in order to work with this pull request, then those proposed changes can/should be part of this PR.

@dealproc
Copy link
Author

If the relevant GitHub Action file needs changes in order to work with this pull request, then those proposed changes can/should be part of this PR.

Sorry, I should have made this explicit. check-in 494b930 provides the targeting to the explicit build server container. The comment was made thereafter to call this out and if a discussion needed to happen to determine whether the preference was what I had provided through the check-in, or if there was something more detailed that was required.

Unless there is something else that you folks see...

@joshkempner
Copy link
Contributor

Ah, I see. I don't love using an outdated OS version. Probably better to install the workload we need.

@dealproc
Copy link
Author

From Microsoft Guidance, dotnet6 is not directly supported on 24.04 (current "latest"), and 24.10 removes "backport" support completely.

Ultimately, it is @ReactiveDomain/reactivedomain-codeowners decision, but I think keeping the target to 22.04 may make more sense so long as we are supporting dotnet6, as we may run into issues while supporting dotnet6 as the base build images continue to be upgraded by GitHub.

@joshkempner
Copy link
Contributor

We've made the decision to drop .NET 6 support (see #167), which should simplify things for this PR.

Moves matrix.os back to `ubuntu-latest`
@joshkempner joshkempner requested a review from jageall February 20, 2025 21:10
Copy link
Contributor

@jageall jageall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the test projects should have these two properties added to the property group to take advantage of the new testing platform : <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner> <TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>

@dealproc
Copy link
Author

Ok, before changes are made/committed, is the end goal with the changes to remove support for earlier versions of all tools regarding testing? Reading through the xUnit articles on microsoft testing platform, a mentioning within the final paragraph says to leave Microsoft.NET.Test.Sdk and xunit.runner.visualstudio in place for backward compatibility. Adding the xml tags for supporting the microsoft testing platform is simple and straightforward, so I'm not worried about that as much as I am asking about the shape of the final check-in for this.

@dealproc dealproc requested a review from jageall March 1, 2025 21:51
Copy link
Contributor

@joshkempner joshkempner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The csproj settings @jageall mentioned should be applied to ReactiveDomain.Testing as well.

Richard Bennett added 2 commits March 3, 2025 15:21
We're setting the output type to Exe as part of the testing platform, as the real expectation of xUnit v3, from what I can discover, is an executable.  Next check-in will convert the rest of the testing projects to output and executable as well.
@dealproc
Copy link
Author

dealproc commented Mar 3, 2025

Check latest two check-ins. Testing references are added, as well as converting all test projects to output *.exe files instead of *.dlls. Seems as if the testing library in reference, no matter how you adjust it, has sporadic issues with Visual Studio to actually run within Visual Studio Testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants