Skip to content
المشاريع

nunit/nunit3-vs-adapter

عرض على GitHub

حول

محوّل اختبارات NUnit 3.0 للاستخدام مع Visual Studio 2012 أو الإصدارات الأحدث.

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

NUnit 3 VS Test Adapter

The NUnit 3 Test Adapter runs NUnit 3.x and higher tests in Visual Studio 2012 and newer.

You can download the latest release version

NuGet Version

or the latest developer build version

MyGet version

Builds on main

NUnit3TestAdapter.CI

Support

Ask support questions Slack or raise an issue

Documentation

The NUnit3TestAdapter wiki is the best place to start.

Also check the release notes.

License

The NUnit 3 Test Adapter is Open Source software released under the MIT license.

Development

Visual Studio 2026 is the recommended version to build and test the adapter.

Use .\build at the command line to build (compile) the solution.

Use .\build -t test at the command line to build and run unit tests.

Use .\build -t acceptance at the command line to build and run acceptance tests.

Use .\build -t package to create a package.

Agent output

AgentMode accepts Off, Auto (default) and On. Auto turns agent mode on when it detects an AI coding agent from its environment variables. Off keeps the traditional output.

Agent mode only changes defaults: ShowStdout and ShowStderr become Failed, StackTrace becomes Filtered, and Verbosity becomes -1. A setting you set explicitly always wins.

  • ShowStdout/ShowStderr: All sends test output to the console as it arrives. Failed keeps it only in the test result, where the VSTest console logger shows it for failed tests. None drops the output events, but the output NUnit captures in the test result itself stays in the result, as with ConsoleOut=0. With Failed, TestContext.Progress output also goes to the test result instead of the console.
  • StackTrace: Full, Filtered (removes System.Runtime and NUnit-internal frames) or None.

Command-line settings do not require a runsettings file:

dotnet test -- NUnit.AgentMode=On
dotnet test -- NUnit.ShowStdout=Failed NUnit.StackTrace=Filtered

To run and debug tests on .NET Framework, load DisableAppDomain.runsettings.

From Visual Studio 2019 version 16.2 preview 4 it is possible to run tests against a selected target framework in the test project, so one can use this to run .NET Core tests. An alternative approach is to make use of the command line. If you need to frequently debug into .NET Core tests, you can temporarily switch the order of the <TargetFrameworks> in NUnit.TestAdapter.Tests.csproj.

The mock-assembly tests are not for direct running.

See https://github.com/nunit/docs/wiki/Packaging-the-V3-Adapter for more details.

Debugger source-stepping

The NuGet package contain source-linked PDBs for the adapter. If you’re in the middle of a debugging session and realize you’d like to be able to step into NUnit adapter code, set breakpoints and watch variables, follow these steps.

Notes

  • This adapter works with NUnit 3.0 and higher only. Use the NUnit 2 Adapter to run NUnit 2.x tests.

Announcements

  • From version 3.9 the NUnit3TestAdapter will stop supporting Visual Studio 2012 RTM (!), note only RTM, the later updates will still be supported fully. If you're using VS 2012 and want to update NUnit3TestAdapter, please update your Visual Studio RTM to any of the subsequent updates (Update 1-5)
  • From version 3.16 the NUnit3TestAdapter will stop supporting .net core 1
  • From version 4.0 the NUnit3TestAdapter will only be released as a nuget package, the VSIX is deprecated.
  • From version 5.0 the NUnit3TestAdapter will support MTP 1.X.
  • From version 6.0 the NUnit3TestAdapter will support MTP 2.0, and stop supporting .net core 3. Lowest version will be .net 8.0.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…