Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一些使用 NUnit3 用 c#.net 编写的测试。我已经通过 [assembly: LevelOfParallelism(4)] 在 assemblyinfo.cs 文件中添加了测试用例应该并行运行的实例数。现在每次我运行测试时,它都会并行运行 4 个测试。如何使用控制台控制这个数字?我可以传递一个参数,以便测试一次只运行 1 个但不想更改上述值
应该可以使用命令行选项覆盖该LevelOfParallelism属性。--workers
LevelOfParallelism
--workers
( LevelOfParallelism 文档)
(命令行文档)