Skip to content

Commit

Permalink
Update device-reachability-status.feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mdomale authored Aug 29, 2024
1 parent ef01e52 commit fab582f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions code/Test_definitions/device-reachability-status.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_01_reachabilityStatusConnectedSms
Scenario: Check the reachability status if device is connected with SMS
Given the request body property "$.phoneNumber" is set to valid value
Given a valid devicestatus request body
And the request body property "$.device" is set to a valid testing device supported by the service
When the request "getReachabilityStatus" is sent
Then the response code is 200
And the response header "Content-Type" is "application/json"
Expand All @@ -28,7 +29,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_02_reachabilityStatusConnectedData
Scenario: Check the reachability status if device is connected with DATA
Given a valid devicestatus request body with "$.phoneNumber"
Given a valid devicestatus request body
And the request body property "$.device" is set to a valid testing device supported by the service
When the request "getReachabilityStatus" is sent
Then the response code is 200
And the response header "Content-Type" is "application/json"
Expand All @@ -40,7 +42,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_03_reachabilityStatusDeviceNotConnected
Scenario: Check the reachability status for DeviceNotConnected
Given a valid devicestatus request body with "$.phoneNumber"
Given a valid devicestatus request body
And the request body property "$.device" is set to a valid testing device supported by the service
When the request "getReachabilityStatus" is sent
Then the response code is 200
And the response header "Content-Type" is "application/json"
Expand All @@ -57,13 +60,14 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi
Given the request body is not compliant with the schema "/components/schemas/RequestReachabilityStatus"
When the request "getReachabilityStatus" is sent
Then Response code is 400
And the response property "$.status" is 400
And the response property "$.status" is 400
And the response property "$.code" is "INVALID_ARGUMENT"
And the response property "$.message" contains a user friendly text

@device_reachability_status_05_expired_access_token
Scenario: Expired access token
Given a valid devicestatus request body and header "Authorization" is expired
Given a valid devicestatus request body
And header "Authorization" is set to expired token
When the request "getReachabilityStatus" is sent
Then the response status code is 401
And the response property "$.status" is 401
Expand All @@ -72,7 +76,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_06_no_authorization_header
Scenario: No Authorization header
Given a valid devicestatus request body and header "Authorization" is not available
Given a valid devicestatus request body
And header "Authorization" is not available
When the request "getReachabilityStatus" is sent
Then the response status code is 401
And the response property "$.status" is 401
Expand All @@ -81,7 +86,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_07_invalid_access_token
Scenario: Invalid access token
Given a valid devicestatus request body and header "Authorization" set to an invalid access token
Given a valid devicestatus request body
And header "Authorization" set to an invalid access token
When the request "getReachabilityStatus" is sent
Then the response status code is 401
And the response header "Content-Type" is "application/json"
Expand Down Expand Up @@ -113,7 +119,6 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_10_deviceStatus_NotApplicable
Scenario: Device reachability not applicable
# To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a Device reachability associated to a different phoneNumber
Given a valid devicestatus request body
And the request body property "$.device" refers to an unknown device
When the request "getReachabilityStatus" is sent
Expand All @@ -124,9 +129,8 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_11_unable_to_provide_reachability_status
Scenario: Unable to provide reachability status for a device
# To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a Device reachability associated to a different phoneNumber
Given a valid devicestatus request body
And the request body property "$.device" refers to an unknown network
And the request body property "$.device" refers to a device having network issue
When the request "getReachabilityStatus" is sent
Then the response status code is 422
And the response property "$.status" is 422
Expand All @@ -135,7 +139,6 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi

@device_reachability_status_12_unsupported_device_identifiers
Scenario: Unsupported device identifiers
# To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a Device reachability associated to a different phoneNumber
Given a valid devicestatus request body
And the request body property "$.device" set to unsupported identifiers value by the service
When the request "getReachabilityStatus" is sent
Expand Down

0 comments on commit fab582f

Please sign in to comment.