opengeospatial / ets-wfs20

Executable Test Suite for WFS 2.0
Other
8 stars 11 forks source link

aio JAR CLI does not work with acceptMediaType application/zip #263

Closed dstenger closed 6 months ago

dstenger commented 8 months ago

Describe the bug The aio JAR CTL does not work when acceptMediaType application/zip is used. Media types application/xml and application/rdf+xml can be successfully used.

The stack trace displayed in the log:

...
Nov 08, 2023 6:53:58 PM com.occamlab.te.spi.util.HtmlReport earlHtmlReport
SCHWERWIEGEND: Transformation of EARL to HTML failed.
java.io.FileNotFoundException: Source 'file:/home/stenger/git/ets-wfs20/target/ets-wfs20-1.41-SNAPSHOT-aio.jar!/com/occamlab/te/earl/lib' does not exist
    at org.apache.commons.io.FileUtils.checkFileRequirements(FileUtils.java:274)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:657)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:553)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:519)
    at com.occamlab.te.util.Utils.copyResourceDir(Utils.java:249)
    at com.occamlab.te.spi.util.HtmlReport.earlHtmlReport(HtmlReport.java:112)
    at com.occamlab.te.spi.util.HtmlReport.getHtmlResultZip(HtmlReport.java:69)
    at com.occamlab.te.spi.executors.testng.TestNGExecutor.getResultsFile(TestNGExecutor.java:221)
    at com.occamlab.te.spi.executors.testng.TestNGExecutor.execute(TestNGExecutor.java:189)
    at org.opengis.cite.iso19142.TestNGController.doTestRun(TestNGController.java:142)
    at org.opengis.cite.iso19142.TestNGController.main(TestNGController.java:82)

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Source 'file:/home/stenger/git/ets-wfs20/target/ets-wfs20-1.41-SNAPSHOT-aio.jar!/com/occamlab/te/earl/lib' does not exist
    at com.occamlab.te.spi.util.HtmlReport.earlHtmlReport(HtmlReport.java:115)
    at com.occamlab.te.spi.util.HtmlReport.getHtmlResultZip(HtmlReport.java:69)
    at com.occamlab.te.spi.executors.testng.TestNGExecutor.getResultsFile(TestNGExecutor.java:221)
    at com.occamlab.te.spi.executors.testng.TestNGExecutor.execute(TestNGExecutor.java:189)
    at org.opengis.cite.iso19142.TestNGController.doTestRun(TestNGController.java:142)
    at org.opengis.cite.iso19142.TestNGController.main(TestNGController.java:82)
Caused by: java.io.FileNotFoundException: Source 'file:/home/stenger/git/ets-wfs20/target/ets-wfs20-1.41-SNAPSHOT-aio.jar!/com/occamlab/te/earl/lib' does not exist
    at org.apache.commons.io.FileUtils.checkFileRequirements(FileUtils.java:274)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:657)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:553)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:519)
    at com.occamlab.te.util.Utils.copyResourceDir(Utils.java:249)
    at com.occamlab.te.spi.util.HtmlReport.earlHtmlReport(HtmlReport.java:112)
    ... 5 more

To Reproduce Steps to reproduce the behavior:

  1. Check out and build master branch.
  2. Execute: java -jar ets-wfs20-1.41-SNAPSHOT-aio.jar ../src/main/resources/test-run-props.xml
    • test-run-props.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
      <properties version="1.0">
      <comment>WFS 2.0 reference implementation</comment>
      <entry key="wfs">https://cite.deegree.org/deegree-webservices-3.5.0/services/wfs200?request=GetCapabilities&amp;service=WFS&amp;version=2.0.0</entry>
      <entry key="acceptMediaType">application/zip</entry>
      </properties>
  3. Error as described above is shown.
  4. If acceptMediaType is set to application/xml or application/rdf+xml, the error does not occur.

Expected behavior All three media types, application/zip, application/xml and application/rdf+xml shall be usable with the aio JAR CLI.

dstenger commented 6 months ago

Will be solved in TEAM Engine version 6.