-
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
Allow .NET Core test runner projects to test themselves #8
Comments
@bradwilson I've made some tweaks to allow the development version of Target all in project: Target a single method: Here is a build with the update: |
@bradwilson I'm still at a loss as to why targeting individual tests in I've now added support for 'Test With > Debugger' on .NET Core projects. Hopefully this will make finding the problem easier. Here is a build with debugging support: |
@bradwilson Ah, mystery solved! Your tests are using inner classes rather than namespaces. My adapter is passing in the type names flat (without a I'm curious why you use inner classes? |
I use them in a couple different ways. I will use the outer class to be the class under test; I will use the inner types to either represent the method under test, or the testing context (f.e., for tests of a stack, one test context might be "with an empty stack", another might be "with a stack with one item", etc.). |
I've got targeting methods and classes nested inside another class working, see below:
...but for some reason I can't target the parent class:
From the way you describe using nested types, I imagine xUnit does support this. Do you know why it might not be working? Is there anything wrong with the arguments I'm passing?
😕 |
Here's a drop that shows the behavior above (inner classes work, but outer classed don't): TestDriven.NET-3.10.0_Extraterrestrial_Beta2.zip |
I'm pretty sure we don't actually support that (yet) via the command line. We added specific code to our TD.net adapter to dive into child classes when asked to run a class. |
Ah, I see what you're doing there: For the moment I could add something similar to my built-in xUnit support. Can I pass in multiple Later on I might restore support for .tdnet files an the ITestRunner interface. I'm still working out how feasible this would be with .NET Core. So far using .NET Core's |
Yes. I'm not 100% sure whether your original expectation is reasonable or not. It probably is reasonable, and we should probably change the meaning of |
It looks like the NUnit runner behaves in the same way (only runs tests in the targeted class). In order to support versions on xUnit and NUnit that are already deployed, I'll need to add code to target the inner classes as well. I'll let you know when this is done. |
The latest build of TestDriven.Net 4.0-alpha is now available here: http://testdriven.net/download.aspx
This version is "alpha" in the sense that it's feature incomplete, not that it will take your firstborn. 😉 Please give it a try and report and issues you find. I want to make it as useful as possible.
This is only relevant if you're developing a .NET Core test runner (such as
dotnet-test-xunit
ordotnet-test-nunit
). TestDriven.Net needs to locate the test runner assembly locally rather than in the set of platform assemblies.The text was updated successfully, but these errors were encountered: