testng.xml ファイルを配置するディレクトリ.....
ファイルをtestng.xml
クラスパスの先頭に配置する必要があると思います。Maven を使用している場合、適切な場所はsrc/test/resources/testng.xml
. 次の例を参照してください。
Maven で pom.xml から testng.xml ファイルを呼び出す方法
testng.xml ファイルがそこにあり、それを読み取る必要があることを検出するために、pom.xml で作成する必要がある Maven 仕様はありますか。
これについては 100% 確信が持てません。上記の例を見ると、次のようなものが推奨されているように見えます。
<plugin>
<groupId>org.apache.maven.plugin</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>