【发布时间】:2013-04-27 17:52:59
【问题描述】:
我第一次使用 Xunit 编写了 6 个测试。
[Fact]
public void test_1()...
[Fact]
public void test_2()...
[Fact]
public void test_3()...
[Fact]
public void test_4()...
[Fact]
public void test_5()...
[Fact]
public void test_6()...
在这篇帖子Can Visual Studio 2010 Test Runner run XUnit? 之后,我能够将 xunit 控制台添加为 VS 2010 中的外部工具。
但是,当我单击 Xunit Test 菜单项时,我得到以下结果,不应该是 Tests complete : 6 of 6 吗?为什么说 1 of 1?
xUnit.net console test runner (64-bit .NET 4.0.30319.296)
Copyright (C) 2007-11 Microsoft Corporation.
xunit.dll: Version 1.9.1.1600
Test assembly: C:\Users\...\MyProject-MVC\MyProject.Tests\bin\Debug\MyProject.Tests.dll
Tests complete: 1 of 1
1 total, 0 failed, 0 skipped, took 0.311 seconds
【问题讨论】:
-
当您在 VS 外部使用 xUnit 控制台/gui 运行程序集时会发生什么?
-
您是否在运行测试之前构建了解决方案?
-
我不知道如何在 VS 之外运行 dll。我确实构建了解决方案,构建成功
-
stackoverflow.com/questions/16214684/… ? VS xUnit 插件能找到它们吗?
-
@RubenBartelink 下载
TestDriven.Net解决了我的问题...我不确定发生了什么,但现在它在说Tests complete: 6 of 6谢谢...投票支持您的评论。
标签: c# asp.net-mvc-3 unit-testing tdd xunit.net