XAML构建无法运行单元测试

时间:2021-04-24 01:23:28

I am trying to run Nunit Test using Visual Studio test Runner from XAML build in TFS,but i am getting error saying

我试图使用Visual Studio测试Runner从TFS中的XAML构建运行Nunit测试,但我收到错误说

TF900547: The directory containing the assemblies for the Visual Studio Test Runner is not valid ''.

TF900547:包含Visual Studio Test Runner程序集的目录无效。

1 个解决方案

#1


0  

Based on your history, I assume you are using VSTS, you can refer to these steps to run Nunit test:

根据您的历史记录,我假设您使用的是VSTS,您可以参考这些步骤来运行Nunit测试:

  1. Create a unit test project via VS
  2. 通过VS创建一个单元测试项目

  3. Install NUnit and NUnit3TestAdapter packages
  4. 安装NUnit和NUnit3TestAdapter包

  5. Add solution to source control (if the package files not added to the source control, you can refer to the steps below)
  6. 添加解决方案到源代码控制(如果包文件未添加到源代码管理中,您可以参考以下步骤)

  7. Open Source Control Explorer in VS
  8. VS中的开源控制资源管理器

  9. Add a new folder (e.g. Tools) and add Nuget.exe to the source control
  10. 添加新文件夹(例如工具)并将Nuget.exe添加到源代码管理中

  11. Add bat file to your test project (For example: Tools\nuget35.exe restore NUTest2\NUTest2.sln)
  12. 将bat文件添加到测试项目中(例如:Tools \ nuget35.exe restore NUTest2 \ NUTest2.sln)

  13. Open XAML build definition and map Tools source folder to agent
  14. 打开XAML构建定义并将工具源文件夹映射到代理

XAML构建无法运行单元测试

  1. Select Process section
  2. 选择处理部分

  3. Choose TfvcTemplate.12.xaml build template
  4. 选择TfvcTemplate.12.xaml构建模板

  5. In the Advance section of Build, specify Pre-build script path with previous bat file.
  6. 在Build的Advance部分中,使用先前的bat文件指定预构建脚本路径。

XAML构建无法运行单元测试

#1


0  

Based on your history, I assume you are using VSTS, you can refer to these steps to run Nunit test:

根据您的历史记录,我假设您使用的是VSTS,您可以参考这些步骤来运行Nunit测试:

  1. Create a unit test project via VS
  2. 通过VS创建一个单元测试项目

  3. Install NUnit and NUnit3TestAdapter packages
  4. 安装NUnit和NUnit3TestAdapter包

  5. Add solution to source control (if the package files not added to the source control, you can refer to the steps below)
  6. 添加解决方案到源代码控制(如果包文件未添加到源代码管理中,您可以参考以下步骤)

  7. Open Source Control Explorer in VS
  8. VS中的开源控制资源管理器

  9. Add a new folder (e.g. Tools) and add Nuget.exe to the source control
  10. 添加新文件夹(例如工具)并将Nuget.exe添加到源代码管理中

  11. Add bat file to your test project (For example: Tools\nuget35.exe restore NUTest2\NUTest2.sln)
  12. 将bat文件添加到测试项目中(例如:Tools \ nuget35.exe restore NUTest2 \ NUTest2.sln)

  13. Open XAML build definition and map Tools source folder to agent
  14. 打开XAML构建定义并将工具源文件夹映射到代理

XAML构建无法运行单元测试

  1. Select Process section
  2. 选择处理部分

  3. Choose TfvcTemplate.12.xaml build template
  4. 选择TfvcTemplate.12.xaml构建模板

  5. In the Advance section of Build, specify Pre-build script path with previous bat file.
  6. 在Build的Advance部分中,使用先前的bat文件指定预构建脚本路径。

XAML构建无法运行单元测试