????3.2 xml??????д
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="TestGetRole" parallel="classes" thread-count="5">
<parameter name="url" value="/sys/login" />
<parameter name="objBean" value="loginIn" />
<parameter name="status" value="OK" />
<parameter name="statusCode" value="200" />
<parameter name="xmlName" value="mapRole" />
<test name="TestGetRole" preserve-order="true">
<parameter name="url" value="/json/getRoleInfo" />
<parameter name="objBean" value="GetRole" />
<parameter name="status" value="OK" />
<parameter name="statusCode" value="200" />
<parameter name="body" value="roleName" />
<classes>
<class name="com.lc.testScript.GetRoleTest">
<methods>
<include name="TestGetRole" />
<!--<include name="TestGetRole2" />-->
</methods>
</class>
</classes>
</test>
</suite>
???????->run as ->TestNG Suite?????????????????????????????
????4????????????????
???????????????????????????ReportNG ????????Maven
<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>
..........................................
..........................................
..........................................
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<xmlFileName1>TestGetRole.xml</xmlFileName>
.................????дtestNG?????XML????----------------------
<xmlFileName10>TestGetUser.xml</xmlFileName>
</properties>
<dependencies>
..........................
</dependencies>
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/java/testSuites/${xmlFileName}</suiteXmlFile>
.................??............
..............??????properties?е?xmlFileName????............
<suiteXmlFile>src/test/java/testSuites/${xmlFileName10}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<!-- ??????????ReportNg??????????????TestNg????? -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter</value>
</property>
</properties>
<workingDirectory>target/</workingDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
????[?] ?????maven????????????testSuite??xml???????maven??test???£????????pom.xml???maven test?????е????????????????
???????????

?????????????????
????1???????????У?????????????????????????MyBatis
????2???????????xml???????????????Щ????????????????????????testlink??????????????