简体   繁体   English

多个单元测试项目—运行所有测试,但一次运行一个项目

[英]Multiple Unit Testing Projects — Run all tests, but one project at a time

I have a large visual studio solution with 13 unit testing projects in it. 我有一个大型视觉工作室解决方案,其中包含13个单元测试项目。 I want to run all the unit tests, but I want to ensure that they run one entire project at a time. 我想运行所有的单元测试,但是我想确保它们一次运行一个完整的项目。 Is there anyway to achieve this? 反正有实现这一目标的方法吗?

Currently, when I select Run All from the Test Explorer window - I know that they run at what appears to be a semi-random order, where it might run a test from Proj1 then Proj2 , then come back to another test from Proj1 . 当前,当我从“ Test Explorer窗口中选择“全部运行”时-我知道它们以半随机顺序运行,在该顺序中,它可能先是Proj1然后是Proj2运行一个测试,然后再从Proj1返回另一个测试。 The order in which they run is not an issue, the issue is that I only want a single project to execute then move on to the next project, etc... 它们的运行顺序不是问题,问题在于我只希望执行一个项目,然后继续执行下一个项目,等等。

Ideally, if a test from Proj2 is the first unit test to execute it would run all unit tests in Proj2 until there aren't anymore. 理想情况下,如果来自Proj2的测试是第一个执行的单元测试,则它将运行Proj2中的所有单元测试,直到不再存在为止。 Then it would move on to the next unit test, if Proj5 for example -- it would again run all of them within Proj5 and then move on. 然后,它将继续进行下一个单元测试,例如Proj5 ,它将再次在Proj5中运行所有单元测试,然后继续进行。 Is this possible? 这可能吗?

请考虑使用有序测试( https://msdn.microsoft.com/en-us/library/ms182631.aspx )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在与名称模式匹配的项目中使用mstest运行所有单元测试 - Run all unit tests with mstest in projects matching a name pattern 在Visual Studio单元测试(MSTest)中对项目中的所有测试进行每次测试之前,是否可以执行初始化代码? - Is there a way to execute initializer code before each test in Visual Studio Unit Testing (MSTest) for all tests in a project? 在VS2017中,是否有一种方法可以一次将所有失败的单元测试的名称复制到剪贴板? - In VS2017, is there a way to copy the names of all the failed unit tests to the clipboard at one time? Visual Studio:在单个项目中运行所有测试? - Visual Studio: Run all tests in a single project? 需要在项目上运行项目时运行MSTest单元测试 - Run MSTest unit tests on a project when it needs to be running Xunit在一个appdomain中运行所有测试 - Xunit run all tests in one appdomain 如何在Visual Studio中分别在不同的文件夹/项目中运行(单元)测试? - How do I run (unit) tests in different folders/projects separately in Visual Studio? 当多个单元测试复制同一文件时,运行所有单元测试失败 - When multiple unit tests copy the same file, running all unit tests fail Visual Studio C#单元测试 - 使用各种/多个测试初始化​​运行单元测试,多次运行相同的单元测试? - Visual Studio C# unit testing - Run Unit test with varied/multiple test initializations, Run same unit test multiple times? 使CMake Visual Studio中的所有项目都依赖一个项目 - Making all projects in CMake Visual Studio depend on one project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM