TestNG 测试套件不是来自命令行的 运行

TestNG testsuite not running from command line

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

项目结构

已编译类

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

结果

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

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

更新

mySuite.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="mySuite.xml" parallel="classes" thread-count="10">

    <test name="happy path">
        <packages>
            <package name="com...test.functional.happyPath" />
        </packages>
    </test>

    <test name="exception path">  
        <packages>
            <package name="com...test.functional.exceptionPath" />
        </packages>
    </test>

</suite>

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

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

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

这对我有用...