[英]Run C++ Unit Tests in TFS test stage
I have developed some C++ code with Visual Studio 2015, which I have just committed to my Visual Studio Online repo. 我已经使用Visual Studio 2015开发了一些C ++代码,而我刚刚致力于Visual Studio Online存储库。 I notice it has a
Test
feature, in the options: Code, Work, Build, Test, Release. 我注意到它在选项中具有
Test
功能:代码,工作,构建,测试,发布。 When developing the code, I built some Unit Tests, using Visual Studio's built-in test framework. 开发代码时,我使用Visual Studio的内置测试框架构建了一些单元测试。 Can I configure these to be run as part of the Test step in the repo, to ensure future build's pass requirements?
是否可以将它们配置为在回购中作为“测试”步骤的一部分运行,以确保将来的构建通过要求?
my unit tests are currently in the same solution as the code in a .vcxproj
file which contains the actual tests as .cpp
files. 我的单元测试当前与
.vcxproj
文件中的代码处于同一解决方案中,该文件将实际测试包含为.cpp
文件。
If you just want run unit test, you can simply run it during the build process. 如果您只想运行单元测试,则只需在构建过程中运行它即可。 When you create a build definition with "Visual Studio" under Build tab, it will contain following tasks:
使用“构建”选项卡下的“ Visual Studio”创建构建定义时,它将包含以下任务:
"Visual Studio Test" is used to run unit testing. “ Visual Studio测试”用于运行单元测试。 Refer to this link for details: Set up automated testing for your builds
请参阅此链接以获取详细信息: 为构建设置自动测试
For the Test tab, it can be used to run more kinks of testing. 对于“测试”选项卡,它可以用于运行更多的测试。 Refer to this link for details: Testing Tools and Services
有关详细信息,请参阅此链接: 测试工具和服务
There's some documentation on msdn about it : https://msdn.microsoft.com/en-us/library/jj155800.aspx 在msdn上有关于它的一些文档: https : //msdn.microsoft.com/en-us/library/jj155800.aspx
Having said that, here's a quick sum up walkthrough with VS2015 to test it : 话虽如此,这是VS2015的快速总结以对其进行测试:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.