Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 27, 2017. It is now read-only.

Deprecated test runner for .NET Core. For use with project.json only. For recent releases of .NET Core, use the NUnit 3 Visual Studio Adapter

License

NotificationsYou must be signed in to change notification settings

nunit/dotnet-test-nunit

Repository files navigation

Deprecated

This project is deprecated. The test adapter API changed when .NET Core switched fromproject.json to the newcsproj format. For newer .NET Core and .NET Standardprojects, use theNUnit 3 Visual Studio Test adapterto run tests at the command line usingdotnet test, in CI or in Visual Studio.

For more information on how to test .NET Core, see the.NET Core/.NET Standard documentation.

If you are reportingissues, we are no longer making updates to this project or the use ofdotnet-test-nunit andproject.json. Issues should be reported against theNUnit 3 Visual Studio Test adapter.

Build statusTravis Build Status

dotnet-test-nunit is the unit test runner for .NET Core for running unit tests with NUnit 3.

Usage

dotnet-test-nunit is still an alpha release, so you need to selectshow prereleases if you are using Visual Studio.

Yourproject.json in your test project should look like the following;

project.json

{"version":"1.0.0-*","dependencies": {"NUnit":"3.5.0","dotnet-test-nunit":"3.4.0-beta-3"    },"testRunner":"nunit","frameworks": {"netcoreapp1.0": {"imports":"portable-net45+win8","dependencies": {"Microsoft.NETCore.App": {"version":"1.0.0-*","type":"platform"                }            }        }    }}

The lines of interest here are the dependency ondotnet-test-nunit. I have added"testRunner": "nunit" to specify NUnit 3 as the test adapter. I also had to add to the imports for both the test adapter and NUnit to resolve.

You can now run your tests using the Visual Studio Test Explorer, or by runningdotnet test from the command line.

# Restore the NuGet packagesdotnet restore# Run the unit tests in the current directorydotnettest# Run the unit tests in a different directorydotnettest test/NUnitWithDotNetCoreRC2.Test

Notes

Note that thedotnet command line swallows blank lines and does not work with color.The NUnit test runner's output is in color, but you won't see it. These are known issues withthedotnet CLI and not an NUnit bug.

About

Deprecated test runner for .NET Core. For use with project.json only. For recent releases of .NET Core, use the NUnit 3 Visual Studio Adapter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors8


[8]ページ先頭

©2009-2025 Movatter.jp