TestNGの実装を6.11から6.13.1にアップグレードした後にエラーが発生します。私は1つのクラスを含むTestNGスイートをトリガーするANTビルド(同じ失敗でANT 1.9.4と1.10.1のビルドを試しました)をビルドしています。すべてのANTセットアップのものをやった後、それはテストの実行を開始するようにTestNGのを呼び出して、私はすぐに次のエラーを取得する:ここでTestNGが "javax.xml.parsers.ParserConfigurationException:validationがサポートされていません"というエラーが発生する理由
[testng] javax.xml.parsers.ParserConfigurationException: validation is not supported
[testng] at org.gjt.xpp.jaxp11.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:100)
[testng] at org.testng.xml.XMLParser.<clinit>(XMLParser.java:29)
[testng] at org.testng.xml.Parser.<clinit>(Parser.java:34)
[testng] at org.testng.TestNG.parseSuite(TestNG.java:290)
[testng] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:334)
[testng] at org.testng.TestNG.initializeEverything(TestNG.java:974)
[testng] at org.testng.TestNG.run(TestNG.java:988)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1330)
[testng] at org.testng.TestNG.main(TestNG.java:1299)
[testng] [TestNG] [ERROR] java.lang.NullPointerException
[testng] Exception in thread "main" java.lang.NullPointerException
[testng] at org.testng.TestNG.getStatus(TestNG.java:206)
[testng] at org.testng.TestNG.main(TestNG.java:1300)
[testng] The tests failed.
は私のbuild.xmlです:
<project name="6 - GW Testing" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="lib.dir" location="C:/dev/.ivy2/cache" />
<property name="res.dir" location="../TestNGReports" />
<property name="GWPersistence.ivy.file" value="C:/tmp/svncheckouts/guidewire/GWPersistenceIvy/gwpersistence-ivy.xml"/>
<property name="GWBroker.ivy.file" value="C:/tmp/svncheckouts/guidewire/GWBrokerIvy/gwbroker-ivy.xml"/>
<property name="GWRepository.ivy.file" value="C:/tmp/svncheckouts/guidewire/GWRepositoryIvy/gwrepository-ivy.xml"/>
<property name="GWServices.ivy.file" value="C:/tmp/svncheckouts/guidewire/GWServicesIvy/gwservices-ivy.xml"/>
<property name="GWTesting.ivy.file" value="C:/tmp/svncheckouts/guidewire/GWTestingIvy/gwtesting-ivy.xml"/>
<property name="Local.config" location="C:/tmp/regression-configs/guidewire" />
<property name="Regression.config" location="${Local.config}/suite" />
<path id="lib.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="combined.classpath">
<path refid="lib.classpath" />
</path>
<target name="init" description="initialize the build environment">
<tstamp />
<delete dir="${res.dir}" />
<mkdir dir="${res.dir}" />
<delete dir="C:/Users/qauser/.ivy2/cache/com.idfbins.guidewire" />
</target>
<target name="resolve" depends="init" description="retrieve dependencies with ivy">
<ivy:configure file="C:/dev/.ivy2/ivysettings.xml" />
<ivy:resolve file="${GWPersistence.ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:resolve file="${GWBroker.ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:resolve file="${GWRepository.ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:resolve file="${GWServices.ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:resolve file="${GWTesting.ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
<ivy:resolve file="../GWRepositoryConfig/suite/ivy.xml" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[type]-[revision].[ext]" />
</target>
<target name="run-tests-a-test-runner" depends="resolve">
<taskdef name="testng" classpathref="lib.classpath" classname="org.testng.TestNGAntTask">
<classpath>
<pathelement location="../../lib/default/testng-6.11.jar"/>
</classpath>
</taskdef>
<delete file="${Local.config}/config.properties" />
<copy file="C:/tmp/svncheckouts/guidewire/GWRepositoryConfig/suite/regression-test-runner.properties" todir="${Local.config}" />
<rename src="${Local.config}/regression-test-runner.properties" dest="${Local.config}/config.properties"/>
<echo message="CONFIG FILE: regression-test-runner.properties copied to config.properties" />
<echo message="Running Tests..." />
<testng classpathref="combined.classpath" outputDir="${res.dir}" haltOnfailure="false">
<classpath location="combined.classpath" />
<xmlfileset dir="C:/tmp/svncheckouts/guidewire/JobXMLFiles" includes="a-test-runner.xml"/>
</testng>
</target>
</project>
そしてここでは、私のスイートの宣言です:これまでのところ、私はスイートdeclaratにDTDを削除しようとしてい
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="A-Test-Runner" verbose="1">
<test name="A-Test-Runner">
<classes>
<class name="regression.r2.clock.billingcenter.cancel.TestCancellationOnBoundPolicy" />
</classes>
</test>
イオン、私はあらゆる方法で進路を変えてきました。そしてANTとTestNGの様々なバージョンを試しました。これまでのところ、私が働くことができたのはTestNG 6.11に戻ることだけでした。私はここで何が起こっているのか、迷っています。何かご意見は?
を経由して、それを指定することにより、バックJDKで使用可能なデフォルトのパーサにフォールするためにJavaを強制することでこの過去の取得試すことができます!あなたは正しい方向に私を指差した。 Hibernateが私たちのために問題を引き起こしていたことが判明しました。この修正は、それに含まれていたdom4jj jarを除外し、新しいバージョンを組み込むことでした。私はそれを掘り起こすまでわかりませんでした。アイビーのorg宣言がある時点でdom4jのために変更されたので、dom4jの古いバージョン(2007年頃)を使用していました。この瓶はxpp3を含んだものです。新しいdom4jモジュール(09/2017から)に更新すると、私たちのために完全に修正されました。私はまだxpp3を使っていると思っていますが、xmlファイルを解析できるようになりました。ありがとうございました。あなたは命の恩人です! – BJHiltbrand