Skip to content
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

Skip .xproj / project.json style projects that don't contain any tests #33

Closed
jcansdale opened this issue Aug 5, 2016 · 6 comments
Closed
Assignees
Milestone

Comments

@jcansdale
Copy link
Owner

No description provided.

@jcansdale jcansdale added this to the v4.0-beta milestone Aug 5, 2016
@jcansdale jcansdale self-assigned this Aug 5, 2016
@jcansdale
Copy link
Owner Author

jcansdale commented Aug 5, 2016

Non-test projects are currently reported like this:

------ Test started: Assembly: XUnitTests.dll ------

xUnit.net .NET CLI test runner (64-bit .NET Core win10-x64)
hmmmm
Test 'XUnitTests.Program.Test2' failed: Assert.Equal() Failure
Expected: 4
Actual:   5
    at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer)
    Program.cs(25,0): at XUnitTests.Program.Test2()

1 passed, 1 failed, 0 skipped, took 2.07 seconds (netcoreapp1.0).

------ Test started: Assembly: ClassLibrary1.dll ------

Couldn't find an appropriate testRunner to execute your tests.
Please ensure your project is a Console Application and has one of the following as a dependency:
"dotnet-test-nunit"
"dotnet-test-xunit"

Alternatively, any method or property without a test attribute can be executed as an "Ad hoc" test.

@bradwilson Is this the issue you mentioned?

(notice the at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer1 comparer)` line as well 😉)

@jcansdale
Copy link
Owner Author

@bradwilson,

Could you give this build a try:
TestDriven.NET-4.0.3347_Extraterrestrial_Alpha.zip

@bradwilson
Copy link

Nope, still not able to run tests. Trying to run an assembly gives me no output (just the 0/0/0 message in the status bar).

@bradwilson
Copy link

bradwilson commented Aug 5, 2016

To be clear, these are desktop assemblies that are decorated with:

[assembly: TestDriven.Framework.CustomTestRunner(typeof(Xunit.Runner.TdNet.TdNetRunner))]

They just happen to be desktop assemblies built via .xproj instead of .csproj.

@jcansdale
Copy link
Owner Author

Ah right, now I get it! It should be feasible to get this discovery mechanism working. In general NuGet makes runner discovery into a bit of a nightmare. Luckily this technique sidesteps the issue. :)

@jcansdale
Copy link
Owner Author

This issue needed to be sorted anyway, so I'm not upset I got confused. 😉

Here's an issue to track the issue you reported: #35.

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

No branches or pull requests

2 participants