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

TestDriven.Net tries to run tests in .NET Core projects that don't contain tests #23

Closed
jcansdale opened this issue Jul 28, 2016 · 3 comments
Milestone

Comments

@jcansdale
Copy link
Owner

jcansdale commented Jul 28, 2016

No description provided.

@mwhelan
Copy link

mwhelan commented Jul 28, 2016

That rang a bell for me but can't find it now. However, I do get a similar(?) issue. When I right click solution and Run Tests, TD.Net runs all the test projects successfully but it also tries to run tests against a non-test project and gives this error message:

------ Test started: Assembly: Specify.Examples.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.

Here is the project.json for the non-test project:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.0"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

@jcansdale jcansdale changed the title Couldn't find .NET Core or.NET Framework assembly for 'project.json' TestDriven.Net tries to run tests in .NET Core projects that don't contain tests Jul 28, 2016
@jcansdale
Copy link
Owner Author

@mwhelan Thanks for the report. I think this is to do with the different way TestDriven.Net detects test projects in .xproj projects compared to the classic .NET Framework. I've changed the subject of this issue to track it.

P.S. I've started preemptively creating GitHub issues to be a landing page for things that might go wrong (they're linked from error messages). That way if they become a problem, there is somewhere obvious to find a solution or report the problem.

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

Projects should now only be picked up if their project.json contains a testRunner element or if they're a .NET framework project and reference a known test framework (found in .tdnet file or registry).

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