VS2017和NUnit 3.9无法进行测试

编程入门 行业动态 更新时间:2024-10-15 00:21:18
本文介绍了VS2017和NUnit 3.9无法进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用最新的VS2017版本15.6.4,NUnit3TestAdapter 3.10.0和Nunit版本3.9.0.0.

I am using the latest VS2017 version 15.6.4, NUnit3TestAdapter 3.10.0 and Nunit version 3.9.0.0.

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

When I try to run a unit test in Test Explorer the test are grayed out, when I right click and and run selected tests I see the following error: No test is available Here is how my test class looks

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

输出文本:

[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) ==========

推荐答案

我遇到了与Amete Blessed相同的问题,并且注释掉其他测试方法使Test Explorer可以运行并运行我的测试

I had the same problem as Amete Blessed and commenting out other Test methods made Test Explorer work and run my test

更多推荐

VS2017和NUnit 3.9无法进行测试

本文发布于:2023-11-07 00:00:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1565014.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:进行测试   NUnit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!