c# - VS2017 和 NUnit 3.9 没有可用的测试

标签 c# visual-studio visual-studio-2017 nunit

我使用的是最新的 VS2017 版本 15.6.4、NUnit3TestAdapter 3.10.0 和 Nunit 版本 3.9.0.0。

当我尝试在测试资源管理器中运行单元测试时,测试显示为灰色,当我右键单击并运行选定的测试时,我看到以下错误:没有可用的测试 这是我的测试类的样子

    [TestFixture]
    public partial class ListViewBOTest
    {
    [Test]
     public void TestSearch_DateTime()
      {
        Assert.AreEqual(1,0);
      }

    }

Here is a screenshot of my tests

输出文本:

[3/26/2018 10:53:55 AM Informational] ------ Run test started ------
[3/26/2018 10:53:55 AM Informational] NUnit Adapter 3.10.0.21: Test execution started
[3/26/2018 10:53:55 AM Informational] Running all tests in C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll
[3/26/2018 10:53:56 AM Informational] NUnit failed to load C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll
[3/26/2018 10:53:56 AM Informational] NUnit Adapter 3.10.0.21: Test execution complete
[3/26/2018 10:53:56 AM Warning] No test is available in C:\Projects\MVPPlant\DEV\CMMSdg.Plant\CMMSdg.Plant\Sln.2010\CMMSdg.Plant.BusinessObjects.Test\bin\Debug\CMMSdg.Plant.BusinessObjects.Test.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
[3/26/2018 10:53:56 AM Informational] ========== Run test finished: 0 run (0:00:01.0435303) ==========

最佳答案

关于c# - VS2017 和 NUnit 3.9 没有可用的测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49495900/

相关文章:

docker - .Net Core 不能使用支持 Docker 的 Add-migrations

c++ - 带有 std::quoted 的 Visual Studio 中的错误

c# - 如果值是对象并且这些对象的属性是键,是否有比 Dictionary 更好的数据结构?

c# - azure webjobs - 编写应用程序与调用 url

c# - 执行 xpath 时 token 无效

c - 在 Visual C++ 2008 Express 上设置依赖项

c++ - 是否存在与堆内存分配相关的内存开销(例如堆中的标记)?

c# - 使用 C# 反射从字典生成动态对象

javascript - 更改单个文件时,Visual Studio 2015 会编译所有 typescript 文件

xamarin.forms - 如何解决 Xamarin Forms API 弃用错误 410