如何在 Visual Studio 2017 中运行 NUnit 测试? [英] How can I run NUnit tests in Visual Studio 2017?

查看:78
本文介绍了如何在 Visual Studio 2017 中运行 NUnit 测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Visual Studio 2017.我有一个使用 NUnit 作为测试用例的项目.Ctrl + R - T 不再运行测试,并且测试资源管理器不再找到任何标有 TestCase 属性的测试用例.>

有没有办法让 NUnit 运行,或者我能找到更新吗?

我从 NuGet 包管理器重新安装了 NUnit 到最新版本,但没有任何改进.

解决方案

将 NUnit 测试适配器 NuGet 包添加到您的测试项目

或者安装测试适配器 Visual Studio 扩展.有一个

我更喜欢 NuGet 包,因为它将与您的项目使用的 NUnit 版本同步,因此会自动匹配任何构建服务器中使用的版本.

I've just installed Visual Studio 2017. I have a project using NUnit for the test cases. Ctrl + R - T no longer runs the tests, and the Test Explorer no longer finds any test cases marked with the TestCase attribute.

Is there a way to get NUnit running yet, or an update I could find?

I reinstalled NUnit from the NuGet Package Manager to the latest version with no improvement.

解决方案

Add the NUnit test adapter NuGet package to your test projects

Or install the Test Adapter Visual Studio extension. There is one for

I prefer the NuGet package, because it will be in sync with the NUnit version used by your project and will thus automatically match the version used in any build server.

这篇关于如何在 Visual Studio 2017 中运行 NUnit 测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆