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测试:
- Create a unit test project via VS
- Install NUnit and NUnit3TestAdapter packages
- Add solution to source control (if the package files not added to the source control, you can refer to the steps below)
- Open Source Control Explorer in VS
- Add a new folder (e.g. Tools) and add Nuget.exe to the source control
- Add bat file to your test project (For example:
Tools\nuget35.exe restore NUTest2\NUTest2.sln
) - Open XAML build definition and map Tools source folder to agent
通过VS创建一个单元测试项目
安装NUnit和NUnit3TestAdapter包
添加解决方案到源代码控制(如果包文件未添加到源代码管理中,您可以参考以下步骤)
VS中的开源控制资源管理器
添加新文件夹(例如工具)并将Nuget.exe添加到源代码管理中
将bat文件添加到测试项目中(例如:Tools \ nuget35.exe restore NUTest2 \ NUTest2.sln)
打开XAML构建定义并将工具源文件夹映射到代理
- Select Process section
- Choose TfvcTemplate.12.xaml build template
- In the Advance section of Build, specify Pre-build script path with previous bat file.
选择处理部分
选择TfvcTemplate.12.xaml构建模板
在Build的Advance部分中,使用先前的bat文件指定预构建脚本路径。
#1
0
Based on your history, I assume you are using VSTS, you can refer to these steps to run Nunit test:
根据您的历史记录,我假设您使用的是VSTS,您可以参考这些步骤来运行Nunit测试:
- Create a unit test project via VS
- Install NUnit and NUnit3TestAdapter packages
- Add solution to source control (if the package files not added to the source control, you can refer to the steps below)
- Open Source Control Explorer in VS
- Add a new folder (e.g. Tools) and add Nuget.exe to the source control
- Add bat file to your test project (For example:
Tools\nuget35.exe restore NUTest2\NUTest2.sln
) - Open XAML build definition and map Tools source folder to agent
通过VS创建一个单元测试项目
安装NUnit和NUnit3TestAdapter包
添加解决方案到源代码控制(如果包文件未添加到源代码管理中,您可以参考以下步骤)
VS中的开源控制资源管理器
添加新文件夹(例如工具)并将Nuget.exe添加到源代码管理中
将bat文件添加到测试项目中(例如:Tools \ nuget35.exe restore NUTest2 \ NUTest2.sln)
打开XAML构建定义并将工具源文件夹映射到代理
- Select Process section
- Choose TfvcTemplate.12.xaml build template
- In the Advance section of Build, specify Pre-build script path with previous bat file.
选择处理部分
选择TfvcTemplate.12.xaml构建模板
在Build的Advance部分中,使用先前的bat文件指定预构建脚本路径。