美文网首页
idea 创建junit测试类

idea 创建junit测试类

作者: 不想明明 | 来源:发表于2018-12-26 09:29 被阅读0次

    工具

    IntelliJ IDEA

    前提条件

    1、pom.xml文件引入Junit依赖

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    

    idea配置

    1、打开idea,点击File -> Settings -> plungins



    2、输入框中输入junit,点击红色框的按钮并进行下一步操作



    3、点击Apply,之后重启idea

    4、打开需要建立测试类的文件,光标移入该类,点击Navigate -> Test



    5、点击 Create New Test



    6、创建Test类,勾选中需要测试的方法

    7、完成


    相关文章

      网友评论

          本文标题:idea 创建junit测试类

          本文链接:https://www.haomeiwen.com/subject/wdvclqtx.html