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的测试引擎
    知道、想到、做到、得到
  • 相关阅读:
    Java之集合类应用总结
    Java的HashMap和HashTable
    Java安全通信:HTTPS与SSL
    字符串如何排序
    HashMap泛型编程
    Java之currenHashMap
    Android游戏开发:游戏框架的搭建(1)
    Java安全通信概述
    嵌入式linux学习步骤
    图片水平无缝滚动的代码
  • 原文地址:https://www.cnblogs.com/Durant0420/p/14762345.html
Copyright © 2011-2022 走看看