testng-命令行运行

使用的是绝对路径,可在任意目录下执行:

java 

-classpath 

"$classpath:

/Users/EclipseWorkSpace/testTestNg/target/test-classes:

/Users/mavenRepos/org/testng/testng/6.8/testng-6.8.jar:

/Users/mavenRepos/com/beust/jcommander/1.27/jcommander-1.27.jar" 

org.testng.TestNG  /Users/Work/EclipseWorkSpace/testTestNg/testng.xml


java -classpath "$classpath:/Users/Work/EclipseWorkSpace/testTestNg/target/test-classes:/Users/mavenRepos/org/testng/testng/6.8/testng-6.8.jar:/Users/mavenRepos/com/beust/jcommander/1.27/jcommander-1.27.jar" org.testng.TestNG /Users/Work/EclipseWorkSpace/testTestNg/testng.xml

你可能感兴趣的:(testng-命令行运行)