zoukankan      html  css  js  c++  java
  • junit5之pom文件依赖导入

    一、前言

      一般来说,我们使用junit5单元测试框架进行编写自动化测试用例,而且我们是使用maven项目编写的,具体如下。

    二、pom.xml

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>RELEASE</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.6.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.6.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>5.6.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.6.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    三、在idea中的显示

      

    • junit-jupiter-engine:Junit的核心测试引擎
    • junit-jupiter-api:写测试和进行扩展
    • junit-jupiter-params:编写参数化测试所需要的依赖包

      是新编程模块和扩展模块在junit5上写测试和扩展的组合,Jupiter子工程提供在平台上跑Jupiter的测试引擎

    • junit-platform-runner:
    • junit-platform-lanucher:

      是在jvm上启动测试框架的基础,定义了测试引擎的API,可以在cmd命令行启动这个平台

    • junit-vintage-engine:提供跑junit3和junit4的测试引擎
    知道、想到、做到、得到
  • 相关阅读:
    Django~1
    Codeforces Round#201(div1) D. Lucky Common Subsequence
    ACdream原创群赛(18)のAK's dream题解
    区间dp
    部署AlwaysOn第三步:集群资源组的健康检测和故障转移
    Join 和 App
    SSRS配置1:凭证和邮件
    巧用Alt 键
    把Excel的数据导入到数据库
    jvm系列:Java GC 分析
  • 原文地址:https://www.cnblogs.com/Durant0420/p/14762345.html
Copyright © 2011-2022 走看看