简体   繁体   English

如何在Monodevelop中运行xUnit.NET单元测试?

[英]How Do I Run xUnit.NET Unit Tests in Monodevelop?

How do I run xUnit.net unit tests from Monodevelop? 如何从Monodevelop运行xUnit.net单元测试? I have version 5.9.6 installed on LMDE and have installed the xUnit.NET testing framework support Add-In. 我在LMDE上安装了5.9.6版,并安装了xUnit.NET测试框架支持Add-In。 I have a test project that I installed the xUnit.NET NuGet package to and wrote some test in it. 我有一个测试项目,我安装了xUnit.NET NuGet包并在其中编写了一些测试。 AFAIK I have set up everything correctly. AFAIK我已正确设置了一切。

However, the Unit Tests pad is empty and I can't run any tests from Run -> Run Unit Tests. 但是,Unit Tests pad是空的,我无法从Run - > Run Unit Tests运行任何测试。 I know a need a test runner, but I can only seem to find the one for Visual Studio. 我知道需要一个测试运行器,但我似乎只能找到Visual Studio的那个。 Do I already have the runner and not know it? 我已经有跑步者但不知道吗? I've never set up a testing environment before and am at a loss as to what else I need to do. 我以前从未建立过测试环境而且我不知道还需要做什么。

Edit 编辑

I have found the xunit.net console runner and installed it. 我找到了xunit.net控制台并安装了它。 I can now run my tests from the console runner and can debug my tests from Run -> Debug Application... However, my tests are still not recognized within monodevelop and still do not show up in the unit tests pad. 我现在可以从控制台运行程序运行我的测试,并可以从Run - > Debug Application调试我的测试...但是,我的测试仍然无法在monodevelop中识别,仍然没有显示在单元测试板中。

I run my xUnit-tests under Monodevelop only with the Add-in. 我只使用加载项在Monodevelop下运行xUnit-tests。

I noticed when you have referenced another unit-test framework in your project, no tests will appear in the pad. 我注意到当你在项目中引用了另一个单元测试框架时,没有测试会出现在pad中。

Try to remove nunit.framework reference. 尝试删除nunit.framework引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Moles和xUnit.net运行单元测试的未处理的MethodAccessException - Unhandled MethodAccessException using Moles and xUnit.net to run unit tests 如何运行包含基于 xUnit.net Contrib 的单元测试的 F# Silverlight 库项目? - How to run F# Silverlight Library project holding xUnit.net Contrib based unit tests? 从Main方法/ MonoDevelop内运行XUnit.Net测试 - Running XUnit.Net tests from Main Method / Within MonoDevelop 在 xUnit.net 中,是否可以按顺序运行测试? - In xUnit.net, is it possible to run tests in order? 如何使用 xUnit.net 进行单元测试控制台 output? - How to do unit test console output with xUnit.net? xUnit.net-自定义测试运行器如何为单元测试提供参数? - xUnit.net - How a custom tests runner can give arguments to the unit tests? 无法在xUnit.net v2中使用控制台运行程序运行第一版xUnit.net测试 - Not able to run version one xUnit.net tests using console runner in xUnit.net v2 如何在多个配置中运行相同的 xunit.net 测试套件? - How can I run the same xunit.net test suite in multiple configurations? TeamCity如何知道运行xUnit.net测试的时间? - How does TeamCity know when an xUnit.net test is run? 将xUnit.NET ASP.NET MVC单元测试添加到现有项目/解决方案中 - Adding xUnit.NET ASP.NET MVC unit tests to an existing project/solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM