【问题标题】:Nunit 3.2.1 Tests not discovered on Visual Studio Test explorer在 Visual Studio 测试资源管理器中未发现 Nunit 3.2.1 测试
【发布时间】:2016-05-27 15:38:18
【问题描述】:

这是我的配置:

  1. Visual Studio 企业版 2015
  2. NUnit 3.2.1
  3. NUnit3 测试适配器 3.0.10(作为扩展和更新以及通过项目中的 nuget 包管理器安装)
  4. 目标框架设置为 4.5

构建成功,但测试发现显示错误并发现 0 个测试。

错误日志:

Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in C:\projects\~
The NUnit 3.0 driver does not support the portable version of NUnit.
Use a platform specific runner.
NUnit Adapter 3.0.10.0: Test discovery complete.
Discover test finished: 0 found

【问题讨论】:

    标签: nunit


    【解决方案1】:

    运行 NUnit 3 适配器(正确名称)版本 3.0.10 时,您正在使用 NUnit 3.0.1 运行测试。如果测试使用 3.2.1 框架,则存在不兼容的可能性。 NUnit runner 总是向后兼容的。例如,您可以使用 NUnit 3.2 运行 NUnit 3.0 测试,但反之则不然。

    您看到的消息实际上具有误导性,并且最近在代码中进行了更改。它假定您在发生序列化异常时正在运行可移植测试。

    【讨论】:

    • 我正在运行 NUnit Adapter 3.2.0.0 并使用 3.2.1 框架进行测试。仍然看到此消息:NUnit Adapter 3.2.0.0: Test discovery started Exception NUnit.Engine.NUnitEngineException, Exception throwing discovering testing in 任何想法?还是不相关?
    • 并不真正相关,因为它是一个不同的例外。我需要更多信息来回答这个问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-02
    • 1970-01-01
    • 1970-01-01
    • 2018-05-20
    • 1970-01-01
    • 2019-06-23
    相关资源
    最近更新 更多