From e0a16fb4fe89808c2958bf3c232f00d799f9a062 Mon Sep 17 00:00:00 2001 From: Keshav Nangare Date: Wed, 27 Jan 2021 19:59:17 +0530 Subject: [PATCH 1/2] Updated test with latest standard version and error message. --- .../cite/ogcapifeatures10/collections/FeaturesTime.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java index 809525f9..c8c03632 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java @@ -91,11 +91,11 @@ public Iterator collectionItemUrisWithDateTimes( ITestContext testCont * @param testPoint * the testPoint under test, never null */ - @Test(description = "A.2.7. Features {root}/collections/{collectionId}/items - Datetime, Abstract Test 14: (Requirement /req/core/fc-time-definition)", dataProvider = "collectionPaths", dependsOnGroups = "featuresBase", alwaysRun = true) + @Test(description = "A.2.7. Features {root}/collections/{collectionId}/items - Datetime, Abstract Test 18: (Requirement /req/core/fc-time-definition)", dataProvider = "collectionPaths", dependsOnGroups = "featuresBase", alwaysRun = true) public void timeParameterDefinition( TestPoint testPoint ) { Parameter time = retrieveParameterByName( testPoint.getPath(), getApiModel(), "datetime" ); - assertNotNull( time, "Required time parameter for collections with path '" + testPoint.getPath() + assertNotNull( time, "Required datetime parameter for collections with path '" + testPoint.getPath() + "' in OpenAPI document is missing" ); String msg = "Expected property '%s' with value '%s' but was '%s'"; From 9ffa334eaf21bd3641970d6ac000247e3ece6aeb Mon Sep 17 00:00:00 2001 From: Keshav Nangare Date: Mon, 8 Feb 2021 11:14:17 +0530 Subject: [PATCH 2/2] Updated tests description according to latest standard document. --- .../collections/FeatureCollections.java | 11 ++++------- .../cite/ogcapifeatures10/collections/Features.java | 2 +- .../ogcapifeatures10/collections/FeaturesBBox.java | 2 +- .../ogcapifeatures10/collections/FeaturesLimit.java | 2 +- .../ogcapifeatures10/collections/FeaturesTime.java | 2 +- .../ogcapifeatures10/conformance/Conformance.java | 2 +- .../cite/ogcapifeatures10/general/GeneralHttp.java | 2 +- .../ogcapifeatures10/landingpage/LandingPage.java | 5 +++-- 8 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeatureCollections.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeatureCollections.java index 9c908563..61aec5c6 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeatureCollections.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeatureCollections.java @@ -98,15 +98,12 @@ public void validateFeatureCollectionsMetadataOperation( TestPoint testPoint ) { * * Test Method * 1. Validate that all response documents comply with /ats/core/fc-md-links - * 2. Validate that all response documents comply with /ats/core/fc-md-items - * 3. In case the response includes a "crs" property, validate that the first value is either "http://www.opengis.net/def/crs/OGC/1.3/CRS84" or "http://www.opengis.net/def/crs/OGC/0/CRS84h" - * 4. Validate the collections content for all supported media types using the resources and tests identified in Schema and Tests for Collections content * * * @param testPoint * the test point to test, never null */ - @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 1 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) + @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 1 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) public void validateFeatureCollectionsMetadataOperationResponse_Links( TestPoint testPoint ) { Response response = testPointAndResponses.get( testPoint ); if ( response == null ) @@ -157,7 +154,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_Links( TestPoint * @param testPoint * the test point to test, never null */ - @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 2 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) + @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 2 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) public void validateFeatureCollectionsMetadataOperationResponse_Items( TestPoint testPoint ) { Response response = testPointAndResponses.get( testPoint ); if ( response == null ) @@ -185,7 +182,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_Items( TestPoint * @param testPoint * the test point to test, never null */ - @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 3 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) + @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 3 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) public void validateFeatureCollectionsMetadataOperationResponse_CrsProperty( TestPoint testPoint ) { Response response = testPointAndResponses.get( testPoint ); if ( response == null ) @@ -209,7 +206,7 @@ public void validateFeatureCollectionsMetadataOperationResponse_CrsProperty( Tes * @param testPoint * the test point to test, never null */ - @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 4 (Requirement /req/core/fc-md-success)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) + @Test(description = "A.2.5. Feature Collections {root}/collections, Abstract Test 10, Test Method 4 (Requirement /req/core/fc-md-success, /req/core/crs84)", groups = "collections", dataProvider = "collectionsUris", dependsOnMethods = "validateFeatureCollectionsMetadataOperation", alwaysRun = true) public void validateFeatureCollectionsMetadataOperationResponse_Content( TestPoint testPoint ) { Response response = testPointAndResponses.get( testPoint ); if ( response == null ) diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/Features.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/Features.java index 51dd0625..148af309 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/Features.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/Features.java @@ -233,7 +233,7 @@ public void validateFeaturesResponse_NumberMatched( Map collecti * @param collection * the collection under test, never null */ - @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUris", dependsOnMethods = "validateFeaturesOperation", alwaysRun = true) + @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUris", dependsOnMethods = "validateFeaturesOperation", alwaysRun = true) public void validateFeaturesResponse_NumberReturned( Map collection ) { String collectionId = (String) collection.get( "id" ); validateNumberReturned( asKey( collectionId ) ); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesBBox.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesBBox.java index b886395d..82b22460 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesBBox.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesBBox.java @@ -358,7 +358,7 @@ public void validateFeaturesWithBoundingBoxResponse_NumberMatched( Mapnull */ - @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - BoundingBox, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateFeaturesWithBoundingBoxOperation", alwaysRun = true) + @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - BoundingBox, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithBboxes", dependsOnMethods = "validateFeaturesWithBoundingBoxOperation", alwaysRun = true) public void validateFeaturesResponse_NumberReturned( Map collection, BBox bbox ) { String collectionId = (String) collection.get( "id" ); validateNumberReturned( asKey( collectionId, bbox ) ); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesLimit.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesLimit.java index 934e265f..f08b25cc 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesLimit.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesLimit.java @@ -368,7 +368,7 @@ public void validateFeaturesWithLimitResponse_NumberMatched( Map * @param max * max limit defined by the service, never null */ - @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Limit, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithLimits", dependsOnMethods = "validateFeaturesWithLimitOperation", alwaysRun = true) + @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items, Limit, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithLimits", dependsOnMethods = "validateFeaturesWithLimitOperation", alwaysRun = true) public void validateFeaturesResponse_NumberReturned( Map collection, int limit, int max ) { String collectionId = (String) collection.get( "id" ); validateNumberReturned( asKey( collectionId, limit ) ); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java index c8c03632..cab94305 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/collections/FeaturesTime.java @@ -406,7 +406,7 @@ public void validateFeaturesWithDateTimeResponse_NumberMatched( Mapnull if the * request is an instant */ - @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - DateTime, Abstract Test 22, Test Method 5 (Requirement /req/core/fc-response) - Abstract Test 24 (Requirement /req/core/fc-timeStamp)", dataProvider = "collectionItemUrisWithDateTimes", dependsOnMethods = "validateFeaturesWithDateTimeOperation", alwaysRun = true) + @Test(description = "Implements A.2.7. Features {root}/collections/{collectionId}/items - DateTime, Abstract Test 22, Test Method 7 (Requirement /req/core/fc-response) - Abstract Test 26 (Requirement /req/core/fc-numberReturned)", dataProvider = "collectionItemUrisWithDateTimes", dependsOnMethods = "validateFeaturesWithDateTimeOperation", alwaysRun = true) public void validateFeaturesResponse_NumberReturned( Map collection, String queryParameter, Object begin, Object end ) { String collectionId = (String) collection.get( "id" ); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/conformance/Conformance.java b/src/main/java/org/opengis/cite/ogcapifeatures10/conformance/Conformance.java index d8b6a1a2..a5bafeb0 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/conformance/Conformance.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/conformance/Conformance.java @@ -87,7 +87,7 @@ public void storeRequirementClassesInTestContext( ITestContext testContext ) { * @param testPoint * the test point to test, never null */ - @Test(description = "Implements A.2.4. Conformance Path {root}/conformance, Abstract Test 7 + 8 (Requirements /req/core/conformance-op) and /req/core/conformance-op", groups = "conformance", dataProvider = "conformanceUris", dependsOnGroups = "apidefinition") + @Test(description = "Implements A.2.4. Conformance Path {root}/conformance, Abstract Test 7 + 8 (Requirements /req/core/conformance-op) and /req/core/conformance-success", groups = "conformance", dataProvider = "conformanceUris", dependsOnGroups = "apidefinition") public void validateConformanceOperationAndResponse( TestPoint testPoint ) { String testPointUri = new UriBuilder( testPoint ).buildUrl(); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/general/GeneralHttp.java b/src/main/java/org/opengis/cite/ogcapifeatures10/general/GeneralHttp.java index 18de1a73..428e226b 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/general/GeneralHttp.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/general/GeneralHttp.java @@ -30,7 +30,7 @@ public class GeneralHttp extends CommonFixture { * their HTTP 1.1 protocol. (untested) * */ - @Test(description = "Implements A.2.1.1. HTTP (Requirement /req/core/http)") + @Test(description = "Implements A.2.1.1. HTTP, Abstract Test 1 (Requirement /req/core/http)") public void http() { Response response = init().baseUri( rootUri.toString() ).when().request( GET, "/" ); response.then().statusLine( containsString( "HTTP/1.1" ) ); diff --git a/src/main/java/org/opengis/cite/ogcapifeatures10/landingpage/LandingPage.java b/src/main/java/org/opengis/cite/ogcapifeatures10/landingpage/LandingPage.java index a70f20c7..da15f058 100644 --- a/src/main/java/org/opengis/cite/ogcapifeatures10/landingpage/LandingPage.java +++ b/src/main/java/org/opengis/cite/ogcapifeatures10/landingpage/LandingPage.java @@ -45,8 +45,9 @@ public void landingPageRetrieval() { /** *
-     * Abstract Test 4: /ats/core/root-success Test Purpose: Validate that the landing page complies with the require
-     * structure and contents. Requirement: /req/core/root-success
+     * Abstract Test 4: /ats/core/root-success
+     * Test Purpose: Validate that the landing page complies with the require structure and contents.
+     * Requirement: /req/core/root-success
      *
      * Test Method: Validate the landing page for all supported media types using the resources and tests identified in
      * Schema and Tests for Landing Pages. For formats that require manual inspection, perform the following: a)