diff --git a/code/Test_definitions/call-forwarding-signal-every-forwarding.feature b/code/Test_definitions/call-forwarding-signal-every-forwarding.feature index 8a49fbe..e805f3f 100644 --- a/code/Test_definitions/call-forwarding-signal-every-forwarding.feature +++ b/code/Test_definitions/call-forwarding-signal-every-forwarding.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings +Feature: CAMARA Call Fowarwing Signal API, v1.0.0 - Operation call-forwardings # Input to be provided by the implementation to the tester # # Implementation indications: @@ -17,24 +17,34 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings # Happy path scenarios # This first scenario serves as a minimum - @call_forwarding_signal_01_generic_success_scenario - Scenario: Common validations for any success scenario + @call_forwarding_signal_01_generic_success_scenario_2-legs + Scenario: Common validations for any success scenario with 2-legs authentication # Valid testing default request body compliant with the schema Given the request body property "$.phoneNumber" is set to a valid phone number supported by the service And the request body is set to a valid request body - And "login_hint" is valorised as "$.phoneNumber" When the HTTP "POST" request is sent Then the response status 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" # The response has to comply with the generic response schema which is part of the spec - And the response body complies with the OAS schema at "/components/schemas/UnconditionalCallForwardingSignal" + And the response body complies with the OAS schema at "/components/schemas/CallForwardingSignal" + + @call_forwarding_signal_01.1_generic_success_scenario_3-legs + Scenario: Common validations for any success scenario with 3-legs authentication + # Valid testing default request body compliant with the schema + Given the request body is set to a valid request body + And the phone number is retrieved from "login_hint" + When the HTTP "POST" request is sent + Then the response status 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" + # The response has to comply with the generic response schema which is part of the spec + And the response body complies with the OAS schema at "/components/schemas/CallForwardingSignal" - #CFS inactive: phone number defined by phoneNumber and login_hint and the CFS status for the phone number is known by the network. - @call_forwarding_signal_02_call_forwarding_check_not_active_phoneNumber_login_hint - Scenario: retrieve the call forwarding service settings for a given phone number with no forwarding configured. The endpoint is invoked with phoneNumber valorised with the same value of login_hint + #CFS inactive: phone number defined by phoneNumber (2-legs authentication) and the CFS status for the phone number is known by the network. + @call_forwarding_signal_02_call_forwarding_check_not_active_phoneNumber + Scenario: retrieve the call forwarding service settings for a given phone number with no forwarding configured. The endpoint is invoked with phoneNumber properly valorised Given the request body property "$.phoneNumber" is set to a valid phone number for which the call forwarding service status could be retrieved - And "login_hint" is valorised as "$.phoneNumber" And the request body is set to a valid request body When the HTTP "POST" request is sent Then the response status code is 200 @@ -42,7 +52,7 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings And the response header "x-correlator" has same value as the request header "x-correlator" And the response body is a string with the value "inactive" - #CFS inactive: phone number defined by login_hint and the CFS status for the phone number is known by the network. phoneNumber not valorised + #CFS inactive: phone number defined by login_hint (3-legs authentication) and the CFS status for the phone number is known by the network. phoneNumber not valorised @call_forwarding_signal_03_call_forwarding_check_not_active_login_hint Scenario: retrieve the call forwarding service settings for a given phone number with call forwarding configured. The endpoint is invoked without a value for phoneNumber and login_hint is used to carry the phone number. Given the request body property "$.phoneNumber" is not valorised @@ -54,11 +64,10 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings And the response header "x-correlator" has same value as the request header "x-correlator" And the response body is a string with the value "inactive" - #CFS active: phone number defined by phoneNumber and login_hint and the CFS status for the phone number is known by the network. - @call_forwarding_signal_04_call_forwarding_check_active_phoneNumber_login_hint - Scenario: retrieve the call forwarding service settings for a given phone number with call forwarding configured. The endpoint is invoked with phoneNumber valorised with the same value of login_hint + #CFS active: phone number defined by phoneNumber (2-legs authentication) and the CFS status for the phone number is known by the network. + @call_forwarding_signal_04_call_forwarding_check_active_phoneNumber + Scenario: retrieve the call forwarding service settings for a given phone number with call forwarding configured. The endpoint is invoked with phoneNumber properly valorised Given the request body property "$.phoneNumber" is set to a valid phone number for which the call forwarding service status could be retrieved - And "login_hint" is valorised as "$.phoneNumber" And the request body is set to a valid request body When the HTTP "POST" request is sent Then the response status code is 200 @@ -66,7 +75,7 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings And the response header "x-correlator" has same value as the request header "x-correlator" And the response body is an array of strings with the possibile values ["unconditional", "conditional_no_reply", "conditional_unavailable", "conditional_busy"] - #CFS active: phone number defined by login_hint and the CFS status for the phone number is known by the network. phoneNumber not valorised + #CFS active: phone number defined by login_hint (3-legs authentication) and the CFS status for the phone number is known by the network. phoneNumber not valorised @call_forwarding_signal_05_call_forwarding_check_active_login_hint Scenario: retrieve the call forwarding service settings for a given phone number with call forwarding configured. The endpoint is invoked without a value for phoneNumber and login_hint is used to carry the phone number. Given the request body property "$.phoneNumber" is not valorised @@ -171,15 +180,24 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings And the response property "$.code" is "UNSUPPORTED_MEDIA_TYPE" And the response property "$.message" contains a user friendly text - # Generic 422 error - phone number unavailable - @call_forwarding_signal_422.phone_number_unavailable - Scenario: The "phoneNumber" parameter is not included in the request and the phone number information cannot be derived from the 3-legged access token - Given "login_hint" is not providing the phone number - And the request body property "$.phoneNumber" is not valorised + # Generic 422 error - phone number unavailable or unnecessary + @call_forwarding_signal_422.phone_number_unavailable_2-legs + Scenario: The "phoneNumber" parameter is not included in the request + Given the request body property "$.phoneNumber" is not valorised When the HTTP "POST" request is sent Then the response status code is 422 And the response property "$.status" is 422 - And the response property "$.code" is "UNIDENTIFIABLE_DEVICE" + And the response property "$.code" is "MISSING_IDENTIFIER" + And the response property "$.message" contains a user friendly text + + @call_forwarding_signal_422.1.phone_number_unnecessary_3-legs + Scenario: The "phoneNumber" parameter is included in the request + Given the request body property "$.phoneNumber" is valorised + And "login_hint" is set to a properly formatted phone number + When the HTTP "POST" request is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNNECESSARY_IDENTIFIER" And the response property "$.message" contains a user friendly text # Generic 429 error - too many requests @@ -212,4 +230,4 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation call-forwardings Then the response status code is 501 And the response property "$.status" is 501 And the response property "$.code" is "NOT_IMPLEMENTED" - And the response property "$.message" contains a user friendly text + And the response property "$.message" contains a user friendly text \ No newline at end of file diff --git a/code/Test_definitions/call-forwarding-signal-unconditional.feature b/code/Test_definitions/call-forwarding-signal-unconditional.feature index 55d96a3..dcb9e99 100644 --- a/code/Test_definitions/call-forwarding-signal-unconditional.feature +++ b/code/Test_definitions/call-forwarding-signal-unconditional.feature @@ -1,4 +1,4 @@ -Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation unconditional-call-forwarding +Feature: CAMARA Call Fowarwing Signal API, v1.0.0 - Operation unconditional-call-forwarding # Input to be provided by the implementation to the tester # # Implementation indications: @@ -17,12 +17,23 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation unconditional-cal # Happy path scenarios # This first scenario serves as a minimum - @call_forwarding_signal_01_unconditional_generic_success_scenario - Scenario: Common validations for any success scenario + @call_forwarding_signal_01_unconditional_generic_success_scenario_2-legs + Scenario: Common validations for any success scenario with 2-legs authentication # Valid testing default request body compliant with the schema Given the request body property "$.phoneNumber" is set to a valid phone number supported by the service And the request body is set to a valid request body - And "login_hint" is valorised as "$.phoneNumber" + When the HTTP "POST" request is sent + Then the response status 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" + # The response has to comply with the generic response schema which is part of the spec + And the response body complies with the OAS schema at "/components/schemas/UnconditionalCallForwardingSignal" + + @call_forwarding_signal_01.1_generic_success_scenario_3-legs + Scenario: Common validations for any success scenario with 3-legs authentication + # Valid testing default request body compliant with the schema + Given the request body is set to a valid request body + And the phone number is retrieved from "login_hint" When the HTTP "POST" request is sent Then the response status code is 200 And the response header "Content-Type" is "application/json" @@ -30,12 +41,11 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation unconditional-cal # The response has to comply with the generic response schema which is part of the spec And the response body complies with the OAS schema at "/components/schemas/UnconditionalCallForwardingSignal" - # phone number defined by phoneNumber and login_hint and the CFS status for the phone number is known by the network. - @call_forwarding_signal_02_unconditional_phoneNumber_login_hint - Scenario: retrieve unconditional call forwarding settings for a given phone number. The endpoint is invoked with phoneNumber valorised with the same value of login_hint + # phone number defined by phoneNumber (2-legs authentication) and the CFS status for the phone number is known by the network. + @call_forwarding_signal_02_unconditional_phoneNumber + Scenario: retrieve unconditional call forwarding settings for a given phone number. The endpoint is invoked with phoneNumber properly valorised Given the request body property "$.phoneNumber" is set to a valid phone number supported by the service And the request body is set to a valid request body - And "login_hint" is valorised as "$.phoneNumber" When the HTTP "POST" request is sent Then the response status code is 200 And the response header "Content-Type" is "application/json" @@ -148,14 +158,23 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation unconditional-cal And the response property "$.message" contains a user friendly text # Generic 422 error - phone number unavailable - @call_forwarding_signal_422.phone_number_unavailable - Scenario: The "phoneNumber" parameter is not included in the request and the phone number information cannot be derived from the 3-legged access token - Given "login_hint" is not providing the phone number - And the request body property "$.phoneNumber" is not valorised + @call_forwarding_signal_422.phone_number_unavailable_2-legs + Scenario: The "phoneNumber" parameter is not included in the request + Given the request body property "$.phoneNumber" is not valorised When the HTTP "POST" request is sent Then the response status code is 422 And the response property "$.status" is 422 - And the response property "$.code" is "UNIDENTIFIABLE_DEVICE" + And the response property "$.code" is "MISSING_IDENTIFIER" + And the response property "$.message" contains a user friendly text + + @call_forwarding_signal_422.1.phone_number_unnecessary_3-legs + Scenario: The "phoneNumber" parameter is included in the request + Given the request body property "$.phoneNumber" is valorised + And "login_hint" is set to a properly formatted phone number + When the HTTP "POST" request is sent + Then the response status code is 422 + And the response property "$.status" is 422 + And the response property "$.code" is "UNNECESSARY_IDENTIFIER" And the response property "$.message" contains a user friendly text # Generic 429 error - too many requests @@ -177,4 +196,4 @@ Feature: CAMARA Call Fowarwing Signal API, v0.2.0 - Operation unconditional-cal Then the response status code is 429 And the response property "$.status" is 429 And the response property "$.code" is "TOO_MANY_REQUEST" - And the response property "$.message" contains a user friendly text + And the response property "$.message" contains a user friendly text \ No newline at end of file