第一章:创建java项目工程及引入TestNG基础

1,TestNG的介绍:
TestNG的介绍:
	适合测试人员使用的原因:
		比junit涵盖功能更全面的框架
		junit更适合隔离性比较强的单元测试
		testNG更适合复杂的集成测试	

2,TestNG的使用:pom文件中引入TestNG

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.10</version>
        </dependency>
    </dependencies>

3,从github上pull,在idea中引入项目工程(如图)

TestNG自动导入 查看怕pom文件 配置信息成功引入,Test注解引入成功,编写第一个测试用例:

package com.course.testng;
import org.testng.annotations.*;


public class BasicAnootation {
    //最基本的注解 用来把方法标记为测试的一部分
    @Test
    public void testCase1(){
        System.out.println("这是测试用例1");
    }
}

 

posted @ 2023-08-12 21:51  在于折腾  阅读(50)  评论(0编辑  收藏  举报