opengeospatial / ets-wfs20 Goto Github PK
View Code? Open in Web Editor NEWExecutable Test Suite for WFS 2.0
License: Other
Executable Test Suite for WFS 2.0
License: Other
We have an example Application Schema for training and testing purposes called "simpleDemo". There are four FeatureTypes in it: City, District, State and River. The FeatureTypes are somehow connectet to each other (embedded Features, references etc.).
Now the "Basic" test is never going to 100%, because the test expects on every FeatureType numerical or temporal and as well nilable properties. The FeatureType City has all of them, the other ones not, because it makes no sense to put them there and for the reason to keep the example as simple as possible.
So, what I did: I removed the FeatureTypes with the "missing" properties and left just City in the application and the tests reached 100%.
So my wish: make the Test less "greedy" eg. as one FeatureType has the wanted properties let the test go to 100%, as it is not realistic that a "real" WFS will have all types of properties on every FeatureType.
The full example is located here: http://services.interactive-instruments.de/cite2013wfs/simpledemo/cgi-bin/cities-postgresql/wfs?request=GetCapabilities&service=wfs
The "City only" example is here: http://services.interactive-instruments.de/cite2015/simpledemo/cgi-bin/cities-postgresql/wfs?request=GetCapabilities&service=wfs
(Note: the cite2015 service is currently my testing service for this issue, so it might change).
BR
Jean-Michel
Test 'verify GML Object Property Pattern' fails if a property with type 'gml:TimePeriodType' is returned by DescribeFeatureType request.
Example of DescribeFeatureType response:
...
<element name="osm_protected_area" substitutionGroup="gml:AbstractFeature">
<complexType>
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="osm_id" minOccurs="0" type="integer"/>
<element name="boundary" minOccurs="0" type="string"/>
<element name="leisure" minOccurs="0" type="string"/>
<element name="name" minOccurs="0" type="string"/>
<element name="tourism" minOccurs="0" type="string"/>
<element name="osm_timestamp" minOccurs="0" type="dateTime"/>
<element name="period" minOccurs="0" type="gml:TimePeriodType"/>
<element name="way_area" minOccurs="0" type="decimal"/>
<element name="geometry" minOccurs="0" type="gml:SurfacePropertyType"/>
</sequence>
</extension>
</complexContent>
</complexType>
</element>
...
Following error message is returned:
Severity: ERROR Message: GML property cannot be a GML object: {http://www.deegree.org/app}period (in type null) Severity: ERROR Message: GML property cannot have ID type attribute: {http://www.deegree.org/app}period (in type null) Severity: ERROR Message: GML property cannot be a GML object: {http://www.deegree.org/app}period (in type null) Severity: ERROR Message: GML property cannot have ID type attribute: {http://www.deegree.org/app}period (in type null)
GML 3.2.1 specification says following:
A.1.1.7 Property elements are not object elements
a) Test Purpose: Verify that all property elements in the GML application
schema are not objects.
b) Test Method: Check the application schema that every child element of
every object element is neither directly or indirectly in the substitution
group of gml:AbstractObject.
c) Reference: ISO 19136:2007, 7.2.2, 21.2.5.
d) Test Type: Capability Test.
period is of type 'gml:AbstractGMLType' (when the hierarchy is resolved beginning at 'gml:TimePeriodType'). This does not mean that it is a 'gml:AbstractObject'. As 'gml:AbstractObject' is an abstract element it can just be inherited via substitutionGroup (which is not the case in the given example).
So, the test should not check if an element is inherited from 'gml:AbstractGMLType'. Instead, it should be tested whether an element is inherited from 'gml:AbstractObject'.
The test is supposed to send 2 GetFeatureWithLock requests with 10 randomly selected feature ids. To achieve this, util method WFSRequest.addResourceIdPredicate(Document, Set) is used, but in that method there is a check that requires the request to be a GetFeature request, which is always false for a GetFeatureWithLock request.
As a consequence, the feature ids are never added in the request and it is unpredictable which features will be locked, the only restriction is a count of 10. Depending on the number a features a WFS offers and which features are locked in the 2 requests, the test will randomly succeed or fail.
Please fix WFSRequest.addResourceIdPredicate(Document, Set) to add resource id filters for GetFeatureWithLock requests, too.
Following test fail with property of type gml:TimePeriodPropertyType:
Error message:
Empty Set<TemporalGeometricPrimitive>
Analysis:
In org.opengis.cite.iso19142.util.DataSampler#getTemporalExtent() an error occurs:
java.lang.ClassCastException: org.apache.xerces.dom.DeferredTextImpl cannot be cast to org.w3c.dom.Element
This leads to the fact that TreeSet tmSet is empty and the previously described error is thrown by the test suite.
Following service can be used to reproduce the bug: http://ogctestbed12.lat-lon.de/deegree/services/wfs?service=WFS&request=GetCapabilities
When SOAPEncoding is set to true, the request is made as a SOAP request, however, the response is not evaluated accordingly and fail. According to the specification when a DescribeFeatureType request is made as a SOAP request, the response should be base64 encoded, but the test evaluates this as a failure.
<test-method status="FAIL" signature="describeAllFeatureTypes(org.opengis.cite.iso19142.ProtocolBinding)[pri:0, instance:org.opengis.cite.iso19142.simple.DescribeFeatureTypeTests@4333e4a7]" name="describeAllFeatureTypes" duration-ms="307" started-at="2016-02-15T09:21:14Z" description="See ISO 19142: 9.2.4.1" data-provider="protocol-binding" finished-at="2016-02-15T09:21:15Z">
<params>
<param index="0">
<value>
<![CDATA[SOAP]]>
</value>
</param>
</params>
<exception class="java.lang.AssertionError">
<message>
<![CDATA[Document element has unexpected [local name]. expected [schema] but found [DescribeFeatureTypeResponse]]]>
</message>
</exception> <!-- java.lang.AssertionError -->
<reporter-output>
</reporter-output>
The relevant conformance class is Spatial joins: "The server shall implement join predicates using spatial operators." See A.1.12.
All tests are skipped if the service constraint ImplementsSpatialJoins
is "FALSE" in the capabilities document.
Currently, the test supportedStoredQueryLanguages in "Manage Stored Query"-CC fails against service [1]. The service does not describe the parameter language of the operation CreateStoredQuery.
In the specification we do not find a hint why this is mandatory in the capabilities:
8.3.5.2 Parameter domains (p. 49)
Table 12 defines the parameter domains that may be defined in the capabilities document of a web feature
service.
Table 12 (p. 50):
CreateStoredQuery, language, anyURI
Shall include the value urn:ogc:def:queryLanguage:OGC-WFS::WFSQueryExpression. May also include other
values indicating other languages are supported. This International Standard does not assign any meaning to
or describe any additional values that might be listed.
14.2.2.5.3 Implementation language (p. 82):
The language attribute of the wfs:QueryExpressionText element shall be used to specify the implementation
language of a component query expression.
Servers that conform to this International Standard shall support the value "urn:ogc:def:queryLanguage:OGC-
WFS::WFSQueryExpression" indicating that the component query expression is specified using the wfs:Query
(see 7.9.2.2) or wfs:StoredQuery (see 7.9.3.2) elements.
[1] http://ogctestbed12.lat-lon.de/deegree/services/wfs?service=WFS&request=GetCapabilities
A service exception is expected indicating a LockHasExpired
error. Table D.2 in the WFS 2.0 specification (OGC 09-025r1, ISO 19142:2010) maps this to status code 403 (Forbidden), but the test expects 400 (Bad Request). The error isn't really due to malformed syntax.
If the test "update Simple Property Value" tries to update a property with data type decimal, an empty value is inserted as the data type is not supported by the ETS.
The relevant method is #newPropertyValue in [1]. The data types string, datetime and double are considered but other data types are missing.
Example for generated request:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:tns="http://www.deegree.org/app"
service="WFS" version="2.0.0">
<wfs:Update typeName="tns:ft">
<wfs:Property>
<wfs:ValueReference>tns:property[1]</wfs:ValueReference>
<wfs:Value />
</wfs:Property>
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
<fes:ResourceId rid="ft_-6187774" />
</fes:Filter>
</wfs:Update>
</wfs:Transaction>
The test run preconditions are currently implemented as configuration (@BeforeSuite) methods in the org.opengis.cite.iso19142.Prerequisites
class. If any of these fail, all tests are skipped. However, a failing config method is not displayed by default in the HTML report--the "Config" checkbox must be selected to view them.
It would be better to promote these checks to test methods placed in a special "preconditions" group. The remaining tests would depend on this group (using the dependsOnGroups property); the preconditions are executed first and dependent tests are skipped if any preconditions are not satisfied.
Our WFS offers instances of 2 feature types. When running the test suite, the POST version of Basic WFS test Property Is Nil fails because it sends an invalid request:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
<wfs:Query xmlns:ns73="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" typeNames="ns73:NamedPlace">
<Filter xmlns="http://www.opengis.net/fes/2.0">
<PropertyIsNil>
<ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:GeographicalNames:3.0">tns:type</ValueReference>
</PropertyIsNil>
</Filter>
<Filter xmlns="http://www.opengis.net/fes/2.0">
<PropertyIsNil>
<ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:ProtectedSites:3.0">tns:siteProtectionClassification</ValueReference>
</PropertyIsNil>
</Filter>
</wfs:Query>
<wfs:Query xmlns:ns5="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" typeNames="ns5:ProtectedSite"/>
</wfs:GetFeature>
According to query schema, an AbstractAdhocQueryExpressionType can only contain a single AbstractSelectionClause (i.e. FIlter) or none at all. The one sent contains 2 of them.
Thus, the request must be:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
<wfs:Query xmlns:ns73="urn:x-inspire:specification:gmlas:GeographicalNames:3.0" typeNames="ns73:NamedPlace">
<Filter xmlns="http://www.opengis.net/fes/2.0">
<PropertyIsNil>
<ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:GeographicalNames:3.0">tns:type</ValueReference>
</PropertyIsNil>
</Filter>
</wfs:Query>
<wfs:Query xmlns:ns5="urn:x-inspire:specification:gmlas:ProtectedSites:3.0" typeNames="ns5:ProtectedSite">
<Filter xmlns="http://www.opengis.net/fes/2.0">
<PropertyIsNil>
<ValueReference xmlns:tns="urn:x-inspire:specification:gmlas:ProtectedSites:3.0">tns:siteProtectionClassification</ValueReference>
</PropertyIsNil>
</Filter>
</wfs:Query>
</wfs:GetFeature>
Running locally the final report just says everything PASSED, but also that all tests were skipped (89 of them), a EPSG db initialization errors shown. What is the issue?
[exec] Cannot create JDBC driver of class '' for connect URL 'null'
[exec] org.opengis.util.FactoryException: Failed to connect to the EPSG database.
[exec] at org.geotoolkit.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:678)
[exec] at org.geotoolkit.referencing.factory.ThreadedAuthorityFactory.getBackingStore(ThreadedAuthorityFactory.java:372)
[exec] at org.geotoolkit.referencing.factory.CachingAuthorityFactory.availability(CachingAuthorityFactory.java:296)
[exec] at org.geotoolkit.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:579)
[exec] at org.geotoolkit.factory.FactoryRegistry$1.filter(FactoryRegistry.java:237)
[exec] at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:810)
[exec] at javax.imageio.spi.FilterIterator.next(ServiceRegistry.java:828)
[exec] at org.geotoolkit.internal.LazySet.addNext(LazySet.java:77)
[exec] at org.geotoolkit.internal.LazySet.size(LazySet.java:96)
[exec] at java.util.AbstractCollection.toArray(AbstractCollection.java:136)
[exec] at java.util.ArrayList.<init>(ArrayList.java:164)
[exec] at org.geotoolkit.referencing.DefaultAuthorityFactory.create(DefaultAuthorityFactory.java:111)
[exec] at org.geotoolkit.referencing.CRS.getAuthorityFactory(CRS.java:227)
[exec] at org.geotoolkit.referencing.CRS.decode(CRS.java:434)
[exec] at org.opengis.cite.iso19142.FeatureTypeInfo.setDefaultCRS(FeatureTypeInfo.java:89)
[exec] at org.opengis.cite.iso19142.util.ServiceMetadataUtils.extractFeatureInfo(ServiceMetadataUtils.java:194)
[exec] at org.opengis.cite.iso19142.SuiteFixtureListener.processWfsParameter(SuiteFixtureListener.java:92)
[exec] at org.opengis.cite.iso19142.SuiteFixtureListener.onStart(SuiteFixtureListener.java:40)
[exec] at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:199)
[exec] at org.testng.SuiteRunner.run(SuiteRunner.java:252)
[exec] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[exec] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[exec] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
[exec] at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
[exec] at org.testng.TestNG.run(TestNG.java:1057)
[exec] at com.occamlab.te.spi.executors.testng.TestNGExecutor.execute(TestNGExecutor.java:115)
[exec] at org.opengis.cite.iso19142.TestNGController.doTestRun(TestNGController.java:119)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:606)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
[exec] at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:292)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
[exec] at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
[exec] at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
[exec] at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
[exec] at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
[exec] at net.sf.saxon.Controller.transform(Controller.java:1560)
[exec] at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
[exec] at com.occamlab.te.TECore.executeTemplate(TECore.java:571)
[exec] at com.occamlab.te.TECore.executeXSLFunction(TECore.java:1034)
[exec] at com.occamlab.te.TECore.callFunction(TECore.java:1066)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:606)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
[exec] at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
[exec] at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:352)
[exec] at net.sf.saxon.expr.Expression.process(Expression.java:461)
[exec] at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:282)
[exec] at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:295)
[exec] at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:341)
[exec] at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:542)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
[exec] at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
[exec] at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
[exec] at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
[exec] at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
[exec] at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
[exec] at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
[exec] at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
[exec] at net.sf.saxon.Controller.transform(Controller.java:1560)
[exec] at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
[exec] at com.occamlab.te.TECore.executeTemplate(TECore.java:571)
[exec] at com.occamlab.te.TECore.executeTest(TECore.java:779)
[exec] at com.occamlab.te.TECore.execute_test(TECore.java:390)
[exec] at com.occamlab.te.TECore.execute_suite(TECore.java:438)
[exec] at com.occamlab.te.TECore.execute(TECore.java:295)
[exec] at com.occamlab.te.TECore.run(TECore.java:2273)
[exec] at java.lang.Thread.run(Thread.java:745)
[exec] Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
[exec] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
[exec] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
[exec] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
[exec] at org.geotoolkit.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:565)
[exec] at org.geotoolkit.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:652)
[exec] ... 82 more
[exec] Caused by: java.lang.NullPointerException
[exec] at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:524)
[exec] at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:493)
[exec] at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
[exec] at java.sql.DriverManager.getDriver(DriverManager.java:262)
[exec] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
[exec] ... 86 more
[exec]
The unknownFeatureIdentifier
test (in org.opengis.cite.iso19142.basic.filter.ResourceIdOperatorTests) submits a request where the RESOURCEID parameter value does not match any feature. However, the TYPENAMES parameter is also present, which suggests the correct response is an exception report according to cl. 7.9.2.4.1:
If both the TYPENAMES and RESOURCEID parameters are specified then all the feature instances identified by the RESOURCEID parameter shall be of the type specified by the TYPENAMES parameter; otherwise the server shall raise an InvalidParameterValue exception...
Currently the test expects a normal (200) response containing an empty wfs:FeatureCollection.
The test beforePeriod in Temporal filter CC fails sometimes.
The test was applied to [1] , feature Type gns_iceland, property modify_date. The date property contains data from 1994-01-14 to 2015-07-22. The request send by the ets-wfs20 is
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0"
count="10" service="WFS" startIndex="0" version="2.0.0">
<wfs:Query xmlns:ns60="http://www.deegree.org/app" typeNames="ns60:gns_iceland">
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
<fes:Before>
<fes:ValueReference xmlns:tns="http://www.deegree.org/app">tns:modify_date</fes:ValueReference>
<gml:TimePeriod xmlns:gml="http://www.opengis.net/gml/3.2"
frame="http://www.iso.org/iso/iso8601" gml:id="TP01">
<gml:beginPosition>1994-01-14T09:59:59.999Z</gml:beginPosition>
<gml:endPosition>1994-01-14T22:59:59.999Z</gml:endPosition>
</gml:TimePeriod>
</fes:Before>
</fes:Filter>
</wfs:Query>
</wfs:GetFeature>
The WFS responses with an empty FeatureCollection as expected. The test should skip the oldest date property to avoid test failures. The test afterPeriod may be checked, too.
[1] http://ogctestbed12.lat-lon.de/deegree/services/wfs?service=WFS&request=GetCapabilities
This error just occurs on:
If following service is tested, the main method of the ETS throws a NullPointerException:
NullPointerException:
<exception>
Error in call to extension function {public java.lang.Object com.occamlab.te.TECore.callFunction(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo)
throws java.lang.Exception}:
Exception in extension function net.sf.saxon.s9api.SaxonApiException:
Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}:
Exception in extension function java.lang.NullPointerException
</exception>
As you can see in testng/b8248e18-9d5d-4f01-bc11-eb44c61f5365/testng-results.xml (see special-characters-log.zip) the TEAM Engine installation on opengeospatial has problems with special characters.
For example, request [1] returns the special characters correct, but in the testng-results.xml the special characters are broken.
When the Saxon XPath processor is made available (on the classpath), the test run terminates with an exception. The root cause is:
java.lang.IllegalArgumentException: Externally-supplied DOM envelope belong to the wrong Configuration
at net.sf.saxon.dom.DOMEnvelope.wrapDocument(DOMEnvelope.java:262)
at net.sf.saxon.xpath.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:307)
at net.sf.saxon.xpath.XPathEvaluator.evaluate(XPathEvaluator.java:414)
at org.opengis.cite.iso19142.TestNGController.validateTestRunArgs(TestNGController.java:144)
...
The Document node passed as the argument to the validateTestRunArgs method is of type net.sf.saxon.dom.DocumentOverNodeInfo
(which was created while executing the main XSLT template).
Note: When the validateTestRunArgs method is not invoked, the test suite runs to completion.
Spatial Joins - intersects (plan to have the test ready: 20160516-20160531)
The ETS sends following request in test "updateGMLName":
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" service="WFS"
version="2.0.0">
<wfs:Update xmlns:ns30="http://www.deegree.org/app" typeName="ns30:ft">
<wfs:Property>
<wfs:ValueReference>gml:name[1]</wfs:ValueReference>
<wfs:Value>Ce n'est pas Vieux-Port de Montréal!</wfs:Value>
</wfs:Property>
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
<fes:ResourceId rid="ft_411196921" />
</fes:Filter>
</wfs:Update>
</wfs:Transaction>
deegree returns following in GetFeature request:
...
<gml:name>Ce n'est pas Vieux-Port de Montréal!</gml:name>
...
Nevertheless, the test suite fails with following error:
Unexpected result evaluating XPath expression with context node app:ft: gml:name[1] = "Ce n'est pas Vieux-Port de Montréal!"
We assume that the test uses the encoded string to do the assert (after having analysed the code), but the decoded string should be valid as well.
What do you think about it?
The (non-standard) stored query urn:ogc:def:query:OGC-WFS::GetFeatureByType
is submitted when attempting to reset an expired lock. Since the SUT may not implement this, the equivalent ad hoc query should be used instead.
We detected a bug in test deletedFeatureIsRetired.
The test deletedFeatureIsRetired requests the last version of a feature after having deleted it. The parameter version="LAST" is used for that.
The problem is that the test does not request the last version as version="LAST" is set after the request has already been sent.
Line 243 - 245 of VersioningTests [1] are relevant:
ResourceId qryId = new ResourceId(gmlId);
rsp = this.wfsClient.GetFeatureVersion(qryId, typeName);
qryId.setVersion(FES2.VersionAction.LAST.name());
[1] org.opengis.cite.iso19142.versioning.VersioningTests
Test (I guess it is: ""updateGMLName") crashes, see below:
Apr 24, 2014 1:09:20 PM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 4 * Client out-bound request
4 > GET [http://services.interactive-instruments.de/cite2013tp/cgi-bin/sf/wfs?service=WFS&version=2.0.0&request=GetFeature&count=10&startindex=0&storedquery_id=urn:ogc:def:query:OGC-WFS::GetFeatureById&id=City.3]()
Apr 24, 2014 1:09:20 PM com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 4 * Client in-bound response
4 < 200
4 < Transfer-Encoding: chunked
4 < Date: Thu, 24 Apr 2014 11:09:20 GMT
4 < Content-Disposition: inline; filename=""XtraServerGetFeature.xml" 4 < Keep-Alive: timeout=5, max=92
4 < Connection: Keep-Alive
4 < Content-Type: application/gml+xml; version=3.2.1; charset=utf-8
4 < Server: Apache/2.4.9 (Unix)
4 <
<?xml version=""1.0"" encoding=""utf-8""?>
<ci:City gml:id=""City.3"" xmlns:ci=""[http://www.interactive-instruments.de/namespaces/cite/wfst]()"" xmlns:gml=""[http://www.opengis.net/gml/3.2]()"" xmlns:xsi=""[http://www.w3.org/2001/XMLSchema-instance]()"" xsi:schemaLocation=""[http://www.interactive-instruments.de/namespaces/cite/wfst]() [http://services.interactive-instruments.de/cite2013tp/schema/wfst.xsd]() [http://www.opengis.net/gml/3.2]() [http://services.interactive-instruments.de/cite2013tp/schema/ogc/gml/3.2.1/gml.xsd]() [http://www.opengis.net/gml/3.2]() [http://services.interactive-instruments.de/cite2013tp/schema/ogc/gml/3.2.1/gml.xsd]()"">
<gml:name>Ce n'est pas Vieux-Port de Montreal!</gml:name>
<ci:location>
<gml:Point gml:id=""city.id.3.location.Geom_0"" srsName=""urn:ogc:def:crs:EPSG::4326"" srsDimension=""2"">
<gml:pos>48.135800000000 11.577600000000</gml:pos>
</gml:Point>
</ci:location>
<ci:id>3</ci:id>
<ci:name>Munchen</ci:name>
<ci:inhabitants>1353100</ci:inhabitants>
</ci:City>
Apr 24, 2014 1:09:20 PM org.opengis.cite.iso19142.util.TestSuiteLogger log
WARNING: XPath expression cannot be evaluated: gml:name[1] = 'Ce n'est pas Vieux-Port de Montreal!'.
javax.xml.transform.TransformerException: misquoted _literal_... expected single _quote_!
at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:612)
at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:203)
at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:100)
at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:114)
... ... ...
Originally reported in the OGC CITE issue tracker: issue #947
Opened: 2014-04-24 07:35:38 Last Updated: 2014-06-09 11:47:28
Currently, the ETS modifies data of the tested server via WFS-T interface.
The ETS should undo all changes as test suites should not actively manipulate IUTs.
For example, a self join request with the touches operator returns more tuples after the ETS was executed.
Test updatedVersionHasSupersededPredecessor requires the optional attribute "previousRid".
The test checks whether the response contains the attribute "previousRid" after an update request has been executed.
In the WFS 2.0 specification "previousRid" is not mentioned.
The FE 2.0 specification states the following (7.11.2 Encoding, p. 31):
The previousRid attribute may be used, in implementations that support versioning,
to report the previous identifier of a resource.
This confirms that "previousRid" is an optional attribute.
The test should not base on an optional functionality.
Provide information and examples of how to specify the service constraints in the GetCapabilities that will let the test know what will be executed.
Currently wfs 2.0 appears in its own directory.
...
├── wcs
│ └── 1.0.0
├── wfs
│ ├── 1.0.0
│ └── 1.1.0
├── wfs20
│ └── 2.0.0
It should appear under the wfs directory.
While testing some WFS services, the tests script skips all the tests, even though the capabilities document is valid. Please fix to report properly the error and provide more useful information to the service providers. Server example includes:
http://wfs.geonorge.no/skwms1/wfs.elf-ad?service=WFS&version=2.0.0&request=GetCapabilities
http://wfs.geonorge.no/skwms1/wfs.inspire-hy-p?service=WFS&version=2.0.0&request=GetCapabilities
---------- RM ----
It seems an invalid media type was received when attempting to acquire sample data during the initialization phase:
‘text/xml; subtype=gml/3.2.1;charset=UTF-8'
Parsing was aborted because the Content-Type header in the response message is invalid.
The subtype parameter must be quoted to make it syntactically valid (subtype="gml/3.2.1").
See #9.
Note that according to OGC 09-144r1, the GML media type should be specified as "application/gml+xml; charset=utf-8; version=3.2" (the ‘version’ parameter is optional and isn’t necessary for conformance testing). Using the generic "application/xml" media type is also fine.
in the WFS-transactional tests TE sends the following Update request:
xmlns:tns=\"http://www.interactive-instruments.de/namespaces/cite/wfst\"
xmlns:gml=\"http://www.opengis.net/gml/3.2\" service=\"WFS\" version=\"2.0.0\">
typeName=\"ns69:City\">
tns:inhabitants[1]
as you can see the is empty and after that this field is empty in the
database. The SUT answers:
xmlns:fes=\"http://www.opengis.net/fes/2.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.opengis.net/wfs/2.0 http://services.interactive-instruments.de/cite2013tp/schema/ogc/wfs/2.0/wfs.xsd\">
1
OK.
Then TE send a GetFeature request:
http://services.interactive-instruments.de/cite2013tp/cgi-bin/sf/wfs?service=W
FS&version=2.0.0&request=GetFeature&count=10&startindex=0&storedquery_id=urn:o
gc:def:query:OGC-WFS::GetFeatureById&id=City.71
the SUT answers correctly:
xmlns:gml=\"http://www.opengis.net/gml/3.2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xsi:schemaLocation=\"http://www.interactive-instruments.de/namespaces/cite/wfst http://services.interactive-instruments.de/cite2013tp/schema/wfst.xsd http://www.opengis.net/gml/3.2 http://services.interactive-instruments.de/cite2013tp/schema/ogc/gml/3.2.1/gml.xsd http://www.opengis.net/gml/3.2 http://services.interactive-instruments.de/cite2013tp/schema/ogc/gml/3.2.1/gml.xsd\">
Ce n\'est pas Vieux-Port de Montreal!
srsDimension=\"2\">
50.936400000000 6.959100000000
70
Koln
as the inhabitants property is optional it is not in the response.
Then TE throws an Exception:
Apr 24, 2014 1:09:24 PM org.opengis.cite.iso19142.util.TestSuiteLogger log
WARNING: XPath expression cannot be evaluated: tns:inhabitants[1] = ''.
com.sun.org.apache.xpath.internal.domapi.XPathStylesheetDOM3Exception: Prafix
muss als Namespace aufgelost werden: tns
at com.sun.org.apache.xpath.internal.compiler.XPathParser.errorForDOM3(XPathParser.java:657)
at com.sun.org.apache.xpath.internal.compiler.Lexer.mapNSTokens(Lexer.java:642)
at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:269)
at com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:100)
... ... ...
The namespace prefix is ci and not tns for inhabitants.
Originally reported in the OGC CITE issue tracker: issue #946
Opened: 2014-04-24 07:19:31 Last Updated: 2014-06-09 12:44:53
Test: WFS2.0 version=1.22
Beta Server: http://cite.opengeospatial.org/te2/
Here is the session log.
s0038.zip
2016/08/10-08:21:01 ERROR
Test Name : tns:Main type Mandatory
net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public java.lang.Object com.occamlab.te.TECore.callFunction(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo) throws java.lang.Exception}: Exception in extension function net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}: Exception in extension function java.lang.IllegalArgumentException: Missing reference to GML document or application schema.
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:192)
at com.occamlab.te.TECore.executeTemplate(TECore.java:574)
at com.occamlab.te.TECore.executeTest(TECore.java:785)
at com.occamlab.te.TECore.execute_test(TECore.java:393)
at com.occamlab.te.TECore.execute_suite(TECore.java:441)
at com.occamlab.te.TECore.execute(TECore.java:298)
at com.occamlab.te.TECore.run(TECore.java:2295)
at java.lang.Thread.run(Thread.java:745)
Caused by: net.sf.saxon.trans.XPathException: Error in call to extension function {public java.lang.Object com.occamlab.te.TECore.callFunction(net.sf.saxon.expr.XPathContext,java.lang.String,java.lang.String,net.sf.saxon.om.NodeInfo) throws java.lang.Exception}: Exception in extension function net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}: Exception in extension function java.lang.IllegalArgumentException: Missing reference to GML document or application schema.
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:151)
at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:352)
at net.sf.saxon.expr.Expression.process(Expression.java:461)
at net.sf.saxon.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:282)
at net.sf.saxon.expr.ExpressionTool.evaluate(ExpressionTool.java:295)
at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:341)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:542)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:551)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
at net.sf.saxon.Controller.transform(Controller.java:1560)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
... 7 more
Caused by: net.sf.saxon.s9api.SaxonApiException: Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}: Exception in extension function java.lang.IllegalArgumentException: Missing reference to GML document or application schema.
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:192)
at com.occamlab.te.TECore.executeTemplate(TECore.java:574)
at com.occamlab.te.TECore.executeXSLFunction(TECore.java:1040)
at com.occamlab.te.TECore.callFunction(TECore.java:1072)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
... 28 more
Caused by: net.sf.saxon.trans.XPathException: Error in call to extension function {public javax.xml.transform.Source org.opengis.cite.iso19142.TestNGController.doTestRun(org.w3c.dom.Document) throws java.lang.Exception}: Exception in extension function java.lang.IllegalArgumentException: Missing reference to GML document or application schema.
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:151)
at net.sf.saxon.instruct.CopyOf.processLeavingTail(CopyOf.java:292)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Instruction.process(Instruction.java:94)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:380)
at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:300)
at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:409)
at net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:175)
at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:343)
at net.sf.saxon.Controller.transformDocument(Controller.java:1736)
at net.sf.saxon.Controller.transform(Controller.java:1560)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:190)
... 37 more
Caused by: java.lang.IllegalArgumentException: Missing reference to GML document or application schema.
at org.opengis.cite.iso19136.SuiteFixtureListener.processSchemaReferences(SuiteFixtureListener.java:120)
at org.opengis.cite.iso19136.SuiteFixtureListener.onStart(SuiteFixtureListener.java:47)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:208)
at org.testng.SuiteRunner.run(SuiteRunner.java:266)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at com.occamlab.te.spi.executors.testng.TestNGExecutor.execute(TestNGExecutor.java:123)
at org.opengis.cite.iso19142.TestNGController.doTestRun(TestNGController.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.sf.saxon.functions.ExtensionFunctionCall.invokeMethod(ExtensionFunctionCall.java:533)
at net.sf.saxon.functions.ExtensionFunctionCall.call(ExtensionFunctionCall.java:256)
at net.sf.saxon.functions.ExtensionFunctionCall.iterate(ExtensionFunctionCall.java:147)
... 48 more
The test capabilitiesDescribesLockingWFS() passes.
Then the test *_lockAllFeaturesByType() *_is skipped with the reason:
** Nodata available for feature type {http://www.interactive-
instruments.de/namespaces/cite/wfst}City**.
But there is definitely data
available for this FT (Basic and Simple pass, Transactional partly).
All other tests fail without a reasonable message:
lockAllQueryResults_30Seconds() 13:09:34 0 ms
java.lang.NullPointerException:
lockQueryResults_hits() 13:09:34 0 ms
java.lang.NullPointerException:
lockSomeQueryResults() 13:09:34 1 ms
java.lang.NullPointerException:
lockFeatureAlreadyLocked() 13:09:34 0 ms
java.util.NoSuchElementException:
lockFeatureAndAttemptDelete() 13:09:34 0 ms
java.util.NoSuchElementException:
resetNonexistentLock() 13:09:34 0 ms
java.util.NoSuchElementException:
Maybe a inherited error from the skipped **lockAllFeaturesByType() tests?
[Originally reported in the OGC CITE issue tracker: issue #948](https://porta
l.opengeospatial.org/services/srv_public_issues.php?call=viewIssue&issue_id=948)
Opened: 2014-04-24 09:20:11 Last Updated: 2014-06-09 15:52:56
I seem to be having a problem with some of the tests in IntersectsTests.java
and how they interpret the axis order in the GML returned by the server. The response returns the coordinate data of GML geometries in the following form:
...
<gml:posList>latitude-value longitude-value ...</gml:posList>
...
The data is represented in EPSG:4326. As far as I understand, this should be interpreted as latitude-longitude, rather than the other way around. However, I can't find anything in the geometry parsing code that would take the coordinate system axis order into account.
The test cases failing for me are IntersectsTests.intersectsCurve()
and IntersectsTests.intersectsPolygon()
.
Could someone please confirm if this is indeed a problem with the test code, or a misconception on my part?
If the locale of the server running the teamengine is DE some tests failes due to invalid GML geometries:
Here an example request from the test intersectsPolygon:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" service="WFS" startIndex="0" version="2.0.0">
<wfs:Query xmlns:ns53="http://www.deegree.org/app" typeNames="ns53:osm_protected_area">
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
<fes:Intersects>
<fes:ValueReference xmlns:tns="http://www.deegree.org/app">tns:geometry</fes:ValueReference>
<gml:Polygon xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="d1e1" srsName="urn:ogc:def:crs:EPSG::4326">
<gml:exterior>
<gml:LinearRing>
<gml:posList>63,39 -24,04 63,39 -13,62 66,46 -13,62 66,46 -24,04 63,39 -24,04</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</fes:Intersects>
</fes:Filter>
</wfs:Query>
</wfs:GetFeature>
The gml:posLists contains a list of coordinates with commas instead of of points.
The following tests are concerned:
All of them creates the geometry node by Extents.envelopeAsGML():
Document gmlEnv = Extents.envelopeAsGML(featureInfo.get(featureType)
.getGeoExtent());
This is part of geomatics-geotk [1].
As workaround the server locale can be set to EN, but it is preferred to fix this.
The InsertResults/UpdateResults/ReplaceResults elements are optional in the
spec:
15.3.2 TransactionResponse element
The root element of the response to a transaction request is called
wfs:TransactionResponse.
The following XML Schema fragment declares the wfs:TransactionResponse
element:
<xsd:element name=""TransactionResponse""
type=""wfs:TransactionResponseType""/>
<xsd:complexType name=""TransactionResponseType"">
<xsd:sequence>
<xsd:element name=""TransactionSummary""
type=""wfs:TransactionSummaryType""/>
<xsd:element name=""InsertResults""
type=""wfs:ActionResultsType"" minOccurs=""0""/>
<xsd:element name=""UpdateResults""
type=""wfs:ActionResultsType"" minOccurs=""0""/>
<xsd:element name=""ReplaceResults""
type=""wfs:ActionResultsType"" minOccurs=""0""/>
</xsd:sequence>
<xsd:attribute name=""version"" type=""xsd:string"" use=""required"fixed=""2.0.0""/>
</xsd:complexType>
15.3.4 InsertResults element
""If a transaction request contains insert, update and/or replace actions then
the wfs:InsertResults,
wfs:UpdateResults and/or wfs:ReplaceResults elements shall be specified in the
transaction response."
The tests fail if these elements are not present:
java.lang.AssertionError: Unexpected result evaluating XPath expression with
context node #document: //wfs:TransactionResponse/wfs:UpdateResults expected
[true] but found [false]
java.lang.AssertionError: Unexpected result evaluating XPath expression with
context node #document: //wfs:TransactionResponse/wfs:ReplaceResults expected
[true] but found [false]
Tests with this asertion (maybe more?):
updateGMLName
replaceFeature
Originally reported in the OGC CITE issue tracker: issue #944
Opened: 2014-03-31 08:17:42 Last Updated: 2014-04-14 16:26:09
There are no tests for AutomaticDataLocking
. See cl. 15.2.3.1.1 (Declaring support for locking).
Servers that support automatic data locking, shall not require a client to lock features before operating upon them using a Transaction operation.
The relevant conformance class is Temporal joins: "The server shall implement join predicates using temporal operators." See A.1.13.
All tests are skipped if the service constraint ImplementsTemporalJoins
is "FALSE" in the capabilities document.
Since the fix in #34 also decimal types are handled and properties with this type are updated. This leads in our case to another problem. The test fails with the following reason:
Unexpected result evaluating XPath expression with context node app:osm_protected_area: tns:way_area[1] = "515609.00"
The feature contains "515609.0" after the update (and before reset):
<wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.deegree.org/app http://ogctestbed12.lat-lon:8080/deegree/services/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&OUTPUTFORMAT=application%2Fgml%2Bxml%3B+version%3D3.2&TYPENAME=app:osm_protected_area&NAMESPACES=xmlns(app,http%3A%2F%2Fwww.deegree.org%2Fapp)" timeStamp="2016-07-14T08:34:48Z" numberMatched="1" numberReturned="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2">
<wfs:boundedBy>
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
<gml:lowerCorner>63.850518 -22.008669</gml:lowerCorner>
<gml:upperCorner>63.861933 -21.977922</gml:upperCorner>
</gml:Envelope>
</wfs:boundedBy>
<wfs:member>
<app:osm_protected_area gml:id="osm_protected_area_23" xmlns:app="http://www.deegree.org/app">
<app:osm_id>411196906</app:osm_id>
<app:boundary>protected_area</app:boundary>
<app:leisure>nature_reserve</app:leisure>
<app:name>Eldborg</app:name>
<app:osm_timestamp>2016-04-18T02:55:32</app:osm_timestamp>
<app:way_area>515609.0</app:way_area>
<app:geometry>
<!--Inlined geometry 'osm_protected_area_23_APP_GEOMETRY'-->
<gml:Polygon gml:id="osm_protected_area_23_APP_GEOMETRY" srsName="urn:ogc:def:crs:EPSG::4326">
...
</gml:Polygon>
</app:geometry>
</app:osm_protected_area>
</wfs:member>
</wfs:FeatureCollection>
It seems, that a the differences in the notation of the decimal (with/without second 0) causes the assertion failure.
The Tests:
describeAllFeatureTypes(GET)
and
describeAllFeatureTypes(POST)
throw this exception:
*java.lang.IllegalArgumentException: Error parsing media type 'text/xml; subtype=gml/3.2.1;' *
for "media type" I tried as well:
text/xml; subtype=gml/3.2.1
and
text/xml; subtype=gml/3.2.1; charset=utf-8;
but the same exceptions occur.
By the way we would like to respond with "text/xml; subtype=gml/3.2.1; charset=utf-8;" (append charset=utf-8) as a specialization of the "media type" is allowed even if the expected result should be "text/xml; subtype=gml/3.2.1;" is this possible? (Would be a nice feature as it helps the client).
In the function static QName selectRandomFeatureType(Map<QName,
FeatureTypeInfo> featureInfo) in LockFeatureTests.java line: 247 in trunk
there is a loop:
while (!typeInfo.isInstantiated()) {
typeInfo = values[randomIndex.nextInt(values.length)];
}
With some WFS configurations this loop will never end, and the tests hang
forever.
As a workaround I commented out the loop and everything was fine.
Originally reported in the OGC CITE issue tracker: issue #925
Opened: 2014-01-28 08:01:12 Last Updated: 2014-04-11 18:54:20
The GetFeatureWithLock#lockSomeQueryResults()
test requires that the WFS under test has data for at least two feature types. It fails if this is not the case, or if the same feature type is (randomly) selected. The test should be revised to operate on only one feature type.
Deegree server [1] is failing the test. Other reference implementations [2] are passing.
[1] http://cite.deegree.org/deegree-webservices-3.3.14/services/wfs200?
[2] https://github.com/opengeospatial/cite/wiki/Reference-Implementations
The Test lockSomeFeatures sends a request with two Filter:
<wfs:GetFeatureWithLock xmlns:wfs="http://www.opengis.net/wfs/2.0" count="10" expiry="60" lockAction="SOME"
resultType="results" service="WFS" startIndex="0" version="2.0.0">
<wfs:Query xmlns:ns84="http://www.deegree.org/app" typeNames="ns84:gns_iceland">
<Filter xmlns="http://www.opengis.net/fes/2.0">
<ResourceId rid="gns_iceland_-2643274" />
</Filter>
<Filter xmlns="http://www.opengis.net/fes/2.0">
<ResourceId rid="gns_iceland_-2643274" />
<ResourceId rid="gns_iceland_-2647445" />
<ResourceId rid="gns_iceland_-2649558" />
<ResourceId rid="gns_iceland_-2647523" />
<ResourceId rid="gns_iceland_-2642297" />
<ResourceId rid="gns_iceland_-2641862" />
<ResourceId rid="gns_iceland_-2651772" />
<ResourceId rid="gns_iceland_-2651068" />
<ResourceId rid="gns_iceland_-2649172" />
<ResourceId rid="gns_iceland_-2654429" />
</Filter>
</wfs:Query>
</wfs:GetFeatureWithLock>
In org.opengis.cite.iso19142.locking.GetFeatureWithLockTests.lockSomeFeatures() first Q1 is requested by adding a Filter using org.opengis.cite.iso19142.util.WFSRequest.addResourceIdPredicate(), this is repeated in the second part of the test requesting Q2.
org.opengis.cite.iso19142.util.WFSRequest.addResourceIdPredicate() does not check if a filter already exists but adds one at the end inside the Query-Element.
Expected is that the Request contains only one Filter.
The tests "getFullCapabilities" and "capabilitiesDocCorrespondsToWfsSimple" fails with the following exception:
<?xml version="1.0" encoding="UTF-8"?>
<svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" title="Constraints on WFS 2.0 service descriptions." schemaVersion="2.0" phase="SimpleWFSPhase">
<svrl:text>This Schematron (ISO 19757-3) schema specifies constraints regarding the content of WFS 2.0 service capabilities descriptions.</svrl:text>
<svrl:ns-prefix-in-attribute-values uri="http://www.opengis.net/ows/1.1" prefix="ows" />
<svrl:ns-prefix-in-attribute-values uri="http://www.opengis.net/wfs/2.0" prefix="wfs" />
<svrl:ns-prefix-in-attribute-values uri="http://www.opengis.net/fes/2.0" prefix="fes" />
<svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/1999/xlink" prefix="xlink" />
<svrl:active-pattern document="" id="EssentialCapabilitiesPattern" name="EssentialCapabilitiesPattern" />
<svrl:fired-rule context="/" />
<svrl:active-pattern document="" id="TopLevelElementsPattern" name="TopLevelElementsPattern">
<svrl:text>Rules regarding the inclusion of common service metadata elements.</svrl:text>
</svrl:active-pattern>
<svrl:fired-rule context="/*[1]" />
<svrl:active-pattern document="" id="ConformanceStatementPattern" name="ConformanceStatementPattern">
<svrl:text>Implementation conformance statement. See ISO 19142:2010
cl. 8.3.5.3
Table 13.</svrl:text>
</svrl:active-pattern>
<svrl:fired-rule context="//ows:OperationsMetadata" />
<svrl:active-pattern document="" id="SimpleWFSPattern" name="SimpleWFSPattern">
<svrl:text>Simple WFS conformance class. See ISO 19142:2010
cl. 2
A.1.1.</svrl:text>
</svrl:active-pattern>
<svrl:fired-rule context="//ows:OperationsMetadata" />
<svrl:fired-rule context="ows:Operation[@name='GetFeature']" />
<svrl:failed-assert test="exists(index-of(ows:Parameter[@name='resolve']//ows:Value 'local'))" location="/*:WFS_Capabilities[namespace-uri()='http://www.opengis.net/wfs/2.0'][1]/*:OperationsMetadata[namespace-uri()='http://www.opengis.net/ows/1.1'][1]/*:Operation[namespace-uri()='http://www.opengis.net/ows/1.1'][5]">
<svrl:text>GetFeature: the 'resolve' parameter must contain 'local' as an allowed value.</svrl:text>
</svrl:failed-assert>
<svrl:fired-rule context="//fes:Filter_Capabilities/fes:Conformance" />
<svrl:active-pattern document="" id="ServiceIdentificationPattern" name="ServiceIdentificationPattern" />
<svrl:fired-rule context="//ows:ServiceIdentification" />
</svrl:schematron-output>
The resolve parameter is configured globally not for the GetFeature operation, it seems that the validation does not check this option.
WFS: http://ogctestbed12.lat-lon.de/deegree/services/wfs?service=WFS&request=GetCapabilities
Hi,
we are experiencing some issues with org.opengis.cite.iso19142.transaction.Update.updateGMLName(ProtocolBinding, QName). The problem is that the test suite makes first an update of the gml:name property, setting it to “Ce n'est pas Vieux-Port de Montréal!”. This is then followed by a query of the same feature where the gml:name value is checked with an XPath expression. In #8 the issue was that the test suite reported a TransformerException caused by the fact that the XPath expression contained an apostrophe in “Ce n'est pas Vieux-Port de Montréal!”. So to solve this the apostrophe in “n'est” was replaced with “n'est”
. Following this update though the test does not run for us because the gml:name value stored in the DB replaces the apostrophe entity reference for the actual literal. So when the test suite fetches the feature by means of gml:id and starts comparing the different properties it considers the two semantically equivalent values for gml:name, with and without the apostrophe escaped, not to be identical. In other words, our WFS reports gml:name=“Ce n'est pas Vieux-Port de Montréal!”
and the XPath expression is looking for “Ce n'est pas Vieux-Port de Montréal!”
, which are considered different.
What would be the best way to solve this?
Here is also part of the log concerning this test:
<test-method status="FAIL" signature="updateGMLName(org.opengis.cite.iso19142.ProtocolBinding, javax.xml.namespace.QName)[pri:0, instance:org.opengis.cite.iso19142.transaction.Update@7d2061c3]" name="updateGMLName" duration-ms="7096" started-at="2014-09-16T01:37:24Z" description="urn:iso:std:iso:19142:clause:15.3.3,15.3.5" data-provider="binding+availFeatureType" finished-at="2014-09-16T01:37:31Z">
<params>
<param index="0">
<value><![CDATA[POST]]></value>
</param>
<param index="1">
<value><![CDATA[{urn:x-inspire:specification:gmlas:ProtectedSites:3.0}ProtectedSite]]></value>
</param>
</params>
<exception class="java.lang.AssertionError">
<message><![CDATA[Unexpected result evaluating XPath expression with context node ps:ProtectedSite: gml:name[1] = 'Ce n'est pas Vieux-Port de Montréal!' expected [true] but found [false]]]></message>
</exception>
<!-- java.lang.AssertionError -->
<reporter-output/>
<attributes>
<attribute name="response"><![CDATA[<wfs:TransactionResponse xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:fes="http://www.opengis.net/fes/2.0"
xmlns:ows="http://www.opengis.net/ows/1.1"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="2.0.0">
<wfs:TransactionSummary>
<wfs:totalUpdated>1</wfs:totalUpdated>
</wfs:TransactionSummary>
</wfs:TransactionResponse>]]></attribute>
<!-- response -->
<attribute name="request"><![CDATA[<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:gml="http://www.opengis.net/gml/3.2"
service="WFS"
version="2.0.0">
<wfs:Update xmlns:ns16="urn:x-inspire:specification:gmlas:ProtectedSites:3.0"
typeName="ns16:ProtectedSite">
<wfs:Property>
<wfs:ValueReference>gml:name[1]</wfs:ValueReference>
<wfs:Value>Ce n&apos;est pas Vieux-Port de Montréal!</wfs:Value>
</wfs:Property>
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0">
<fes:ResourceId rid="PS_PROTECTEDSITE_f02e22fc-f799-4ac1-90d2-eb06a6d220d1"/>
</fes:Filter>
</wfs:Update>
</wfs:Transaction>]]></attribute>
<!-- request -->
</attributes>
</test-method>
<!-- updateGMLName -->
Regards,
Tsvetan
Is there a way to enable HTML reports for a test run? All that seems to be generated at the moment is testng-results.xml
. Looking at TestNGController.java
, I can see the default listeners are disabled.
When running this WFS the results seem ok but the color of one conformance class in the left pane is not ok. It appears green, when it has skipped all the tests.
Message d1e210_1:
Test suite: wfs20-1.21.1
======== Test groups ========
Preconditions
Passed: 2 | Failed: 1 | Skipped: 0
All GML application schemas
Passed: 0 | Failed: 1 | Skipped: 6
GML application schemas defining features and feature collections
Passed: 0 | Failed: 0 | Skipped: 2
Simple WFS
Passed: 0 | Failed: 0 | Skipped: 22
Basic WFS
Passed: 0 | Failed: 0 | Skipped: 30
Transactional WFS
Passed: 0 | Failed: 0 | Skipped: 8
Locking WFS
Passed: 0 | Failed: 0 | Skipped: 8
There seems to be a problem with the verdict colors.
Allow testing a server with 2.0.0 and 2.0.2.
ResourceIdFilterTests.inconsistentFeatureIdentifierAndType(...)
This test does not seem valid to me in case of POST (XML) Requests.
Reasons:
We recommend to skip this test for POST or instead expect an empty FeatureCollection in this case.
We are wondering if the execution oder of the locking tests has side effects on the test results. Here, an example assuming a WFS providing one FeatureType:
First, the test lockAllFeaturesByType is executed:
All features are locked until now for 5 Minutes (the default value for expiry; as it is not set in [1]).
Then the test lockSomeFeatures is executed:
Expected is a GetFeatureWithLock-Response with at least two features (in the second part of the test; checking Q2).
But the feature collection is empty cause of the previously executed lock.
What do you think about this?
The relevant conformance class is Standard joins: "The server shall implement join predicates using all Filter operators except the spatial and temporal operators." See A.1.11.
All tests are skipped if the service constraint ImplementsStandardJoins
is "FALSE" in the capabilities document.
The following tests fails if a date property is used for testing:
Failure:
XPath expression cannot be evaluated:
xs:date(ns1:nm_modify_date) ge xs:date('1993-08-31T22:00:00.000Z')
Invalid date "1993-08-31T22:00:00.000Z" (Day must be two digits).
The XPath expression created for the assert is invalid cause of the timestamp appended to the date. The property value used in the assert (as well as in the filter of the request) should be a simple date without timestamp.
Service: http://ogctestbed12.lat-lon.de/deegree/services/wfs?service=WFS&request=GetCapabilities
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.