Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 30 additions & 47 deletions code/Test_definitions/predictive-connectivity-data.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
@predictive_connectivity_data_01_supported_area_success_scenario
Scenario: Validate success response for a supported area request
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing date-time
And the request body property "$.endTime" is set to a valid testing date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
When the request "retrieveConnectivity" is sent
Then the response status code is 200
Expand All @@ -46,13 +45,11 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].geohash" is a valid Geohash inside the request area
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities" is not empty
And all the items in response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]" are equal to "GC", "MC" or "NC"
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerSignalStrengths" is not included in the response

@predictive_connectivity_data_02_partial_area_success_scenario
Scenario: Validate success response for a partial supported area request
Given the request body property "$.area" is set to a valid testing area partially within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
When the request "retrieveConnectivity" is sent
Then the response status code is 200
Expand All @@ -62,16 +59,14 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
And the response property "$.status" value is "PART_OF_AREA_NOT_SUPPORTED"
And the response property "$.timedConnectivityData[*].startTime" is equal to or later than request body property "$.startTime"
And the response property "$.timedConnectivityData[*].endTime" is equal to or earlier than request body property "$.endTime"
And there is at least one item in response property "$.timedConnectivityData[*].cellConnectivityData[*]" with array property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]" containing only "ND" values
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].geohash" is a valid Geohash inside the request area
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities" is not empty
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerSignalStrengths" is not included in the response
And at least one response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]" contains only "ND" values

@predictive_connectivity_data_03_not_supported_area_success_scenario
Scenario: Validate success response for unsupported area request
Given the request body property "$.area" is set to a valid testing area outside supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
When the request "retrieveConnectivity" is sent
Then the response status code is 200
Expand All @@ -85,54 +80,44 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
Scenario: Validate success async response for a request when sink is provided
# Property "$.sink" is set with a valid public accessible HTTPs endpoint
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.sink" is set to a valid HTTPS URL
And the request property "$.sinkCredential.credentialType" is set to "ACCESSTOKEN"
And the request property "$.sinkCredential.accessTokenType" is set to "bearer"
And the request property "$.sinkCredential.accessToken" is set to a valid access token accepted by the events receiver
And the request property "$.sinkCredential.accessTokenExpiresUtc" is set to a value long enough in the future
And the request property "$.sinkCredential" is set to a valid value
When the request "retrieveConnectivity" is sent
Then the response status code is 202
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response includes property "$.operationId"
And the request with the response body will be received at the address of the request property "$.sink"
And the request will have header "Authorization" set to "Bearer: " + the value of the request property "$.sinkCredential.accessToken"
And the request will have property "$.operationId" equal to response property "$.operationId"
And the request body complies with the OAS schema at "/components/schemas/ConnectivityDataAsyncResponse"
And the response body includes property "$.operationId"
And the callback is received at the address of the request property "$.sink"
And the callback has header "Authorization" set to "Bearer" + the value of the request property "$.sinkCredential.accessToken"
And the callback body complies with the OAS schema at "/components/schemas/ConnectivityDataAsyncResponse"
And the callback property "$.operationId" is equal to response property "$.operationId"

@predictive_connectivity_data_05_async_operation_not_completed_scenario
Scenario: Validate async callback when operation fails
# Property "$.sink" is set with a valid public accessible HTTPs endpoint
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.sink" is set to a valid HTTPS URL
And the request property "$.sinkCredential.credentialType" is set to "ACCESSTOKEN"
And the request property "$.sinkCredential.accessTokenType" is set to "bearer"
And the request property "$.sinkCredential.accessToken" is set to a valid access token accepted by the events receiver
And the request property "$.sinkCredential.accessTokenExpiresUtc" is set to a value long enough in the future
And the request property "$.sinkCredential" is set to a valid value
When the request "retrieveConnectivity" is sent
Then the response status code is 202
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response includes property "$.operationId"
And there have been some problem processing the request asynchronously
And the request with the response body will be received at the address of the request property "$.sink"
And the request will have header "Authorization" set to "Bearer: " + the value of the request property "$.sinkCredential.accessToken"
And the request will have property "$.operationId" equal to response property "$.operationId"
And the request body complies with the OAS schema at "/components/schemas/ConnectivityDataAsyncResponse"
And the request body will have property "$.status" equal to "OPERATION_NOT_COMPLETED"
And the callback request body will include property "$.statusInfo"
And the response body includes property "$.operationId"
# But there has been some problem processing the request asynchronously - note that client actions cannot control this
And the callback is received at the address of the request property "$.sink"
And the callback body complies with the OAS schema at "/components/schemas/ConnectivityDataAsyncResponse"
And the callback has header "Authorization" set to "Bearer" + the value of the request property "$.sinkCredential.accessToken"
And the callback body has property "$.operationId" equal to response property "$.operationId"
And the callback body has property "$.status" equal to "OPERATION_NOT_COMPLETED" and includes property "$.statusInfo"

@predictive_connectivity_data_06_custom_precision_success_scenario
Scenario: Validate success response for a request specifying the precision of the geohashes
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.precision" is set to a valid precision for the geohash response cells
When the request "retrieveConnectivity" is sent
Expand All @@ -144,8 +129,7 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
@predictive_connectivity_data_07_concrete_network_type_success_scenario
Scenario: Validate success response for a request specifying the network type for which the connectivity data is to be obtained
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.networkType" is set to a valid networkType
When the request "retrieveConnectivity" is sent
Expand All @@ -157,8 +141,7 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
@predictive_connectivity_data_08_concrete_height_success_scenario
Scenario: Validate success response for a request specifying the height for which the connectivity data is to be obtained
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing future date-time
And the request body property "$.endTime" is set to a valid testing future date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.height" is set to a valid height in metres above ground level
When the request "retrieveConnectivity" is sent
Expand All @@ -173,8 +156,7 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
@predictive_connectivity_data_09_include_signal_strength
Scenario: Validate success response for a request including signal strength
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing date-time
And the request body property "$.endTime" is set to a valid testing date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
And the request body property "$.includeSignalStrength" is set to true
When the request "retrieveConnectivity" is sent
Expand All @@ -187,13 +169,12 @@ Feature: CAMARA Predictive Connectivity Data API, vwip
And the response property "$.timedConnectivityData[*].endTime" is equal to or earlier than request body property "$.endTime"
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].geohash" is a valid Geohash inside the request area
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]" is not empty
And the response property "$.timedConnectivityData[*].cellConnectivityData[*].layerSignalStrengths[*]" has the same length as "$.timedConnectivityData[*].cellConnectivityData[*].layerConnectivities[*]"
And the response properties "layerSignalStrengths[*]" and "layerConnectivities[*]" within "$.timedConnectivityData[*].cellConnectivityData[*]" have the same length

@predictive_connectivity_data_10_supported_area_past_success_scenario
Scenario: Validate success response for a supported area request
Given the request body property "$.area" is set to a valid testing area within supported regions
And the request body property "$.startTime" is set to a valid testing date-time in the past
And the request body property "$.endTime" is set to a valid testing past date-time later than body property "$.startTime"
And the request body properties "$.startTime" and "$.endTime" are set to valid values
And the request body property "$.serviceLevel" is set to a valid communication service level
When the request "retrieveConnectivity" is sent
Then the response status code is 200
Expand Down Expand Up @@ -456,7 +437,8 @@ Feature: CAMARA Predictive Connectivity Data API, vwip

@predictive_connectivity_data_422.02_too_big_synchronous_response
Scenario: Error 422 when the response is too big for a sync response
Given the request body properties "$.area.boundary", "$.startTime", "$.endTime" and "$.precision" are set to valid values but generate a response too big for a synchronous response
Given the request body properties "$.area.boundary", "$.startTime", "$.endTime" and "$.precision" are set to valid values
But the response would be too big for a synchronous response
When the request "retrieveConnectivity" is sent
Then the response status code is 422
And the response header "Content-Type" is "application/json"
Expand All @@ -466,7 +448,8 @@ Feature: CAMARA Predictive Connectivity Data API, vwip

@predictive_connectivity_data_422.03_too_big_request
Scenario: Error 422 when the response is too big for a sync and async response
Given the request body properties "$.area.boundary", "$.startTime", "$.endTime" and "$.precision" are set to valid values but generate a response too big for a synchronous and asynchronous response
Given the request body properties "$.area.boundary", "$.startTime", "$.endTime" and "$.precision" are set to valid values
But the response would be too big for either a synchronous or asynchronous response
When the request "retrieveConnectivity" is sent
Then the response status code is 422
And the response header "Content-Type" is "application/json"
Expand Down