TestNG 学习


TestNG

ITestResult it = Reporter.getCurrentTestResult();
System.out.println(it.getTestClass()); 

ITestResult it = Reporter.getCurrentTestResult(); 
System.out.println(it.getName());

java -cp "C:\TestNG_WORKSPACE" org.testng.TestNG testng.xml

java -classpath testng.jar;%CLASSPATH% org.testng.TestNG -d test-outputs testng.xml
java -classpath testng.jar;%CLASSPATH% org.testng.TestNG -d test-outputs test-outputs\testng-failed.xml

public class MyReporter implements IReporter
public class MyTestListener extends TestListenerAdapter

Reporter.log()
panda /
Published under (CC) BY-NC-SA in categories testing  tagged with testng