gpt4 book ai didi

intellij-idea - 为什么在 IntelliJ 中运行 TestCase 时 JUnit Jupiter 和 JUnit Vintage 分开了?

转载 作者:行者123 更新时间:2023-12-04 00:41:22 24 4
gpt4 key购买 nike

我看到JUnit5发布了,我申请了IntelliJ V2016.2.1并运行了一些测试用例。

所以看到下面的截图。

a busy cat

我只有两个问题。

  • 为什么在 IntelliJ 中运行 TestCase 时 JUnit Jupiter 和 JUnit Vintage 分开了?
  • 我可以合并 JUnit 4 和 5 测试结果吗?
  • 最佳答案

    JUnit 5 不仅仅是一个新的 API(称为 JUnit Jupiter)。它还包含一个抽象层,用于运行 JUnit 测试的工具(称为 JUnit 平台)。该平台不了解 JUnit 4 或 Jupiter 或其他任何东西。它所知道的只是测试引擎,它将执行为它们编写的测试。

    (您可以在 user guide 或我写的关于 JUnit 5's architecture 的帖子中阅读更多相关信息。)

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


    您看到的是启动器执行两个引擎,一个用于新 API (Jupiter),另一个用于 JUnit 4 (Vintage)。每个引擎都代表它在自己的数据结构中运行的测试,IntelliJ 将其显示为您看到的树。

    1. Can i Merge JUnit 4 and 5 TestResults?


    这必须是 IDE 功能,据我所知,尚未实现。

    关于intellij-idea - 为什么在 IntelliJ 中运行 TestCase 时 JUnit Jupiter 和 JUnit Vintage 分开了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38822189/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com