junit可执行但控制层无法执行,当我在IntelliJ中运行TestCase时,为什么JUnit Jupiter和JUnit Vintage分离?...

I saw that JUnit5 is released, and i applied in IntelliJ V2016.2.1 and run some testcase.

so saw below screenshot.

7008c2994d9655bc6f4a128086c75be8.png

i have just two questions.

Why were JUnit Jupiter and JUnit Vintage separated When I Running TestCase in IntelliJ?

Can i Merge JUnit 4 and 5 TestResults?

解决方案

JUnit 5 is more than just a new API (called JUnit Jupiter). It also contains an abstraction layer for tools to run JUnit tests (called JUnit Platform). The platform has no knowledge of either JUnit 4 or Jupiter or anything else really. All it knows are test engines, which will execute the tests they were written for.

(You can read more about this in the user guide or a post I wrote about JUnit 5's architecture.)

Why were JUnit Jupiter and JUnit Vintage seperated When I Running TestCase in IntelliJ?

What you see is the launcher executing two engines, the one for the new API (Jupiter) and the one for JUnit 4 (Vintage). Each engine represents the tests it ran in its own data structure, which IntelliJ shows as the trees you see.

Can i Merge JUnit 4 and 5 TestResults?

This would have to be an IDE feature, that - as far as I know - is not implemented.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值