-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add support for running xUnit tests using .NET Core #5
Comments
TestDriven.NET-4.0.3258_Extraterrestrial_Alpha (1).zip I haven't updated the release notes yet, but this versions supports running xUnit, NUnit and "Ad hoc" tests using .NET core. The .NET Core test runner requires that unit tests be inside a Console Application project, but any method/property that doesn't have a test attribute can be executed as an "Ad hoc" test (even if it's inside a Class Library project). Anything returned from the method/property will be expanded on the output window. Please let me know how you get on and report any issues here. 😃 |
I'm trying it out on a small solution, but it isn't able to resolve the xunit assembly. Should we be copying the xUnit assemblies to wherever TestDriven.Net is testing it, or something about how files are being copied?
|
@jcansdale It does work when I put the xunit assemblies under the In my project configuration, I did notice that the xunit assemblies are not being copied into |
@jeremydmiller It should just work, you shouldn't have to copy anything! I'll investigate and get back to you. It works on my machine. ;) |
I blame VS/dotnet anyway;) |
Are you using any assembly level custom attributes? I.e. |
Other than the normal versioning stuff, just this:
Which I think we could get away w/ dropping on this project. |
Ahhhh, that makes sense. Didn't expect that though. I expect it would have worked for most people. Thanks for the bug report! |
A little more feedback, I can trigger tests via the actual test, test classes, and namespaces. It's throwing this against the Assembly or by the option to run all tests in the solution:
|
@jeremydmiller Here's a new build with those issues resolved. TestDriven.NET-4.0.3264_Extraterrestrial_Alpha.zip The first issue was to do with how it detects a .NET Core assembly from .NET code. It needed to read the The other issue was an oversight. I'd already fixed it in the code that supports NUnit. When you execute all tests in a solution, there will still be some output for non-test projects (I'll fix this later). Please keep the bug reports coming! |
@plioi @bradwilson, I thought you might be interested to try the build I posted above... |
@jcansdale I'll pull it down tomorrow and try again |
@jcansdale This is well timed, as I'm doing some xUnit.net demos next week. 👍 |
@bradwilson Excellent, I appreciate the exposure. I'm trying to breathe some life back into TD.Net and make it useful to people. 😄 I noticed a couple of issues with the error reporting when executed with TD.Net.
Could you disable reporting to stderr when the |
In the last preview version I uploaded, the output when a test failed was a bit of a train wreck. The problem is that xUnit reports the failed test to stdout, stderr and as a test-result message. Ideally this would be resolved at the xUnit runner end, but because versions that do this are already in the wild, I've decided to add a workaround for it at the TestDriven.Net end. This makes the output a lot more readable. Ctrl+Alt+O will take you to the relevant stack frame, then Enter will take you to the failing assert. Here is what the above code looks like now: @bradwilson It would be even better if we could filter out the @jeremydmiller I'll let you know when this has been uploaded to the http://testdriven.net site. |
@jcansdale We've run into a problem with the Alpha build, wherein you seem to assume that all |
I've been working on support for all framework versions. It will now execute your tests using the same framework they were built for (including quirks mode in .NET 4+). There are two new commands, Here is a fresh build that includes this feature: TestDriven.NET-4.0.0_Extraterrestrial_Alpha.zip 🚀 Let me know how you get on and if you spot an weirdness! |
I think maybe you're missing my point. These are desktop assemblies. They are not .NET core assemblies. There's no reason why we would want to register the .NET Core runner for them, so they do not (and never will) reference |
Ah, your running all tests in a solution? I need to work on when to offer a (hopefully) helpful message and when to ignore the project. It currently treats all projects as potential test projects. 😞 |
Okay, I finally get it. 😉 Could you give this version a try: |
No description provided.
The text was updated successfully, but these errors were encountered: