-
Notifications
You must be signed in to change notification settings - Fork 32
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
Target xUnit v3 for our v2 release #118
Conversation
This was causing tests to hang, and xunit v3 doesn't support it any more anyway.
There's a fatal error in the runner that doesn't happen in VS, but does happen when running tests from the command line. It's causing PR validation to fail. I got this from the logs:
This can be repro'd through the Unfortunately, the callstack must have been partially stomped on because it doesn't tell exactly where the bug is. But I suspect you did some serialization work, and I wonder if this is due to serialization of test discovery results or something. |
@AArnott You were right about it being a serialization problem. Fixed in reduckted@3b4dc05 and reduckted@4de628f |
I'm seeing 35 warnings about duplicate test cases being skipped. Those warnings didn't exist on the |
Fixed in reduckted@24d2aa8 The data rows and test method arguments were not being used when generating unique test IDs, so each data row for a theory test was appearing as a duplicate. |
Looks like xunit v3 made another breaking change to their console runner that's breaking our mac CocoaFact tests. I hope xunit has some docs for how to run tests in a cocoa process on mac. I'm guessing the prior v2 way of doing it was documented somewhere and we copied it, so maybe v3 has updated docs. I'm off to bed. @reduckted if you want to work on it in the meantime, please feel free. Otherwise I'll pick this up tomorrow. |
😅 Fixed in reduckted@c56047b After some trial and error, and some digging through props and targets files, I worked it out. First, the xUnit auto-generated entry point shows what is needed to replace the old We also need to disable xUnit's auto-generated entry point. Easily done with a build property. A couple of tweaks to the command line arguments too. The Attempting to run the tests then led to a rather cryptic error:
One last change was to set |
Awesome. That sounds much more complicated than I anticipated. Thanks so much for diagnosing and fixing that.
Do you think we should suppress the transitive package reference? Would doing so simplify anything? |
Oh, if it's possible to do that then it would simplify things a bit. We could move the |
Moving targets into the project file itself isn't actually a positive move, IMO. And removal of a property definition itself isn't worth it, I'd say. But as this technique can be useful in avoiding some of the discovery costs you incurred to resolve issues, here's how it would be done: <PackageReference Include="Microsoft.Testing.Platform.MSBuild" ExcludeAssets="all" /> Of course this means too that this package ID must be directly specified in Directory.Packages.props, which gives one more version to maintain, even though it's an "anti-reference". |
Huge callout to @reduckted, who did most of the work on this. 🎉🎉🎉
With xUnit v3 now available with breaking changes from v2, see the following table for how we support both versions:
Closes #103