TestNG testsuite没有从命令行运行

时间:2015-08-31 16:09:08

标签: command-line testng test-suite

我需要一些帮助从命令行运行我的testng测试套件:

项目结构

已编译的课程

update termlist set status = 'B' where term in (select term from blacklist where status = 'A')

源类

myproject\bin
myproject\bin\com\...

必需的库

myproject\test
myproject\test\com\...

测试套件

myproject\libraries
myproject\libraries\xy.jar

命令行调用

myproject\test\com\...\test\mySuite.xml

结果

cd myproject
java -cp libraries\* -Dtestng.test.classpath="bin\*;test\*" org.testng.TestNG test\com\...\test\mySuite.xml

更新

mySuite.xml

[TestNG] Running:
  F:\...\myproject\test\com\...\test\mySuite.xml

===============================================
mySuite
Total tests run: 0, Failures: 0, Skips: 0
===============================================

1 个答案:

答案 0 :(得分:0)

我阅读了以下内容:http://github.com/longhua/testng-test-classpath-property-issue-1

之后我将命令行调用更改为:

java -cp libraries*;bin org.testng.TestNG test\com\...\test\mySuite.xml

这对我有用......