opengeospatial / ets-sos10

Executable Test Suite for OGC Sensor Observation Service 1.0
0 stars 1 forks source link

SOS test hangs when issuing invalid request #2

Closed bermud closed 8 years ago

bermud commented 10 years ago

When testing the following service the SOS service hangs. http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCap abilities

Need to provide better error message.

Originally reported in the OGC CITE issue tracker: issue #660
Opened: 2012-10-10 15:13:38 Last Updated: 2013-12-02 17:18:51

bermud commented 10 years ago
The following is the console output of the test.
Testing suite sos:suite...
   Testing sos:Main (s0091)...
      Assertion: The IUT satisfies all applicable assertions.
      sos.service.url http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCapabilities
      which tests: all
       run ows-main: true
      run sos-general-main: true
      run sos-gc-kvp-rph: true
      run sos-gc-kvp-rsph: true
      run sos-gc-kvp-rrph: true
      run sos-gc-ommo: true
      run sos-gc-omoo: true
      run sos-gc-rcvt: true
      run sos-gc-rcvp: true
      run sos-gc-rcvop: true
      run sos-gc-rcvrf: true
      run sos-gc-rcvrm: true
      run sos-gc-rcvrm2: true
      run sos-ds-rimt: true
      run sos-ds-rip: true
      run sos-ds-rmrf: true
      run sos-ds-rmp true
      run sos-go-risn: true
      run sos-go-rio: true
      run sos-go-riet true
      run sos-go-rip: true
      run sos-go-rifoi: true
      run sos-go-riop: true
      run sos-go-rir true
      run sos-go-rirf: true
      run sos-go-rirm: true
      run sos-go-rirm2: true
      run sos-go-rmsd: true
      run sos-go-rmpd: true
      run sos-go-rmopd: true
      run sos-go-raetd: true
      run sos-go-rmetd: true
      run sos-go-rmfoid: true
      run sos-go-rmrd: true
      run sos-go-rmrfd: true
      run sos-core: true
      SOS service URL: http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCapabilities
      Testing sos:ows-main (s0091/d2405e543_1)...
         Assertion: All assertions for "ows" conformance are satisfied.
         ***************************
         Running OWS Common Tests...
         ***************************
         Testing owsTests:ows-main (s0091/d2405e543_1/d2405e696_1)...
            Assertion: 
      Run test group for GetCapabilities requests using the GET method. Target endpoint is {$serviceURL//ows:OperationsMetadata/ows:Operation[@name='GetCapabilities']/ows:DCP/ows:HTTP/ows:Get/@xlink:href}.

            ServiceURL: http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCapabilities
            **********************************************************************
            Testing owsTests:ows-OWS.GetCapabilities.1 (s0091/d2405e543_1/d2405e696_1/d1268e52_1)...
               Assertion: The GET method request must be supported (using HTTP GET).
               GetCapabilities by GET.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root element matches the provided root element.
               **********************************************************************

               Testing owsTests:ows-OWS.ContentType.1 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e199_1)...
                  Assertion: A response message containing an entity body must contain a Content-Type entity header field that correctly indicates the media type of the message body.
                  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document matches the root element name; (3) the response Content-Type header must be "text/xml" for XML entities.
               Test owsTests:ows-OWS.ContentType.1 Passed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-Exceptions.1 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e222_1)...
                  Assertion: In the event that a GetCapabilities request cannot be processed for any reason, the response entity shall include an exception report. The exception code must be one of those listed in Table 5.
                  GetCapabilities with no service parameter.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an ows:ExceptionReport document; (3) the ExceptionReport shall have the "MissingParameterValue" exception code; (4) theExceptionReport @locator value shall be that of the missing parameter.
                  Version parameter: 1.0.0
Validation error:
  cvc-elt.1: Cannot find the declaration of element 'sos:Capabilities'.
1 validation error detected.

                  FAILURE: Missing or invalid response entity.
               Test owsTests:ows-OWS.GetCapabilities-Exceptions.1 Failed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-Exceptions.2 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e241_1)...
                  Assertion: In the event that a GetCapabilities request cannot be processed for any reason, the response entity shall include an exception report. The exception code must be one of those listed in Table 5.
                  GetCapabilities with a bogus service parameter value (ADSF).  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an ows:ExceptionReport document; (3) the ExceptionReport shall have the 'InvalidParameterValue' exception code; (4) theExceptionReport @locator value shall be that of the invalid parameter.
                  Service parameter: ASDF
                  Version parameter: 1.0.0
Validation error:
  cvc-elt.1: Cannot find the declaration of element 'ServiceExceptionReport'.
1 validation error detected.

                  FAILURE: Missing or invalid response entity.
               Test owsTests:ows-OWS.GetCapabilities-Exceptions.2 Failed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-Exceptions.3 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e259_1)...
                  Assertion: In the event that a GetCapabilities request cannot be processed for any reason, the response entity shall include an exception report. The exception code must be one of those listed in Table 5.
                  Service parameter: SOS
                  Version parameter: 1.0.0
                  AcceptVersions parameter: 2000-01-01
Validation error:
  cvc-elt.1: Cannot find the declaration of element 'sos:Capabilities'.
1 validation error detected.

                  FAILURE: Missing or invalid response entity.
               Test owsTests:ows-OWS.GetCapabilities-Exceptions.3 Failed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-Exceptions.5 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e306_1)...
                  Assertion: In the event that a GetCapabilities request cannot be processed for any reason, the response entity shall include an exception report. The exception code must be one of those listed in Table 5.
                  GetCapabilities with an incorrect KVP query string, triggering the missing parameter value exception.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an ows:ExceptionReport document; (3) the ExceptionReport shall have the "MissingParameterValue" exception code, for both the request and service.
                  Query String: http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCapabilities?request~GetCapabilities!service~!SOS
Validation error:
  cvc-elt.1: Cannot find the declaration of element 'ServiceExceptionReport'.
1 validation error detected.

                  FAILURE: Missing or invalid response entity.
               Test owsTests:ows-OWS.GetCapabilities-Exceptions.5 Failed
               **********************************************************************

               Testing owsTests:ows-OWS.CaseInsensitiveKvpNames.1 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e327_1)...
                  Assertion: Parameter names in KVP strings shall be handled in a case-insensitive manner.
                  GetCapabilities with the KVP parameter names in all uppercase.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root element matches the provided root element.
                  Executing a GetCapabilities request with upper-case parameter names...
                  Executing a GetCapabilities request with mixed-case parameter names...
                  Executing a GetCapabilities request with lower-case parameter names...
               Test owsTests:ows-OWS.CaseInsensitiveKvpNames.1 Passed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-AcceptVersions.1 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e351_1)...
                  Assertion: If AcceptVersion is not specified, the service must respond with highest supported version.
                  GetCapabilities with no version and service of "SOS".  Without AcceptVersion, using version negotiation, sends latest copy.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an wfs:WFS_Capabilities document; (3) the response version must be what was requested
               Test owsTests:ows-OWS.GetCapabilities-AcceptVersions.1 Passed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-AcceptVersions.2 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e372_1)...
                  Assertion: Version negotiation using AcceptVersions parameter (preference ordering): Return service metadata corresponding to the most preferred version that is supported. If none of the requested versions are supported, the server must generate an exception with code 'VersionNegotiationFailed'.
                  GetCapabilities with no version and service of "SOS".  With AcceptVersion, expecting one of the versions listed $acceptVersions.  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an wfs:WFS_Capabilities document; (3) the response version must be what was requested. The AcceptVersion element is used with a number of versions, one is expected to return ('1.1.0').
               Test owsTests:ows-OWS.GetCapabilities-AcceptVersions.2 Passed
               **********************************************************************

               Testing owsTests:ows-OWS.GetCapabilities-AcceptVersions.3 (s0091/d2405e543_1/d2405e696_1/d1268e52_1/d1268e396_1)...
                  Assertion: Version negotiation using AcceptVersions parameter (preference ordering): Return service metadata corresponding to the most preferred version that is supported. If none of the requested versions are supported, the server must generate an exception with code 'VersionNegotiationFailed'.
                  GetCapabilities with no version and service of "SOS".  With AcceptVersion, using a bogus version number (2000-01-01).  Pass if all of the following conditions are true: (1) the response is schema valid; (2) the root document is an ows:ExceptionReport document; (3) the ExceptionReport shall have the "VersionNegotiationFailed" exception code.
Validation error:
  cvc-elt.1: Cannot find the declaration of element 'sos:Capabilities'.
1 validation error detected.

                  FAILURE: Missing or invalid response entity.
               Test owsTests:ows-OWS.GetCapabilities-AcceptVersions.3 Failed
            Test owsTests:ows-OWS.GetCapabilities.1 Failed (Inherited failure)
         Test owsTests:ows-main Failed (Inherited failure)
      Test sos:ows-main Failed (Inherited failure)
      Testing sos:general-main (s0091/d2405e561_1)...
         Assertion: All assertions for "general" conformance are satisfied.

         ****************************
         Running General SOS Tests...
         ****************************
         Testing sos:general-SOS.General-InvalidRequest.1 (s0091/d2405e561_1/d2405e752_1)...
            Assertion: Sending a request that is non-conformant to a schema associated with an SOS operation causes the server to return a valid error report message with an exceptionCode value of MissingParameterValue.
            Issuing an invalid request to:  http://mvcodata.whoi.edu:8080/q2o/adcp?service=SOS&version=1.0&request=GetCapabilities
            The body of the request will be "test"
rockygis commented 10 years ago

"Validation error" is report by CTL( parsers:XMLValidatingParser) . So it cannot change to better error message.

bermud commented 9 years ago

@keshav-nangare, can you please advise about how to provide a better message from the validation errors. This topic is important for reporting properly. Thank you.

bermud commented 8 years ago

I guess the messages are result of XML Validation. And there is not too much we can do about these messages. I will close the issue.