-
Notifications
You must be signed in to change notification settings - Fork 153
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
Unable to run .NetCore 2.0 tests from command line using Nunit3-console.exe #364
Comments
Console runner does not currently support .NETCore tests. @rprouse As an interim measure, perhaps they should be detected, as other things are and a special error message given. IIRC we do that for .NET CF. |
I opened it by mistake twice from 2 separate accounts. Is there any workaround available? The main purpose is to be able to run the tests in CI (TeamCity)? |
We should definitely give more information from the runner itself. See the wiki here: https://github.com/nunit/docs/wiki/.NET-Core-and-.NET-Standard |
Ok, this provides me a way to run the .NetCore tests, however I'm guessing that I won't be able to make use of the Nunit Console runner command line parameters. I was planning into using this feature so that I can inject different capabilities (for Selenium tests) used for remote testing on platforms like BrowserStack or SauceLabs. This and the custom attributes that can be created within NUnit... |
The nunit framework works the same under every runner, so your custom attributes will be fine. You should be able to use a .runsettings file to give parameters for the run. |
Of course, it would be better IMO if the console runner could handle it. |
.NET Standard/.NET Core 2.0 will make it much easier to support running .NET Core tests from the console/engine. We will need to create a .NET Standard 2.0 version of the engine and a .NET Core 2.0 version of the agent. Ideally, we would also create a .NET Core 2.0 version of the console for running in-process or on non-Windows machines that don't have Mono installed. |
@CharliePoole @rprouse In aid for this, I was planning in using the I looked over the suggestion of using .runsettings file but from what I saw here and here it seems that Am I missing something? |
The second of your two links talks about a generated |
We're running into a similar situation, switching away from xunit and back to nunit to execute UI tests with better and more reliable test context information against sauce labs (at the same time making the tests a bit more portable for execution in our build pipelines). Is there a path forward for allowing test execution from the runner against .Net Core/Standard 2.0? |
@spokcarls |
This issue will be taken care of under #475. We're continuing work on .NET Core support at the moment - please see https://github.com/nunit/nunit-console/projects/1 for the overall project view. I'm going to close this issue in favour of the #475 - but please feel free to add any comments over there. 🙂 |
I have a simple .Net Core 2.0 project containing only the following tests:
`using NUnit.Framework;
namespace TestStuffCore
{
[TestFixture]
public class Class1
{
}
`
Nuget packages installed:
Microsoft.NET.Test.Sdk v15.5.0
Microsoft.NETCore.App v2.0.0
NUnit v3.9.0
NUnit.Console v3.8.0
NUnit3TestAdapter v3.9.0
Running them from Visual Studio Test Explorer, everything works fine.
Running them from console line fails with the following error:
Further investigations:
1.) Running the exact same test code from a project targeting .Net Framework works as expected.
2.) Running the exact same test code from a project targeting .Net Core, but using NUnit.Console v3.7.0 results into the following error:
The text was updated successfully, but these errors were encountered: