From f863b206dd7973a89ff7a65f2b55e8734d6aed58 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:52:41 +0530 Subject: [PATCH 01/18] Create device-status.feature Feature file for device-reachability-status & device-connectivity-status --- code/Test_definitions/device-status.feature | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 code/Test_definitions/device-status.feature diff --git a/code/Test_definitions/device-status.feature b/code/Test_definitions/device-status.feature new file mode 100644 index 00000000..89008f05 --- /dev/null +++ b/code/Test_definitions/device-status.feature @@ -0,0 +1,75 @@ + +@DeviceStatusSanity +Feature: CAMARA DeviceStatus API, v0.5.1 - Operation DeviceStatus + + @DeviceStatus_01_RoamingStatusTrue + Scenario: Check the roaming state and the country information synchronously if the device is in the roaming mode + Given Use BaseURL + When Request roaming status for msisdn +49160444444 + Then Response code is 200 + Then The roaming status is true + + @DeviceStatus_02_RoamingStatusFalse + Scenario: Check the roaming state synchronously if the device is not in the roaming mode + Given Use BaseURL + When Request roaming status for msisdn +49160444449 + Then Response code is 200 + Then The roaming status is false + + @DeviceStatus_03_ConnectivityStatusConnectedSMS + Scenario: Check device connectivity synchronously if the device is connected for SMS usage + Given Use BaseURL + When Request connectivity status for msisdn +491604444444 + Then Response code is 200 + Then The connectivity status is CONNECTED_SMS + + @DeviceStatus_04_ConnectivityStatusConnectedData + Scenario: Check device connectivity synchronously if the device is connected for Data usage + Given Use BaseURL + When Request connectivity status for msisdn +491605555555 + Then Response code is 200 + Then The connectivity status is CONNECTED_DATA + + @DeviceStatus_05_DeviceConnectivityStatusNotConnected + Scenario: Check device connectivity synchronously if the device is not connected to network + Given Use BaseURL + When Request connectivity status for msisdn +49160666666 + Then Response code is 200 + Then The connectivity status is NOT_CONNECTED + + @DeviceStatus_06_DeviceStatusWithoutDoubleQuoteInMsisdn + Scenario: Device status request with missing double quote in json request body + Given Use BaseURL + When Request device status with missing double quote in json payload + Then Response code is 400 + + @DeviceStatus_07_DeviceStatusWithMissingBracket + Scenario: Device status request with missing bracket in json request + Given Use BaseURL + When Request device status with missing bracket in json payload + Then Response code is 400 + + @DeviceStatus_08_DeviceStatusWithIncorrectEventType + Scenario: Device status request with incorrect EventType + Given Use BaseURL + When Request device status with with incorrect EventType + Then Response code is 400 + + @DeviceStatus_09_DeviceStatusWithIncorrectIpAddress + Scenario: Device status request with incorrect ipaddress + Given Use BaseURL + When Request device status with incorrect ipaddress in json payload + Then Response code is 400 + + @DeviceStatus_10_DeviceStatusWithIncorrectHTTPMethod + Scenario: Device status request with incorrect HTTP request method + Given Use BaseURL + When Put request for DeviceStatus Status + Then Response code is 405 + + @DeviceStatus_11_DeviceStatusServiceUnavailable + Scenario: Server not available + Given Use the BaseURL + Test for Create when service unavailable + When Verify DeviceStatus with valid msisdn when service is not available + Then Response code equal to 503 From 70aafd33725d935337ed3100217db66e09840753 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:06:14 +0530 Subject: [PATCH 02/18] Update and rename device-reachability-status.feature --- .../device-reachability-status.feature | 94 +++++++++++++++++++ code/Test_definitions/device-status.feature | 75 --------------- 2 files changed, 94 insertions(+), 75 deletions(-) create mode 100644 code/Test_definitions/device-reachability-status.feature delete mode 100644 code/Test_definitions/device-status.feature diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature new file mode 100644 index 00000000..8b196022 --- /dev/null +++ b/code/Test_definitions/device-reachability-status.feature @@ -0,0 +1,94 @@ + @Device_Reachability_Status_Sanity + Feature: CAMARA Device Reachability Status API, v0.6.0 - Operations Device Status Check + + # Input to be provided by the implementation to the tests + # References to OAS spec schemas refer to schemas specifies in device-reachability-status.yaml, version v0.6.0 + + Background: Common Device Reachability status setup + Given the resource "/device-reachability-status/v0/retrive" | + And the header "Content-Type" is set to "application/json" + And the header "x-correlator" is set to a UUID value + And the header "Authorization" is set to a valid access token + And the requestbody is set by default to a requestbody compliant with the schema + + + @Device_Reachability_Status_01_ReachabilityStatusConnectedSMS + Scenario: Check device reachability synchronously if the device is connected for SMS usage + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service + Then response code is 200 + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" + And the reachability status is CONNECTED_SMS + + @Device_Reachability_Status_02_Status_ConnectedData + Scenario: Check device reachability synchronously if the device is connected for Data usage + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service + Then response code is 200 + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" + Then the reachability status is CONNECTED_DATA + + @Device_Reachability_Status_03_Status_NotConnected + Scenario: Check device reachability synchronously if the device is not connected to network + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service + Then response code is 200 + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" + And the reachability status is NOT_CONNECTED + + @Device_Reachability_Status_04_Status_ConnectedSMS_Service_unavailable + Scenario: Check device reachability synchronously if the device is connected for SMS usage & Service_unavailable + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service + Then response code is 503 + And the response property "$.status" is 503 + And the response property "$.code" is "UNAVAILABLE" + And the response property "$.message" contains a user friendly text + + @Device_Reachability_Status_05_Status_ConnectedSMS_Service_bad_request + Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a invalid testing device not supported by the service + Then response code is 400 + And the response property "$.status" is 400 + And the response property "$.code" is "BAD_REQUEST" + And the response property "$.message" contains a user friendly text + + @Device_Reachability_Status_06_Status_ConnectedSMS_Token_expired + Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service + Then response code is 401 + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHORIZED" + And the response property "$.message" contains a user friendly text + + @Device_Reachability_Status_07_ConnectedSMS_phonenumber_Not_available + Scenario: Check device reachability synchronously if the device is connected for SMS usage & phonenumber not available + Given Use BaseURL + When request reachability status for "$.phonenumber" is set to a invalid testing device not available by the service + Then response code is 404 + And the response property "$.status" is 404 + And the response property "$.code" is "NOT_FOUND" + And the response property "$.message" contains a user friendly text + + @Device_Reachability_Status_07_ConnectedSMS_Get_Method_call + Scenario: Check device reachability synchronously if the device is connected for SMS usage & invalid method + Given Use BaseURL + When get method request reachability status for "$.phonenumber" + Then response code is 405 + And the response property "$.status" is 405 + And the response property "$.code" is "METHOD_NOT_ALLOWED" + And the response property "$.message" contains a user friendly text diff --git a/code/Test_definitions/device-status.feature b/code/Test_definitions/device-status.feature deleted file mode 100644 index 89008f05..00000000 --- a/code/Test_definitions/device-status.feature +++ /dev/null @@ -1,75 +0,0 @@ - -@DeviceStatusSanity -Feature: CAMARA DeviceStatus API, v0.5.1 - Operation DeviceStatus - - @DeviceStatus_01_RoamingStatusTrue - Scenario: Check the roaming state and the country information synchronously if the device is in the roaming mode - Given Use BaseURL - When Request roaming status for msisdn +49160444444 - Then Response code is 200 - Then The roaming status is true - - @DeviceStatus_02_RoamingStatusFalse - Scenario: Check the roaming state synchronously if the device is not in the roaming mode - Given Use BaseURL - When Request roaming status for msisdn +49160444449 - Then Response code is 200 - Then The roaming status is false - - @DeviceStatus_03_ConnectivityStatusConnectedSMS - Scenario: Check device connectivity synchronously if the device is connected for SMS usage - Given Use BaseURL - When Request connectivity status for msisdn +491604444444 - Then Response code is 200 - Then The connectivity status is CONNECTED_SMS - - @DeviceStatus_04_ConnectivityStatusConnectedData - Scenario: Check device connectivity synchronously if the device is connected for Data usage - Given Use BaseURL - When Request connectivity status for msisdn +491605555555 - Then Response code is 200 - Then The connectivity status is CONNECTED_DATA - - @DeviceStatus_05_DeviceConnectivityStatusNotConnected - Scenario: Check device connectivity synchronously if the device is not connected to network - Given Use BaseURL - When Request connectivity status for msisdn +49160666666 - Then Response code is 200 - Then The connectivity status is NOT_CONNECTED - - @DeviceStatus_06_DeviceStatusWithoutDoubleQuoteInMsisdn - Scenario: Device status request with missing double quote in json request body - Given Use BaseURL - When Request device status with missing double quote in json payload - Then Response code is 400 - - @DeviceStatus_07_DeviceStatusWithMissingBracket - Scenario: Device status request with missing bracket in json request - Given Use BaseURL - When Request device status with missing bracket in json payload - Then Response code is 400 - - @DeviceStatus_08_DeviceStatusWithIncorrectEventType - Scenario: Device status request with incorrect EventType - Given Use BaseURL - When Request device status with with incorrect EventType - Then Response code is 400 - - @DeviceStatus_09_DeviceStatusWithIncorrectIpAddress - Scenario: Device status request with incorrect ipaddress - Given Use BaseURL - When Request device status with incorrect ipaddress in json payload - Then Response code is 400 - - @DeviceStatus_10_DeviceStatusWithIncorrectHTTPMethod - Scenario: Device status request with incorrect HTTP request method - Given Use BaseURL - When Put request for DeviceStatus Status - Then Response code is 405 - - @DeviceStatus_11_DeviceStatusServiceUnavailable - Scenario: Server not available - Given Use the BaseURL - Test for Create when service unavailable - When Verify DeviceStatus with valid msisdn when service is not available - Then Response code equal to 503 From 5f8999bbfb4f2dfe537ad13e0592ab995029228a Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:13:23 +0530 Subject: [PATCH 03/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 8b196022..cdc67de9 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -57,7 +57,7 @@ And the response property "$.code" is "UNAVAILABLE" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_05_Status_ConnectedSMS_Service_bad_request + @Device_Reachability_Status_05_Status_ConnectedSMS_Service_bad_request Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values Given Use BaseURL When request reachability status for "$.phonenumber" is set to a invalid testing device not supported by the service @@ -66,7 +66,7 @@ And the response property "$.code" is "BAD_REQUEST" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_06_Status_ConnectedSMS_Token_expired + @Device_Reachability_Status_06_Status_ConnectedSMS_Token_expired Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values Given Use BaseURL When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service @@ -75,7 +75,7 @@ And the response property "$.code" is "UNAUTHORIZED" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_07_ConnectedSMS_phonenumber_Not_available + @Device_Reachability_Status_07_ConnectedSMS_phonenumber_Not_available Scenario: Check device reachability synchronously if the device is connected for SMS usage & phonenumber not available Given Use BaseURL When request reachability status for "$.phonenumber" is set to a invalid testing device not available by the service @@ -84,8 +84,8 @@ And the response property "$.code" is "NOT_FOUND" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_07_ConnectedSMS_Get_Method_call - Scenario: Check device reachability synchronously if the device is connected for SMS usage & invalid method + @Device_Reachability_Status_07_ConnectedSMS_Get_Method_call + Scenario: Check device reachability synchronously if the device is connected for SMS usage & invalid method Given Use BaseURL When get method request reachability status for "$.phonenumber" Then response code is 405 From 7fbc5a14b9c79998b21be5c50cdfc37a4abfa971 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:21:38 +0530 Subject: [PATCH 04/18] Create device-roaming-status.feature --- .../device-roaming-status.feature | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 code/Test_definitions/device-roaming-status.feature diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature new file mode 100644 index 00000000..f5e84516 --- /dev/null +++ b/code/Test_definitions/device-roaming-status.feature @@ -0,0 +1,92 @@ + +@DeviceRoamingStatusSanity +Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations Device Status + + # Input to be provided by the implementation to the tests + # References to OAS spec schemas refer to schemas specifies in device-roaming-status.yaml, version v0.6.0 + + Background: Common Device Roaming status setup + Given the resource "/device-roaming-status/v0/retrieve" | + And the header "Content-Type" is set to "application/json" + And the header "Authorization" is set to a valid access token + And the header "x-correlator" is set to a UUID value + And the request body is set by default to a request body compliant with the schema + + + @Device_Roaming_Status_01_RoamingStatusTrue + Scenario: Check the roaming state and the country information synchronously if the device is in the roaming mode + Given Use BaseURL + When Request roaming status for "$.msisdn" + Then Response code is 200 + 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 body complies with the OAS schema at "/components/schemas/RoamingStatusResponse" + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + And the response property "$.message" contains a user friendly text + Then The roaming status is true + + @Device_Roaming_Status_02_RoamingStatusFalse + Scenario: Check the roaming state synchronously if the device is not in the roaming mode + Given Use BaseURL + When request roaming status for "$.msisdn" + Then response code is 200 + Then the roaming status is false + + @Device_Roaming_Status_03_DeviceStatus_WithoutDoubleQuoteInMsisdn + Scenario: Device status request with missing double quote in json request body + Given Use BaseURL + When Request device status with missing double quote in json payload + Then Response code 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 + 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 body complies with the OAS schema at "/components/schemas/RoamingStatusResponse" + + @Device_Roaming_Status_04_DeviceStatusWithMissingBracket + Scenario: Device status request with missing bracket in json request + Given Use BaseURL + When Request device status with missing bracket in json payload + Then Response code 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_Roaming_Status_05_DeviceStatusWithIncorrectEventType + Scenario: Device status request with incorrect EventType + Given Use BaseURL + When Request device status with with incorrect EventType + Then Response code 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_Roaming_Status_06_DeviceStatusWithIncorrectIpAddress + Scenario: Device status request with incorrect ipaddress + Given Use BaseURL + When Request device status with incorrect ipaddress in json payload + Then Response code 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_Roaming_Status_07_DeviceStatusWithIncorrectHTTPMethod + Scenario: Device status request with incorrect HTTP request method + Given Use BaseURL + When Put request for DeviceStatus Status + Then Response code is 405 + And the response property "$.status" is 405 + And the response property "$.code" is "Method_Not_Allowed" + And the response property "$.message" contains a user friendly text + + @Device_Roaming_Status_08_DeviceStatusServiceUnavailable + Scenario: Server not available + Given Use the BaseURL + Test for Create when service unavailable + When Verify DeviceStatus with valid msisdn when service is not available + Then Response code is 503 + And the response property "$.status" is 503 + And the response property "$.code" is "Service_Unavailable" + And the response property "$.message" contains a user friendly text From 541faa6d90ebb40d7f7f2d940eacf2090b50db6d Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:18:55 +0530 Subject: [PATCH 05/18] Update device-roaming-status.feature --- .../device-roaming-status.feature | 144 ++++++++++-------- 1 file changed, 80 insertions(+), 64 deletions(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index f5e84516..54bae01f 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -1,92 +1,108 @@ -@DeviceRoamingStatusSanity -Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations Device Status +@Device_Roaming_Status +Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Status - # Input to be provided by the implementation to the tests - # References to OAS spec schemas refer to schemas specifies in device-roaming-status.yaml, version v0.6.0 +# Input to be provided by the implementation to the tests +# References to OAS spec schemas refer to schemas specifies in device-roaming-status.yaml, version v0.6.0 Background: Common Device Roaming status setup - Given the resource "/device-roaming-status/v0/retrieve" | + Given the resource "{api-root}/device-roaming-status/v0.6/retrieve" set as base-url | And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token - And the header "x-correlator" is set to a UUID value - And the request body is set by default to a request body compliant with the schema + And the header "x-correlator" is set to a UUID value - - @Device_Roaming_Status_01_RoamingStatusTrue - Scenario: Check the roaming state and the country information synchronously if the device is in the roaming mode - Given Use BaseURL - When Request roaming status for "$.msisdn" - Then Response code is 200 +#############Happy Path Scenarios################## + + @device_roaming_status_01_roamingStatusTrue + Scenario: Check the roaming status when device is in the roaming mode + Given a valid devicestatus request body with "$.phoneNumber" + When the request "getRoamingStatus" is sent + Then the response code is 200 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 body complies with the OAS schema at "/components/schemas/RoamingStatusResponse" - And the response property "$.status" is 200 + And the response property "$.status" is 200 And the response property "$.code" is "OK" And the response property "$.message" contains a user friendly text - Then The roaming status is true + Then the roaming status is true - @Device_Roaming_Status_02_RoamingStatusFalse + @device_roaming_status_02_roamingStatusFalse Scenario: Check the roaming state synchronously if the device is not in the roaming mode - Given Use BaseURL - When request roaming status for "$.msisdn" - Then response code is 200 - Then the roaming status is false - - @Device_Roaming_Status_03_DeviceStatus_WithoutDoubleQuoteInMsisdn - Scenario: Device status request with missing double quote in json request body - Given Use BaseURL - When Request device status with missing double quote in json payload - Then Response code 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 - And the response header "Content-Type" is "application/json" + Given a valid devicestatus request body with "$.phoneNumber" + When the request "getRoamingStatus" is sent + Then the response code is 200 + 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 body complies with the OAS schema at "/components/schemas/RoamingStatusResponse" + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + Then the roaming status is false - @Device_Roaming_Status_04_DeviceStatusWithMissingBracket - Scenario: Device status request with missing bracket in json request - Given Use BaseURL - When Request device status with missing bracket in json payload +#############Error Response Scenarios################## + + @device_roaming_status_03_deviceStatus_with_invalid_parameter + Scenario: Device status request with invalid parameter + Given a valid devicestatus request body with invalid parameter + When the request "getRoamingStatus" is sent Then Response code 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_Roaming_Status_05_DeviceStatusWithIncorrectEventType - Scenario: Device status request with incorrect EventType - Given Use BaseURL - When Request device status with with incorrect EventType - Then Response code is 400 - And the response property "$.status" is 400 - And the response property "$.code" is "INVALID_ARGUMENT" + @device_roaming_status_04_expired_access_token + Scenario: Expired access token + Given a valid devicestatus request body and header "Authorization" is expired + When the request "getRoamingStatus" is sent + Then the response status code is 401 + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text - - @Device_Roaming_Status_06_DeviceStatusWithIncorrectIpAddress - Scenario: Device status request with incorrect ipaddress - Given Use BaseURL - When Request device status with incorrect ipaddress in json payload - Then Response code is 400 - And the response property "$.status" is 400 - And the response property "$.code" is "INVALID_ARGUMENT" + + @device_roaming_status_05_no_authorization_header + Scenario: No Authorization header + Given a valid devicestatus request body and header "Authorization" is not available + When the request "getRoamingStatus" is sent + Then the response status code is 401 + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @device_roaming_status_06_invalid_access_token + Scenario: Invalid access token + Given a valid devicestatus request body and header "Authorization" set to an invalid access token + When the request "getRoamingStatus" is sent + Then the response status code is 401 + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @device_roaming_status_07_deviceStatus_inconsistent_access_token + Scenario: Inconsistent access token context for the device + # To test this, a token have to be obtained for a different device + Given a valid subscription request body with "$.phoneNumber" and token from different device + When the request "getRoamingStatus" is sent + Then the response status code is 403 + And the response property "$.status" is 403 + And the response property "$.code" is "INVALID_TOKEN_CONTEXT" And the response property "$.message" contains a user friendly text - @Device_Roaming_Status_07_DeviceStatusWithIncorrectHTTPMethod - Scenario: Device status request with incorrect HTTP request method - Given Use BaseURL - When Put request for DeviceStatus Status + @device_roaming_status_08_deviceStatusWithIncorrectHTTPMethod + Scenario: Device status request with incorrect HTTP request method + Given a valid devicestatus request body with "$.phoneNumber" + When the "PUT" request "getRoamingStatus" is sent Then Response code is 405 - And the response property "$.status" is 405 + And the response property "$.status" is 405 And the response property "$.code" is "Method_Not_Allowed" And the response property "$.message" contains a user friendly text - - @Device_Roaming_Status_08_DeviceStatusServiceUnavailable - Scenario: Server not available - Given Use the BaseURL - Test for Create when service unavailable - When Verify DeviceStatus with valid msisdn when service is not available - Then Response code is 503 - And the response property "$.status" is 503 - And the response property "$.code" is "Service_Unavailable" - And the response property "$.message" contains a user friendly text + + @device_roaming_status_09_deviceStatusWithIdentifiersMismatch + Scenario: Device identifiers mismatch + # To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a device associated to a different phoneNumber + Given a valid devicestatus request body with "$.phoneNumber" and config_var "identifier_types_unsupported" contains at least 2 items + And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + When the request "getRoamingStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "DEVICE_IDENTIFIERS_MISMATCH" + And the response property "$.message" contains a user friendly text From f2ce54f9e6b3a0ade88450f9c051081dcbf08c98 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:51:18 +0530 Subject: [PATCH 06/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 161 ++++++++++-------- 1 file changed, 94 insertions(+), 67 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index cdc67de9..9f93ca4a 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -1,94 +1,121 @@ - @Device_Reachability_Status_Sanity - Feature: CAMARA Device Reachability Status API, v0.6.0 - Operations Device Status Check - - # Input to be provided by the implementation to the tests - # References to OAS spec schemas refer to schemas specifies in device-reachability-status.yaml, version v0.6.0 - Background: Common Device Reachability status setup - Given the resource "/device-reachability-status/v0/retrive" | +@Device_reachability_status +Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations for reachability Status + +# Input to be provided by the implementation to the tests +# References to OAS spec schemas refer to schemas specifies in device-reachability-status.yaml, version v0.6.0 + + Background: Common Device reachabilityreachability status setup + Given the resource "{api-root}/device-reachability-status/v0.6/retrieve" set as base-url | And the header "Content-Type" is set to "application/json" - And the header "x-correlator" is set to a UUID value And the header "Authorization" is set to a valid access token - And the requestbody is set by default to a requestbody compliant with the schema - + And the header "x-correlator" is set to a UUID value - @Device_Reachability_Status_01_ReachabilityStatusConnectedSMS - Scenario: Check device reachability synchronously if the device is connected for SMS usage - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service - Then response code is 200 - And the response property "$.status" is 200 - And the response property "$.code" is "OK" +#############Happy Path Scenarios################## + + @device_reachability_status_01_reachabilityStatusConnectedSms + Scenario: Check the reachability status when Device reachability + Given a valid devicestatus request body with "$.phoneNumber" + When the request "getReachabilityStatus" is sent + Then the response code is 200 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" - And the reachability status is CONNECTED_SMS - - @Device_Reachability_Status_02_Status_ConnectedData - Scenario: Check device reachability synchronously if the device is connected for Data usage - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service - Then response code is 200 And the response property "$.status" is 200 And the response property "$.code" is "OK" + And the response property "$.message" contains a user friendly text + Then the reachability status is "CONNECTED_SMS" + + @device_reachability_status_02_reachabilityStatusConnectedData + Scenario: Check the reachability state + Given a valid devicestatus request body with "$.phoneNumber" + When the request "getReachabilityStatus" is sent + Then the response code is 200 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" - Then the reachability status is CONNECTED_DATA - - @Device_Reachability_Status_03_Status_NotConnected - Scenario: Check device reachability synchronously if the device is not connected to network - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service - Then response code is 200 And the response property "$.status" is 200 And the response property "$.code" is "OK" + Then the reachability status is "CONNECTED_DATA" + + @device_reachability_status_03_reachabilityStatusDeviceNotConnected + Scenario: Check the reachability status for DeviceNotConnected + Given a valid devicestatus request body with "$.phoneNumber" + When the request "getReachabilityStatus" is sent + Then the response code is 200 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" - And the reachability status is NOT_CONNECTED + And the response property "$.status" is 200 + And the response property "$.code" is "OK" + Then the reachability status is "NOT_CONNECTED" - @Device_Reachability_Status_04_Status_ConnectedSMS_Service_unavailable - Scenario: Check device reachability synchronously if the device is connected for SMS usage & Service_unavailable - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service - Then response code is 503 - And the response property "$.status" is 503 - And the response property "$.code" is "UNAVAILABLE" - And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_05_Status_ConnectedSMS_Service_bad_request - Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a invalid testing device not supported by the service - Then response code is 400 +#############Error Response Scenarios################## + + @device_reachability_status_04_deviceStatus_with_invalid_parameter + Scenario: Device reachability status request with invalid parameter + Given a valid devicestatus request body with invalid parameter + When the request "getReachabilityStatus" is sent + Then Response code is 400 And the response property "$.status" is 400 - And the response property "$.code" is "BAD_REQUEST" + 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 + When the request "getReachabilityStatus" is sent + Then the response status code is 401 + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_06_Status_ConnectedSMS_Token_expired - Scenario: Check device reachability synchronously if the device is connected for SMS usage & device parameter values not present/invalid values - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a valid testing device supported by the service - Then response code is 401 - And the response property "$.status" is 401 - And the response property "$.code" is "UNAUTHORIZED" + @device_reachability_status_06_no_authorization_header + Scenario: No Authorization header + 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 + And the response property "$.code" is "UNAUTHENTICATED" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_07_ConnectedSMS_phonenumber_Not_available - Scenario: Check device reachability synchronously if the device is connected for SMS usage & phonenumber not available - Given Use BaseURL - When request reachability status for "$.phonenumber" is set to a invalid testing device not available by the service - Then response code is 404 - And the response property "$.status" is 404 - And the response property "$.code" is "NOT_FOUND" + @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 + When the request "getReachabilityStatus" is sent + Then the response status code is 401 + And the response header "Content-Type" is "application/json" + And the response property "$.status" is 401 + And the response property "$.code" is "UNAUTHENTICATED" + And the response property "$.message" contains a user friendly text + + @device_reachability_status_08_deviceStatus_inconsistent_access_token + Scenario: Inconsistent access token context for the device + # To test this, a token have to be obtained for a different device + Given a valid subscription request body with "$.phoneNumber" and token from different device + When the request "getReachabilityStatus" is sent + Then the response status code is 403 + And the response property "$.status" is 403 + And the response property "$.code" is "INVALID_TOKEN_CONTEXT" + And the response property "$.message" contains a user friendly text + + @device_reachability_status_09_deviceStatusWithIncorrectHTTPMethod + Scenario: Device reachabilitystatus request with incorrect HTTP request method + Given a valid devicestatus request body with "$.phoneNumber" + When the "PUT" request "getReachabilityStatus" is sent + Then Response code is 405 + And the response property "$.status" is 405 + And the response property "$.code" is "Method_Not_Allowed" And the response property "$.message" contains a user friendly text - @Device_Reachability_Status_07_ConnectedSMS_Get_Method_call - Scenario: Check device reachability synchronously if the device is connected for SMS usage & invalid method - Given Use BaseURL - When get method request reachability status for "$.phonenumber" - Then response code is 405 - And the response property "$.status" is 405 - And the response property "$.code" is "METHOD_NOT_ALLOWED" + @device_reachability_status_10_deviceStatusWithIdentifiersMismatch + Scenario: Device reachabilityidentifiers mismatch + # 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 with "$.phoneNumber" and config_var "identifier_types_unsupported" contains at least 2 items + And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + When the request "getReachabilityStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "DEVICE_IDENTIFIERS_MISMATCH" And the response property "$.message" contains a user friendly text From 52cf111be1a62b1f9fbd3050a79d27c15fe017a4 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:31:19 +0530 Subject: [PATCH 07/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 9f93ca4a..255ef5a6 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -1,11 +1,11 @@ @Device_reachability_status -Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations for reachability Status +Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachability status # Input to be provided by the implementation to the tests # References to OAS spec schemas refer to schemas specifies in device-reachability-status.yaml, version v0.6.0 - Background: Common Device reachabilityreachability status setup + Background: Common Device reachability status setup Given the resource "{api-root}/device-reachability-status/v0.6/retrieve" set as base-url | And the header "Content-Type" is set to "application/json" And the header "Authorization" is set to a valid access token @@ -14,9 +14,9 @@ Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations #############Happy Path Scenarios################## @device_reachability_status_01_reachabilityStatusConnectedSms - Scenario: Check the reachability status when Device reachability + Scenario: Check the reachability status if device is connected with SMS Given a valid devicestatus request body with "$.phoneNumber" - When the request "getReachabilityStatus" is sent + When the request "getReachabilityStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" And the response header "x-correlator" has same value as the request header "x-correlator" @@ -24,19 +24,19 @@ Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations And the response property "$.status" is 200 And the response property "$.code" is "OK" And the response property "$.message" contains a user friendly text - Then the reachability status is "CONNECTED_SMS" + And the response property "$.reachabilityStatus" is "CONNECTED_SMS" @device_reachability_status_02_reachabilityStatusConnectedData - Scenario: Check the reachability state + Scenario: Check the reachability status if device is connected with DATA Given a valid devicestatus request body with "$.phoneNumber" When the request "getReachabilityStatus" is sent Then the response code is 200 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" - And the response property "$.status" is 200 + And the response property "$.status" is 200 And the response property "$.code" is "OK" - Then the reachability status is "CONNECTED_DATA" + And the response property "$.reachabilityStatus" is "CONNECTED_DATA" @device_reachability_status_03_reachabilityStatusDeviceNotConnected Scenario: Check the reachability status for DeviceNotConnected @@ -46,9 +46,9 @@ Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations 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 body complies with the OAS schema at "/components/schemas/ReachabilityStatusResponse" - And the response property "$.status" is 200 + And the response property "$.status" is 200 And the response property "$.code" is "OK" - Then the reachability status is "NOT_CONNECTED" + And the response property "$.reachabilityStatus" is "NOT_CONNECTED" #############Error Response Scenarios################## @@ -58,7 +58,7 @@ Feature: CAMARA Device reachabilityreachability Status API, v0.6.0 - Operations Given a valid devicestatus request body with invalid parameter 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 From 93c47602df2860a4f26397513c88eb34c9e56d6d Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:32:03 +0530 Subject: [PATCH 08/18] Update device-roaming-status.feature --- code/Test_definitions/device-roaming-status.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index 54bae01f..54b71b70 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -18,7 +18,7 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu Given a valid devicestatus request body with "$.phoneNumber" When the request "getRoamingStatus" is sent Then the response code is 200 - And the response header "Content-Type" is "application/json" + 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 body complies with the OAS schema at "/components/schemas/RoamingStatusResponse" And the response property "$.status" is 200 From 188ec8e13bf4876de8be02d72fa6166afaa620d1 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:33:11 +0530 Subject: [PATCH 09/18] Update device-roaming-status.feature --- .../device-roaming-status.feature | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index 54b71b70..6c79dcce 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -13,9 +13,9 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu #############Happy Path Scenarios################## - @device_roaming_status_01_roamingStatusTrue + @device_roaming_status_01_roaming_status_true Scenario: Check the roaming status when device is in the roaming mode - Given a valid devicestatus request body with "$.phoneNumber" + Given the request body property "$.phoneNumber" is set to valid value When the request "getRoamingStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" @@ -26,7 +26,7 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu And the response property "$.message" contains a user friendly text Then the roaming status is true - @device_roaming_status_02_roamingStatusFalse + @device_roaming_status_02_roaming_status_false Scenario: Check the roaming state synchronously if the device is not in the roaming mode Given a valid devicestatus request body with "$.phoneNumber" When the request "getRoamingStatus" is sent @@ -42,10 +42,10 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_03_deviceStatus_with_invalid_parameter Scenario: Device status request with invalid parameter - Given a valid devicestatus request body with invalid parameter + Given the request body is not compliant with the schema "/components/schemas/RequestRoamingStatus" When the request "getRoamingStatus" 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 @@ -79,28 +79,18 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_07_deviceStatus_inconsistent_access_token Scenario: Inconsistent access token context for the device - # To test this, a token have to be obtained for a different device + # To test this, a token has to be obtained for a different device Given a valid subscription request body with "$.phoneNumber" and token from different device When the request "getRoamingStatus" is sent Then the response status code is 403 And the response property "$.status" is 403 And the response property "$.code" is "INVALID_TOKEN_CONTEXT" And the response property "$.message" contains a user friendly text - - @device_roaming_status_08_deviceStatusWithIncorrectHTTPMethod - Scenario: Device status request with incorrect HTTP request method - Given a valid devicestatus request body with "$.phoneNumber" - When the "PUT" request "getRoamingStatus" is sent - Then Response code is 405 - And the response property "$.status" is 405 - And the response property "$.code" is "Method_Not_Allowed" - And the response property "$.message" contains a user friendly text - @device_roaming_status_09_deviceStatusWithIdentifiersMismatch + @device_roaming_status_08_deviceStatusWithIdentifiersMismatch Scenario: Device identifiers mismatch # To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a device associated to a different phoneNumber - Given a valid devicestatus request body with "$.phoneNumber" and config_var "identifier_types_unsupported" contains at least 2 items - And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + Given a valid devicestatus request body with the request body property "$.device" includes several identifiers, each of them identifying a valid but different device When the request "getRoamingStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 From 81823ea0ac7b6f8c5a017986e6daabc5f4bc4a30 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 12:33:18 +0530 Subject: [PATCH 10/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 255ef5a6..7e951ff5 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -11,11 +11,11 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi And the header "Authorization" is set to a valid access token And the header "x-correlator" is set to a UUID value -#############Happy Path Scenarios################## +############# Happy Path Scenarios ################## @device_reachability_status_01_reachabilityStatusConnectedSms Scenario: Check the reachability status if device is connected with SMS - Given a valid devicestatus request body with "$.phoneNumber" + Given the request body property "$.phoneNumber" is set to valid value When the request "getReachabilityStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" @@ -50,12 +50,11 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi And the response property "$.code" is "OK" And the response property "$.reachabilityStatus" is "NOT_CONNECTED" - #############Error Response Scenarios################## @device_reachability_status_04_deviceStatus_with_invalid_parameter Scenario: Device reachability status request with invalid parameter - Given a valid devicestatus request body with invalid parameter + 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 @@ -65,7 +64,7 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi @device_reachability_status_05_expired_access_token Scenario: Expired access token Given a valid devicestatus request body and header "Authorization" is expired - When the request "getReachabilityStatus" is sent + When the request "getReachabilityStatus" is sent Then the response status code is 401 And the response property "$.status" is 401 And the response property "$.code" is "UNAUTHENTICATED" @@ -74,7 +73,7 @@ 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 - When the request "getReachabilityStatus" is sent + When the request "getReachabilityStatus" is sent Then the response status code is 401 And the response property "$.status" is 401 And the response property "$.code" is "UNAUTHENTICATED" @@ -92,28 +91,19 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi @device_reachability_status_08_deviceStatus_inconsistent_access_token Scenario: Inconsistent access token context for the device - # To test this, a token have to be obtained for a different device - Given a valid subscription request body with "$.phoneNumber" and token from different device + # To test this, a token has to be obtained for a different device + Given a valid devicestatus request body with token from different device + And the request body property "$.device" is set to appropriate value When the request "getReachabilityStatus" is sent Then the response status code is 403 And the response property "$.status" is 403 And the response property "$.code" is "INVALID_TOKEN_CONTEXT" And the response property "$.message" contains a user friendly text - - @device_reachability_status_09_deviceStatusWithIncorrectHTTPMethod - Scenario: Device reachabilitystatus request with incorrect HTTP request method - Given a valid devicestatus request body with "$.phoneNumber" - When the "PUT" request "getReachabilityStatus" is sent - Then Response code is 405 - And the response property "$.status" is 405 - And the response property "$.code" is "Method_Not_Allowed" - And the response property "$.message" contains a user friendly text - @device_reachability_status_10_deviceStatusWithIdentifiersMismatch + @device_reachability_status_09_deviceStatusWithIdentifiersMismatch Scenario: Device reachabilityidentifiers mismatch # 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 with "$.phoneNumber" and config_var "identifier_types_unsupported" contains at least 2 items - And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + Given a valid devicestatus request body with the request body property "$.device" includes several identifiers, each of them identifying a valid but different device When the request "getReachabilityStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 From f0d036e6e4e86087219caa321b99b09417df3af6 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:40:50 +0530 Subject: [PATCH 11/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 7e951ff5..4338a822 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -103,9 +103,43 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi @device_reachability_status_09_deviceStatusWithIdentifiersMismatch Scenario: Device reachabilityidentifiers mismatch # 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 with the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + Given a valid devicestatus request body + And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device When the request "getReachabilityStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 And the response property "$.code" is "DEVICE_IDENTIFIERS_MISMATCH" And the response property "$.message" contains a user friendly text + + @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 + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "DEVICE_NOT_APPLICABLE" + And the response property "$.message" contains a user friendly text + + @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 + When the request "getReachabilityStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNABLE_TO_PROVIDE_REACHABILITY_STATUS" + And the response property "$.message" contains a user friendly text + + @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 + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNSUPPORTED_DEVICE_IDENTIFIERS" + And the response property "$.message" contains a user friendly text From ef01e522e6f6012d7f302280325ed18faba08e63 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:01:46 +0530 Subject: [PATCH 12/18] Update device-roaming-status.feature --- .../device-roaming-status.feature | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index 6c79dcce..fc29ec1e 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -90,9 +90,44 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_08_deviceStatusWithIdentifiersMismatch Scenario: Device identifiers mismatch # To test this, at least 2 types of identifiers have to be provided, e.g. a phoneNumber and the IP address of a device associated to a different phoneNumber - Given a valid devicestatus request body with the request body property "$.device" includes several identifiers, each of them identifying a valid but different device + Given a valid devicestatus request body + And the request body property "$.device" includes several identifiers, each of them identifying a valid but different device When the request "getRoamingStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 And the response property "$.code" is "DEVICE_IDENTIFIERS_MISMATCH" And the response property "$.message" contains a user friendly text + + + @device_roaming_status_09_deviceStatus_not_applicable + Scenario: Device roaming 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 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 "getRoamingStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "DEVICE_NOT_APPLICABLE" + And the response property "$.message" contains a user friendly text + + @device_roaming_status_10_deviceStatus_unable_to_provide_reachability_status + Scenario: Unable to provide roaming 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 associated to a different phoneNumber + Given a valid devicestatus request body + And the request body property "$.device" refers to an unknown network + When the request "getRoamingStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNABLE_TO_PROVIDE_ROAMING_STATUS" + And the response property "$.message" contains a user friendly text + + @device_roaming_status_11_deviceStatus_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 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 "getRoamingStatus" is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNSUPPORTED_DEVICE_IDENTIFIERS" + And the response property "$.message" contains a user friendly text From fab582fa9ca61efa7261668f829d53ac43e7a9a6 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:26:44 +0530 Subject: [PATCH 13/18] Update device-reachability-status.feature --- .../device-reachability-status.feature | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 4338a822..0206841e 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -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" @@ -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" @@ -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" @@ -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 @@ -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 @@ -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" @@ -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 @@ -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 @@ -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 From 0b7311c3b363b1f5726752cec1434f1e5e6be71d Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:40:47 +0530 Subject: [PATCH 14/18] Update device-reachability-status.feature --- code/Test_definitions/device-reachability-status.feature | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 0206841e..bfd3e95d 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -98,8 +98,9 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi @device_reachability_status_08_deviceStatus_inconsistent_access_token Scenario: Inconsistent access token context for the device # To test this, a token has to be obtained for a different device - Given a valid devicestatus request body with token from different device - And the request body property "$.device" is set to appropriate value + Given a valid devicestatus request body + And the request body property "$.device" is set to a valid testing device supported by the service + And header "Authorization" set to access token referring different device When the request "getReachabilityStatus" is sent Then the response status code is 403 And the response property "$.status" is 403 From c141d3a9cd32efe6c3fc8985b5e8577c175fbbd8 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:47:29 +0530 Subject: [PATCH 15/18] Update device-reachability-status.feature --- code/Test_definitions/device-reachability-status.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index bfd3e95d..2b139b53 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -141,7 +141,7 @@ Feature: CAMARA Device reachability status API, v0.6.0 - Operations for reachabi @device_reachability_status_12_unsupported_device_identifiers Scenario: Unsupported device identifiers Given a valid devicestatus request body - And the request body property "$.device" set to unsupported identifiers value by the service + And the request body property "$.device" set to unsupported identifiers value for the service When the request "getReachabilityStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 From 72c35dca5db80fd34d895805d783d4a24fab2d9e Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:49:52 +0530 Subject: [PATCH 16/18] Update device-roaming-status.feature --- .../device-roaming-status.feature | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index fc29ec1e..b452e61f 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -15,7 +15,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_01_roaming_status_true Scenario: Check the roaming status when device is in the roaming mode - 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 "getRoamingStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" @@ -28,7 +29,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_02_roaming_status_false Scenario: Check the roaming state synchronously if the device is not in the roaming mode - 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 "getRoamingStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" @@ -51,7 +53,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_04_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 "getRoamingStatus" is sent Then the response status code is 401 And the response property "$.status" is 401 @@ -60,7 +63,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_05_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 "getRoamingStatus" is sent Then the response status code is 401 And the response property "$.status" is 401 @@ -69,8 +73,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_06_invalid_access_token Scenario: Invalid access token - Given a valid devicestatus request body and header "Authorization" set to an invalid access token - When the request "getRoamingStatus" is sent + Given a valid devicestatus request body + And header "Authorization" set to an invalid access token Then the response status code is 401 And the response header "Content-Type" is "application/json" And the response property "$.status" is 401 @@ -80,7 +84,9 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_07_deviceStatus_inconsistent_access_token Scenario: Inconsistent access token context for the device # To test this, a token has to be obtained for a different device - Given a valid subscription request body with "$.phoneNumber" and token from different device + Given a valid devicestatus request body + And the request body property "$.device" is set to a valid testing device supported by the service + And header "Authorization" set to access token referring different device When the request "getRoamingStatus" is sent Then the response status code is 403 And the response property "$.status" is 403 @@ -98,10 +104,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu And the response property "$.code" is "DEVICE_IDENTIFIERS_MISMATCH" And the response property "$.message" contains a user friendly text - @device_roaming_status_09_deviceStatus_not_applicable Scenario: Device roaming 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 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 "getRoamingStatus" is sent @@ -112,9 +116,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_10_deviceStatus_unable_to_provide_reachability_status Scenario: Unable to provide roaming 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 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 "getRoamingStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 @@ -123,9 +126,8 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_11_deviceStatus_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 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 + And the request body property "$.device" set to unsupported identifiers value for the service When the request "getRoamingStatus" is sent Then the response status code is 422 And the response property "$.status" is 422 From 2f21b29a7031f5f4a2908678037c2572e22d673f Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:12:07 +0530 Subject: [PATCH 17/18] Update device-reachability-status.feature --- code/Test_definitions/device-reachability-status.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Test_definitions/device-reachability-status.feature b/code/Test_definitions/device-reachability-status.feature index 2b139b53..094ac36e 100644 --- a/code/Test_definitions/device-reachability-status.feature +++ b/code/Test_definitions/device-reachability-status.feature @@ -16,7 +16,7 @@ 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 a valid devicestatus request body - And the request body property "$.device" is set to a valid testing device supported by the service + And the request body property "$.device" is set to a valid testing device which is connected with sms and 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" @@ -30,7 +30,7 @@ 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 - And the request body property "$.device" is set to a valid testing device supported by the service + And the request body property "$.device" is set to a valid testing device which is connected with data and 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" @@ -43,7 +43,7 @@ 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 - And the request body property "$.device" is set to a valid testing device supported by the service + And the request body property "$.device" is set to a valid testing device which is not connected and 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" From a0b69c66504a993ff04e8e3a6a4e6decfa633230 Mon Sep 17 00:00:00 2001 From: mdomale <125565716+mdomale@users.noreply.github.com> Date: Fri, 30 Aug 2024 16:13:43 +0530 Subject: [PATCH 18/18] Update device-roaming-status.feature --- code/Test_definitions/device-roaming-status.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/Test_definitions/device-roaming-status.feature b/code/Test_definitions/device-roaming-status.feature index b452e61f..99aa8cb8 100644 --- a/code/Test_definitions/device-roaming-status.feature +++ b/code/Test_definitions/device-roaming-status.feature @@ -16,7 +16,7 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_01_roaming_status_true Scenario: Check the roaming status when device is in the roaming mode Given a valid devicestatus request body - And the request body property "$.device" is set to a valid testing device supported by the service + And the request body property "$.device" is set to a valid testing device which is in roaming and supported by the service When the request "getRoamingStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json" @@ -30,7 +30,7 @@ Feature: CAMARA Device Roaming Status API, v0.6.0 - Operations for Roaming Statu @device_roaming_status_02_roaming_status_false Scenario: Check the roaming state synchronously if the device is not in the roaming mode Given a valid devicestatus request body - And the request body property "$.device" is set to a valid testing device supported by the service + And the request body property "$.device" is set to a valid testing device which is not in roaming and supported by the service When the request "getRoamingStatus" is sent Then the response code is 200 And the response header "Content-Type" is "application/json"