Class BasicSearchTests

java.lang.Object
org.opengis.cite.cat30.CommonFixture
org.opengis.cite.cat30.basic.BasicSearchTests

public class BasicSearchTests extends CommonFixture
Includes GetRecords tests pertaining to the Filter-FES-KVP conformance class. The following basic search capabilities must be implemented:
  • Text search using the 'q' query parameter;
  • Record search using the 'recordIds' query parameter;
  • Spatial search using the 'bbox' query parameter.
See Also:
  • "OGC 12-176r6, Table 1: Conformance classes"
  • "OGC 12-176r6, Table 6: KVP encoding for query constraints"
  • Constructor Details

    • BasicSearchTests

      public BasicSearchTests()
  • Method Details

    • setExtent

      void setExtent(org.opengis.geometry.Envelope extent)
      Parameters:
      extent -
    • setGetEndpoint

      void setGetEndpoint(URI uri)
      Parameters:
      uri -
    • findRequestEndpoints

      @BeforeClass public void findRequestEndpoints(org.testng.ITestContext testContext)
      Finds the GET method endpoint for the GetRecords request in the capabilities document.
      Parameters:
      testContext - The test context containing various suite attributes.
    • getDatasetInfo

      @BeforeClass public void getDatasetInfo(org.testng.ITestContext testContext)
      Gets information about the sample data obtained from the IUT, including: its total geographic extent; a collection of record titles; and a set of record identifiers. Each csw:Record element may contain at least one ows:BoundingBox (or ows:WGS84BoundingBox) element that describes the spatial coverage of a catalogued resource.
      Parameters:
      testContext - The test context containing various suite attributes.
    • getRecordsByBBOXWithUnsupportedCRS

      public void getRecordsByBBOXWithUnsupportedCRS()
      [Test] Submits a GetRecords request with a BBOX parameter that includes an invalid CRS reference ("urn:ogc:def:crs:EPSG::0000"). An exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"".

      Sources

      • OGC 12-176r6, Table 6: KVP encoding for query constraints
      • OGC 06-121r9, 10.2.3: Bounding box KVP encoding
    • getBriefRecordsByBBOX

      public void getBriefRecordsByBBOX()
      [Test] Submits a GetRecords request with a BBOX parameter that includes a supported CRS reference. The brief records in the response must all contain an ows:BoundingBox (or ows:WGS84BoundingBox) element that intersects the specified bounding box.

      Sources

      • OGC 12-176r6, Table 1: Conformance classes [Filter-FES-KVP]
      • OGC 12-176r6, Table 6: KVP encoding for query constraints
      • OGC 06-121r9, 10.2.3: Bounding box KVP encoding
      • OGC 09-026r2 (ISO 19143), A.7: Test cases for minimum spatial filter
    • getSummaryRecordsByWGS84BBOX

      public void getSummaryRecordsByWGS84BBOX()
      [Test] Submits a GetRecords request with a 'bbox' parameter that uses the default CRS ("urn:ogc:def:crs:OGC:1.3:CRS84"). The summary records in the response must all contain an ows:BoundingBox (or ows:WGS84BoundingBox) element that intersects the specified bounding box.

      Sources

      • OGC 12-176r6, Table 1: Conformance classes [Filter-FES-KVP]
      • OGC 12-176r6, Table 6: KVP encoding for query constraints
      • OGC 06-121r9, 10.2.3: Bounding box KVP encoding
      • OGC 09-026r2 (ISO 19143), A.7: Test cases for minimum spatial filter
    • getMultipleRecordsById

      public void getMultipleRecordsById()
      [Test] Submits a GetRecords request with a 'recordIds' parameter that contains a (comma-separated) list of two record identifiers. Two matching records (csw:SummaryRecord) are expected in the response.
    • singleTermTextSearch

      public void singleTermTextSearch()
      [Test] Submits a GetRecords request where the 'q' parameter value is a single URL-encoded term that occurs in at least one catalog record. The result set must not be empty.

      Note: According to Table 4 in OGC OpenSearch Geo and Time Extensions (OGC 10-032r8), the domain of keyword matching should include the record elements indicated below.

      Recommended scope of keyword matching
      csw:Record atom:entry
      • dc:title
      • dc:description (dct:abstract)
      • dc:subject
      • atom:title
      • atom:summary
      • atom:category

      Sources

      • OGC 12-176r6, Table 1: Conformance classes [Filter-FES-KVP]
      • OGC 12-176r6, Table 6: KVP encoding for query constraints
      • OGC 10-032r8, Table 4: Search operation queryable mappings
    • getRecordsBySubjectWithoutResults

      public void getRecordsBySubjectWithoutResults()
      [Test] Submits a GetRecords request where the q parameter contains a subject word and the maxRecords parameter value has the value "0" (zero). The csw:SearchResults element in the response must be empty.
    • textSearchProducesEmptyResultSet

      public void textSearchProducesEmptyResultSet()
      [Test] Submits a GetRecords request where the 'q' parameter value is randomly generated text. The result set is expected to be empty.
    • multipleTermTextSearch

      public void multipleTermTextSearch()
      [Test] This test submits a GetRecords request where the 'q' parameter value contains two terms. The terms are separated by a space character, and the parameter value as a whole is percent-encoded. The result set must not be empty.
    • getRecordsByBBOXAndTitle

      public void getRecordsByBBOXAndTitle()
      [Test] Submits a GetRecords request containing the bbox and q parameters, where the latter matches one or more record titles. The response must include all records that satisfy both search criteria.
      See Also:
      • "OGC Catalogue Services 3.0 Specification - HTTP Protocol Binding, 6.5.5.3: KVP encoding"