opengeospatial / ets-wfs11

Executable Test Suite for WFS 1.1
Other
1 stars 5 forks source link

wfs:wfs-1.1.0-Transaction-tc13.1 #12

Closed mbarto closed 9 years ago

mbarto commented 10 years ago

This test is failing when trying the final GetFeatureByName for the 3 deleted features. The issue is that to create GetFeatureByName request, some data in the insert transaction request is searched which cannot be there:

<xsl:for-each select="$response//wfs:InsertResults/wfs:Feature/ogc:FeatureId">
    <ctl:call-test name="wfs:GetFeatureByName">
        <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
        <ctl:with-param name="type" select="$response//gml:featureMembers/gml:featureMember[1]/*"/>
        <ctl:with-param name="name.value" select="./gml:name" />
        <ctl:with-param name="empty.response" select="'true'" />
    </ctl:call-test>
    <ctl:call-test name="wfs:GetFeatureByName">
        <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
        <ctl:with-param name="type" select="$response//gml:featureMembers/gml:featureMember[2]/*"/>
        <ctl:with-param name="name.value" select="./gml:name" />
        <ctl:with-param name="empty.response" select="'true'" />
    </ctl:call-test>
    <ctl:call-test name="wfs:GetFeatureByName">
        <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
        <ctl:with-param name="type" select="$response//gml:featureMembers/gml:featureMember[3]/*"/>
        <ctl:with-param name="name.value" select="./gml:name" />
        <ctl:with-param name="empty.response" select="'true'" />
    </ctl:call-test>
</xsl:for-each>

There are no such xpath as $response//gml:featureMembers/gml:featureMember[3]/* or ./gml:name in the transaction response that is something like this:

<wfs:TransactionResponse xmlns:gml="http://www.opengis.net/gml"
                         xmlns:it.geosolutions="http://www.geo-solutions.it"
                         xmlns:ogc="http://www.opengis.net/ogc"
                         xmlns:ows="http://www.opengis.net/ows"
                         xmlns:sf="http://cite.opengeospatial.org/gmlsf"
                         xmlns:wfs="http://www.opengis.net/wfs"
                         xmlns:xlink="http://www.w3.org/1999/xlink"
                         xmlns:xs="http://www.w3.org/2001/XMLSchema"
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                         version="1.1.0"
                         xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd">
   <wfs:TransactionSummary>
      <wfs:totalInserted>3</wfs:totalInserted>
      <wfs:totalUpdated>0</wfs:totalUpdated>
      <wfs:totalDeleted>0</wfs:totalDeleted>
   </wfs:TransactionSummary>
   <wfs:TransactionResults/>
   <wfs:InsertResults>
      <wfs:Feature handle="ins-1">
         <ogc:FeatureId fid="PrimitiveGeoFeature.fid--205a00d8_1486e7f3ca6_-7fc9"/>
      </wfs:Feature>
      <wfs:Feature handle="ins-1">
         <ogc:FeatureId fid="PrimitiveGeoFeature.fid--205a00d8_1486e7f3ca6_-7fc7"/>
      </wfs:Feature>
      <wfs:Feature handle="ins-1">
         <ogc:FeatureId fid="EntitéGénérique.fid--205a00d8_1486e7f3ca6_-7fcb"/>
      </wfs:Feature>
   </wfs:InsertResults>
   <!--Response received in [140] milliseconds--></wfs:TransactionResponse>
rjmartell commented 9 years ago

The intent appears to be to verify that the 3 features were actually deleted. The @gml:id value is also the value of the gml:name property, but the path expressions specifying the type and name.value arguments are incorrect:

<foo:Query typeName="">
  <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
     <ogc:PropertyIsEqualTo>
        <ogc:PropertyName>gml:name</ogc:PropertyName>
        <ogc:Literal/>
     </ogc:PropertyIsEqualTo>
  </ogc:Filter>
</foo:Query>

And there are too many calls to the subsidiary GetFeatureByName test (defined in transaction-tests.ctl). Only three invocations are needed:

for each ogc:FeatureId
    call GetFeatureByName($wfs.GetFeature.post.url, $type, $name.value, 'true')
bierett commented 9 years ago

Regarding to other tests, I have added static data to the test. I see no possibility to get the FeatureType from the Insert Response.

<xsl:for-each select="$response//wfs:InsertResults/wfs:Feature/ogc:FeatureId">
  <ctl:call-test name="wfs:GetFeatureByName">
    <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
    <ctl:with-param name="type">sf:PrimitiveGeoFeature</ctl:with-param>
    <ctl:with-param name="name.value">cite.gmlsf0-f16</ctl:with-param>
    <ctl:with-param name="empty.response" select="'true'" />
  </ctl:call-test>
  <ctl:call-test name="wfs:GetFeatureByName">
    <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
    <ctl:with-param name="type">sf:PrimitiveGeoFeature</ctl:with-param>
    <ctl:with-param name="name.value">cite.gmlsf0-f17</ctl:with-param>
    <ctl:with-param name="empty.response" select="'true'" />
  </ctl:call-test>
  <ctl:call-test name="wfs:GetFeatureByName">
    <ctl:with-param name="wfs.GetFeature.post.url" select="$wfs.GetFeature.post.url"/>
    <ctl:with-param name="type">sf:EntitéGénérique</ctl:with-param>
    <ctl:with-param name="name.value">cite.gmlsf0-f18</ctl:with-param>
    <ctl:with-param name="empty.response" select="'true'" />
  </ctl:call-test>
</xsl:for-each>

I have tested it with the service

But I can not see any changes. Maybe it is an environment error with my local machine. Can anybody test by fix https://github.com/opengeospatial/ets-wfs11/pull/17 ?

bermud commented 9 years ago

@dbretschneider Regarding the environment error, try removing XSLT templates in the TE_BASE/work.

bermud commented 9 years ago

I Tested the #17 , but still 13.1fails:

 Test wfs:wfs-1.1.0-Transaction-tc13.1 (View Details): Failed (InheritedFailure)
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed
   Test wfs:GetFeatureByName (View Details): Failed

Details for the first one:

Test wfs:GetFeatureByName type Mandatory default result Passed (s0036/d53e34518_1/d7611e199_1/d53e31216_1/d53e25935_1/d53e28647_1)

Assertion: Attempt to fetch a feature by name using the GetFeature/POST binding.

Request d53e31373_1:
   Method: POST
   URL: http://ogc.intergraph.com:80/erdas-apollo/vector/WFSTCITE
   Body: 
<foo:GetFeature xmlns:foo="http://www.opengis.net/wfs" xmlns="http://www.w3.org/2001/XMLSchema"
                xmlns:ctl="http://www.occamlab.com/ctl"
                xmlns:gen="java:com.occamlab.te.Generator"
                xmlns:gml="http://www.opengis.net/gml"
                xmlns:myparsers="http://teamengine.sourceforge.net/parsers"
                xmlns:ows="http://www.opengis.net/ows"
                xmlns:p="http://teamengine.sourceforge.net/parsers"
                xmlns:parsers="http://www.occamlab.com/te/parsers"
                xmlns:saxon="http://saxon.sf.net/"
                xmlns:sf="http://cite.opengeospatial.org/gmlsf"
                xmlns:te="http://www.occamlab.com/te"
                xmlns:tec="java:com.occamlab.te.TECore"
                xmlns:tems="java:com.occamlab.te.web.MonitorServlet"
                xmlns:wfs="http://www.opengis.net/wfs"
                xmlns:xi="http://www.w3.org/2001/XInclude"
                xmlns:xlink="http://www.w3.org/1999/xlink"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                service="WFS"
                version="1.1.0">
   <foo:Query typeName="">
      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
         <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>gml:name</ogc:PropertyName>
            <ogc:Literal/>
         </ogc:PropertyIsEqualTo>
      </ogc:Filter>
   </foo:Query>
</foo:GetFeature>
   Response from parser p:XMLValidatingParser.GMLSF1:
      <ExceptionReport xmlns="http://www.opengis.net/ows" version="1.1.0">
  <Exception exceptionCode="NoApplicableCode">
      <ExceptionText>(Error.UnspecifiedType)The type name must be specified. (Check Query, Into elements).</ExceptionText>
  </Exception>
   <!--Response received in [50] milliseconds--></ExceptionReport>

Message d53e31414_1:
   FAILURE: Expected valid wfs:FeatureCollection in response.

Result: Failed
bierett commented 9 years ago

I have updated my branch and the pull request. For deegree 3.3.6 the test is successful. For WFS 1.1.0 GetCapabilities of Intergraph I get a HTTP 500 error.

segoerke commented 9 years ago

fixed by #17