Xunit dotnet测试并行线程量
时,如何指定线程数量
在使用dotnet test xunit 2.4.1 Xunit.runner.VisualStudio 2.4.5 NetCoreApp 3.1
问题:我有一个使用DotNet测试运行测试的作业,并且我的性能能力不同。例如,一台计算机可以处理10个线程,而另一个只能处理6个。现在,Xunit.runner.json文件中指定的线程量。我可以从控制台指定线程数量吗?还是可以指定要使用的配置文件?
How can I specify amount of threads while using dotnet test
Xunit 2.4.1
Xunit.runner.visualstudio 2.4.5
netcoreapp 3.1
The issue: I have a Job that is running tests using dotnet test and I have different agent with different performance capacity. For example One machine can handle 10 threads and the other only 6. Now the amount of threads specified in xunit.runner.json file. Could I specify amount of threads from the console? or can I specify the config file to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 xunit docs ,您应该参考
xunit.runner.json.json.json /code>在您的
csproj
文件中:这样做的情况应在所有情况下(CLI,UI等)拾取配置文件。
According to the xUnit docs, you should reference
xunit.runner.json
within yourcsproj
file like this:Doing so should pick up the config file in all cases (CLI, UI, etc.).