简体   繁体   English

如何在ncrunch中进行并行测试

[英]how to parallel test in ncrunch

I have a set of test methods as below: 我有一组测试方法,如下所示:

[TestMethod]
public void test1() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test2() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test3() { System.Threading.Thred.Sleep(10000); }

[TestMethod]
public void test4() { System.Threading.Thred.Sleep(10000); }

I would expect the tests to take 10 seconds to complete all the tests. 我希望测试需要10秒钟才能完成所有测试。

However it takes 20 seconds, not 10 sec and not 40 sec. 但是,这需要20秒,而不是10秒和40秒。

Can anyone tell me why this happens? 谁能告诉我为什么会这样?

Does ncrunch have any config files or settings menu. ncrunch是否有任何配置文件或设置菜单。

I read https://www.ncrunch.net/documentation/concepts_parallel-execution but can not find any options. 我阅读了https://www.ncrunch.net/documentation/concepts_parallel-execution,但是找不到任何选项。

nCrunch by default (configurable) gets half of your cpu cores. 默认情况下(可配置),nCrunch获得一半的CPU内核。 I suppose you got 4 cores and end up with two cores for nCrunch, which gives you these numbers as expected. 我想您有4个内核,最后有两个nCrunch内核,这可以按预期提供这些数字。

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

相关问题 如何使内部零件对nCrunch可见 - How do you make internals visible to nCrunch 如何计算NCrunch风险/进度窗口上的图表? - How is the graph on the NCrunch Risk/Progress window calculated? MSpec Json.NET反序列化测试在ReSharper中失败但在NCrunch中传递 - MSpec Json.NET deserialization test fails in ReSharper but passes in NCrunch 使用 NCrunch、FxCop 分析器和“错误警告”:如何在 NCrunch 中配置警告严重性? - Using NCrunch, FxCop Analyzers and “warnings as errors”: How to configure warning severity in NCrunch? 如何分离NCrunch节点服务使用的所有LocalDb数据库 - How to detach all LocalDb databases used by NCrunch Node service JustMock和nCrunch - JustMock and nCrunch 如何测试并行端口C#应用程序? - How to test a parallel port C# application? Ncrunch首次运行所有测试通过,但是在代码更改后和按下“运行所有”按钮时失败 - Ncrunch all test pass first run, but fails after code change and when run all button is pressed 我可以使用NUnit和NCrunch通过预处理器指令测试多个构建配置吗? - Can I Use NUnit & NCrunch to Test Multiple Build Configurations with Preprocessor Directives? NCrunch正在启动ApprovalTests DiffReporter - NCrunch is launching the ApprovalTests DiffReporter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM