-
Notifications
You must be signed in to change notification settings - Fork 106
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
TestOutputXml regressions #1033
Comments
@mrvoorhe Thanks! You're absolutely right, and the issues are also in #1027 and #1028. There is an alpha with the fixes here https://github.com/nunit/nunit3-vs-adapter/files/9965427/NUnit3TestAdapter.4.3.1-alpha.111.zip, please try this one and see if resolves it for you too. The plan is to release as soon as possible now, but we have failing tests as the fixes here hit a dormant NUnit bug that our tests triggered. See nunit/nunit#4255 |
Good point! There was a reason for it, I need to recheck my notes on that, but you might be right.
Dependent upon your previous point here, this needs to be fixed. Thanks! |
@mrvoorhe The 4.3.1 alpha already has the fix you requested, so please try it and see if that solves the issues you see. See this code:
|
Released here: https://www.nuget.org/packages/NUnit3TestAdapter/4.3.1 |
@OsirisTerje Thanks! |
Our current setup is
Using .NET Core 6.0.100.
We use a settings like that looks like
And the
dotnet test
command looks likeAll Good.
I'm updating to net7 and have updated to the 7.0.100 sdk. Updated my packages
Everything else is the same.
Boom.
I started poking around and found
OutputXmlFolderMode
. I added the following to our settings fileBoom.
The culprit appears to be holes in the logic added with #1001 cc @OsirisTerje
Depending on how you look at #1001 introduced a handful of quirks / bugs.
<WorkDirectory>
is now required when usingTestOutputXml
and not usingOutputXmlFolderMode
. Otherwise NUnit will crash with the first set of exceptions.Using
TestOutputXml
with an absolute path and<OutputXmlFolderMode>AsSpecified</OutputXmlFolderMode>
is broken. The dependeny onWorkDirectory
is avoided thanks tonunit3-vs-adapter/src/NUnitTestAdapter/AdapterSettings.cs
Line 436 in d0f38dc
TestOutputFolder
is not uninitialized and the logic over innunit3-vs-adapter/src/NUnitTestAdapter/NUnit3TestExecutor.cs
Line 365 in d0f38dc
There is a new invalid set of values that leads to an exception. If I make a mistake and have a relative
TestOutputXml
and use<OutputXmlFolderMode>AsSpecified</OutputXmlFolderMode>
I get the following exception. Prior to Fix for #997 #1001 this mistake was not possible.Is
OutputXmlFolderMode.AsSpecified
adding value? Would it be simpler to remove this value and add Path.IsRelative checks so that an absoluteTestOutputXml
value will always be respected regardless of theOutputXmlFolderMode
value?I was able to find a way around the problems introduced by #1001. I switched to using
And that got past the exceptions. The following also avoids the bugs
Because
Path.Combine(WorkDirectory, TestOutputXml)
will returnTestOutputXml
if it is already an absolute pathThe text was updated successfully, but these errors were encountered: