Nunit .Net Core 并行测试 [英] Nunit .Net Core Parallel Tests

查看:68
本文介绍了Nunit .Net Core 并行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是查理普尔提到的:

如果您正在运行 .NET Core 测试,则您使用的是 NUnit 可移植框架构建,它不支持并行执行.该属性仍然被接受,以便您可以在不更改代码的情况下切换到不同的平台构建

If you are running .NET Core tests, you are using the NUnit portable framework build, which does not support parallel execution. The attribute is still accepted so that you can switch to different platform builds without changing the code

有没有人知道现在情况是否仍然如此?

Does any one know if this is still the case ?

推荐答案

是的,从 NUnit 3.8.1 开始,情况仍然如此.尽管框架的便携版已被 .NET 标准版取代,但并行测试执行尚未启用.

Yes, this is still the case as of NUnit 3.8.1. Even though the Portable version of the framework has been replaced by a .NET Standard version, parallel test execution has not been enabled yet.

并行执行在 NUnit 中由 PARALLEL 条件编译启用,但在 .NET Standard 项目中尚未启用.

Parallel execution is enabled in NUnit by the PARALLEL conditional compilation which isn't enabled in the .NET Standard projects yet.

更新 NUnit 3.10.1 已发布,可在您使用 .NET Standard/Core 2.0+ 时重新启用大多数并行功能.

Update NUnit 3.10.1 has been released which re-enables most of the parallel features when you use .NET Standard/Core 2.0+.

这篇关于Nunit .Net Core 并行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆