Package org.opengis.cite.cat30.basic
Class BasicGetRecordsTests
java.lang.Object
org.opengis.cite.cat30.CommonFixture
org.opengis.cite.cat30.basic.BasicGetRecordsTests
Provides tests that apply to the
GetRecords
request using the KVP syntax.
The KVP syntax must be supported; this encoding is generally used with the GET method but may also be used with the POST method; however a POST method binding is very unusual and will be advertised in the capabilities document as an operational constraint as indicated below. The media type of a KVP request entity is "application/x-www-form-urlencoded".
- See Also:
-
- "OGC 12-176r6, 7.3: GetRecords operation"
-
Field Summary
Fields inherited from class org.opengis.cite.cat30.CommonFixture
atomSchema, client, cswCapabilities, cswSchema, request, response, ROOT_PKG_PATH, SCHEMATRON_ATOM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
[Test] Submits a GetRecords request that contains both theElementName
andElementSetName
parameters.void
findRequestEndpoints
(org.testng.ITestContext testContext) Finds the GET and POST method endpoints for the GetRecords request in the capabilities document.void
[Test] Submits a GetRecords request with no search criteria.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.void
[Test] Submits a GetRecords request where thestartPosition
andmaxRecords
parameters have non-default values.void
[Test] Submits a GetRecords request where thestartPosition
andmaxRecords
parameters have non-default values.void
[Test] Submits a GetRecords request that specifies an unsupported output format (text/example
) as the value of the outputFormat parameter.void
[Test] Submits a GetRecords request that specifies an unknowntypeName
parameter value.void
[Test] Submits a GetRecords request that specifies an unsupported output schema ("urn:uuid:6a29d2a8-9651-47a6-9b14-f05d2b5644f0").void
[Test] Submits a GetRecords request with no search criteria.void
[Test] Submits a GetRecords request with no search criteria.void
[Test] Submits a GetRecords request where the 'elementName' parameter value identifies a single element from the output schema (dc:title).void
[Test] Submits a GetRecords request that specifies an element name not declared in the output schema.(package private) void
setGetEndpoint
(URI uri) void
[Test] Submits a GetRecords request that specifies an unknownelementSetName
parameter value.Methods inherited from class org.opengis.cite.cat30.CommonFixture
buildGetRequest, clearMessages, getResponseEntityAsDocument, initCommonFixture
-
Constructor Details
-
BasicGetRecordsTests
public BasicGetRecordsTests()
-
-
Method Details
-
setGetEndpoint
- Parameters:
uri
-
-
findRequestEndpoints
@BeforeClass public void findRequestEndpoints(org.testng.ITestContext testContext) Finds the GET and POST method endpoints 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.
-
getBriefRecordsWithNamespaceBinding
public void getBriefRecordsWithNamespaceBinding()[Test] Submits a GetRecords request with no search criteria. Thenamespace
parameter declares a namespace binding for the common type name (tns:Record). The results must contain one or more csw:BriefRecord elements.Sources
- OGC 12-176r6, Table 19: KVP encoding for GetRecords operation request
- OGC 12-176r6, 7.3.4.1: NAMESPACE parameter
-
getSummaryRecordsInDefaultRepresentation
public void getSummaryRecordsInDefaultRepresentation()[Test] Submits a GetRecords request with no search criteria. The requested record representation is csw:SummaryRecord; the csw:SearchResults element in the response cannot be empty. -
getSummaryRecordsInAtomFeed
public void getSummaryRecordsInAtomFeed()[Test] Submits a GetRecords request with no search criteria. The Accept header and the outputFormat parameter express a preference for an Atom feed in the response. The resulting atom:feed must be valid according to RFC 4287.Sources
- OGC 12-176r6, 7.3.6: Atom response
- OGC 10-032r8, Table 6: Elements of Search operation response in the atom:feed element describing the search service
- RFC 4287: The Atom Syndication Format
-
getRecordsInUnsupportedOutputFormat
public void getRecordsInUnsupportedOutputFormat()[Test] Submits a GetRecords request that specifies an unsupported output format (text/example
) as the value of the outputFormat parameter. An exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"". -
getRecordsWithUnknownTypeName
public void getRecordsWithUnknownTypeName()[Test] Submits a GetRecords request that specifies an unknowntypeName
parameter value. Since the type does not belong to any supported information model, an exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"".- See Also:
-
- "OGC Catalogue Services 3.0 Specification - HTTP Protocol Binding, 7.3.4.7: typeNames parameter"
-
unknownElementSetName
public void unknownElementSetName()[Test] Submits a GetRecords request that specifies an unknownelementSetName
parameter value. An exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"".- See Also:
-
- "OGC Catalogue Services 3.0 Specification - HTTP Protocol Binding, 7.3.4.8: ElementName or ElementSetName parameter"
-
getRecordsWithUnsupportedSchema
public void getRecordsWithUnsupportedSchema()[Test] Submits a GetRecords request that specifies an unsupported output schema ("urn:uuid:6a29d2a8-9651-47a6-9b14-f05d2b5644f0"). An exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"". -
presentTitleProperty
public void presentTitleProperty()[Test] Submits a GetRecords request where the 'elementName' parameter value identifies a single element from the output schema (dc:title). The response must be augmented with additional elements so as to be schema valid. Furthermore, every record in the result set must contain one or more (required) dc:title elements; no other optional elements must appear. -
presentUnknownRecordProperty
public void presentUnknownRecordProperty()[Test] Submits a GetRecords request that specifies an element name not declared in the output schema. An exception report is expected in response with HTTP status code 400 and exception code ""InvalidParameterValue"". -
elementSetAndElementName
public void elementSetAndElementName()[Test] Submits a GetRecords request that contains both theElementName
andElementSetName
parameters. Since these parameters are mutually exclusive, an exception report is expected in response with HTTP status code 400 and exception code ""NoApplicableCode"". -
getPartialResults
public void getPartialResults()[Test] Submits a GetRecords request where thestartPosition
andmaxRecords
parameters have non-default values. The csw:SearchResults element in the response entity must present the correct "slice" of the result set. -
getPartialResultsAsAtomFeed
public void getPartialResultsAsAtomFeed()[Test] Submits a GetRecords request where thestartPosition
andmaxRecords
parameters have non-default values. The atom:feed element in the response entity must present the correct "slice" of the result set.- See Also:
-
- "OGC Catalogue Services 3.0 Specification - HTTP Protocol Binding, 7.3.6: Atom response"
- "OGC OpenSearch Geo and Time Extensions, Table 6"
-