Hi,
I am playing around with basex-tests [1]. I cloned the repository, then went to the directory and tried "mvn test". I got a compilation error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project basex-tests: Compilation failure [ERROR] .../basex-tests/src/test/java/org/basex/test/qt3ts/app/AppXMark.java:[293,26] constant string too long
If I try only "mvn compile", everything goes fine. From there, I could then execute the tests by using (from the same directory):
M2_BASEX=~/.m2/repository/org/basex/basex BASEX=$M2_BASEX/7.2.2-SNAPSHOT/basex-7.2.2-20120514.173900-14.jar
java -cp target/classes/:$BASEX org.basex.tests.w3c.QT3TS \ -p ~/tmp/fots-try
The directory ~/tmp/fots-try/ is not the official FOTS from the WG, but a small sample I wrote for playing with FOTS. It contains the following files:
fots-try/ catalog.xml sample.xml set.xml
The file catalog.xml is the FOTS catalog, the main entry point, sample.xml is a sample XML document, and set.xml is the only one test set in the test suite.
I have two remarks. 1/ The second test case fails because BaseX tries to resolve sample.xml in the current directory, but it should be resolved relatively to the catalog file. The FOTS doc says (for the attribute group "fileAttr"): "The URI will always be relative to the base URI of the XML document in which the attribute appears."
2/ BaseX creates a file "qt3ts.log" in the test suite directory. I couldn't find any infos in the FOTS doc about where to put the result, but Saxon does that in results/saxon/, which is probably better in order to avoid interferences between several processors. The catalog contains:
<catalog xmlns="http://www.w3.org/2010/09/qt-fots-catalog" test-suite="try" version="0.1.0">
<environment name="empty"/>
<!-- set prefix "s" and refer to sample.xml --> <environment name="sample"> <namespace prefix="s" uri="http://example.org/sample"/> <source role="." file="sample.xml" uri="http://example.org/sample.xml"> <description>Some sample input tree.</description> <created by="Florent Georges" on="2012-05-14"/> </source> </environment>
<!-- the only one test set in this suite --> <test-set name="set" file="set.xml"/>
</catalog>
The test set descriptor, set.xml, contains two test cases:
<test-set xmlns="http://www.w3.org/2010/09/qt-fots-catalog" name="set">
<description>Some test set...</description>
<!-- test "hello" is a string with content 'hello' --> <test-case name="sample-001"> <description>Some test case...</description> <created by="Florent Georges" on="2012-05-14"/> <environment ref="empty"/> <test>"hello"</test> <result> <all-of> <assert-eq>'hello'</assert-eq> <assert-type>xs:string</assert-type> </all-of> </result> </test-case>
<!-- test sample.xml contains one child element named sample --> <test-case name="sample-002"> <description>Other test case...</description> <created by="Florent Georges" on="2012-05-14"/> <environment ref="sample"/> <test>sample</test> <result> <assert-type>element(sample)</assert-type> </result> </test-case>
</test-set>
Thank you for making this available to the community!
Regards,