Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
NUnit与Microsoft测试管理器的集成_Nunit_Microsoft Test Manager - Fatal编程技术网

NUnit与Microsoft测试管理器的集成

NUnit与Microsoft测试管理器的集成,nunit,microsoft-test-manager,Nunit,Microsoft Test Manager,我可以使用tcm testcase import命令从Visual Studio中创建的单元测试程序集将测试用例导入Microsoft测试管理器。当我尝试导入测试用例但使用NUnit程序集时,命令失败,并显示“找不到要导入的测试”。是否有其他方法可以将在NUnit中创建的测试用例导入Microsoft测试管理器 否,您的测试需要在MSTest框架中才能与Microsoft测试管理器集成。 如果您想使用MTM,您需要将NUnit测试用例转换为MSTests。 您可以引用URL来实现这一点。我们能够

我可以使用tcm testcase import命令从Visual Studio中创建的单元测试程序集将测试用例导入Microsoft测试管理器。当我尝试导入测试用例但使用NUnit程序集时,命令失败,并显示“找不到要导入的测试”。是否有其他方法可以将在NUnit中创建的测试用例导入Microsoft测试管理器

否,您的测试需要在MSTest框架中才能与Microsoft测试管理器集成。 如果您想使用MTM,您需要将NUnit测试用例转换为MSTests。
您可以引用URL来实现这一点。

我们能够通过向NUnit测试方法添加
TestMethodAttribute
来很好地选择NUnit测试,使用
tcm
导入MTM

例如:

namespace NUnit.Tests
{
  using NUnit.Framework;

  [TestFixture]
  public class SuccessTests
  {
    [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] //<-- here
    [Test] 
    public void Add()
    { 
      //
    }
  }
}
tcm testcase /import /collection:CollectionURL /teamproject:project /storage:path