lsekfe 发表于 2020-11-30 11:07:20

基于testNG框架的Java单元测试流程

 1.配置
  建立Maven Project



建立pom.xml文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.jerry</groupId>

  <artifactId>mytest</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <packaging>jar</packaging>

  <name>mytest</name>

  <url>http://maven.apache.org</url>

  <properties>

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties>

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>com.jerry</groupId>

  <artifactId>mytest</artifactId>

  <version>0.0.1-SNAPSHOT</version>

  <packaging>jar</packaging>

  <name>mytest</name>

  <url>http://maven.apache.org</url>

  <properties>

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties> 安装:https://www.cnblogs.com/xusweeter/p/6559196.html,将org.testng.eclipse.updatesite.zip 拷贝到%ECLIPSE_HOME%\dropins,建立TestNG Class。

页: [1]
查看完整版本: 基于testNG框架的Java单元测试流程