Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/Test_definitions/qos-profiles-getQosProfile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ Feature: CAMARA QoS Profiles API, vwip - Operation getQosProfile
# Testing assets:
# * The name of an existing QoS profile
#
# References to OAS spec schemas refer to schemas specifies in qos-profiles.yaml
# References to OAS spec schemas refer to schemas specified in qos-profiles.yaml

Background: Common getQosProfile setup
Given an environment at "apiRoot"
And the resource "/qos-profiles/vwip/qos-profiles/{name}"
And the header "Authorization" is set to a valid access token
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
And the path param "name" is set by default to a existing QoS profile name
And the path param "name" is set by default to an existing QoS profile name

# Success scenarios

@qos_profiles_getQosProfile_01_generic_success_scenario
Scenario: Common validations for any success scenario
# Valid testing device and default request body compliant with the schema
Given an existing QoS profile
And the path parameter "name" is set to the value for an that QoS profile
And the path parameter "name" is set to the value for that QoS profile
When the request "getQosProfile" 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"
And each item of the the response array complies with the OAS schema at "/components/schemas/QosProfile"
And each item of the response array complies with the OAS schema at "/components/schemas/QosProfile"
And the response property "$.name" value is equal to path param "name"
# TBC: Add additional constraints, such as max* properties must be higher than min* equivalent properties, etc

Expand Down Expand Up @@ -110,7 +110,7 @@ Feature: CAMARA QoS Profiles API, vwip - Operation getQosProfile
# Generic 404 errors

@qos_profiles_getQosProfile_404.1_not_found
Scenario: name of a no existing QoS profile
Scenario: name of a non-existing QoS profile
Given the path parameter "name" is set to a random string compliant with the pattern
When the request "getQosProfile" is sent
Then the response status code is 404
Expand Down
16 changes: 8 additions & 8 deletions code/Test_definitions/qos-profiles-retrieveQoSProfiles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: CAMARA QoS Profiles API, vwip - Operation retrieveQoSProfiles
# * If some QoS Profile is restricted for some devices, provide the QoS profile name and device
# * A device object identifying a device commercialized by the implementation for which the service is not applicable, if any

# References to OAS spec schemas refer to schemas specifies in qos-profiles.yaml
# References to OAS spec schemas refer to schemas specified in qos-profiles.yaml

Background: Common retrieveQoSProfiles setup
Given an environment at "apiRoot"
Expand All @@ -32,7 +32,7 @@ Feature: CAMARA QoS Profiles API, vwip - Operation retrieveQoSProfiles
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"
And each item of the the response array, if any, complies with the OAS schema at "/components/schemas/QosProfile"
And each item of the response array, if any, complies with the OAS schema at "/components/schemas/QosProfile"
# TBC: Add additional constraints, such as max* properties must be higher than min* equivalent properties, etc

@qos_profiles_retrieveQoSProfiles_02_filter_by_name_only
Expand All @@ -54,8 +54,8 @@ Feature: CAMARA QoS Profiles API, vwip - Operation retrieveQoSProfiles
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"
And each item of the the response array, if any, complies with the OAS schema at "/components/schemas/QosProfile"
And each item of the the response array, if any, has property "$[*].status" equal to <status>
And each item of the response array, if any, complies with the OAS schema at "/components/schemas/QosProfile"
And each item of the response array, if any, has property "$[*].status" equal to <status>

Examples:
| status |
Expand All @@ -72,8 +72,8 @@ Feature: CAMARA QoS Profiles API, vwip - Operation retrieveQoSProfiles
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"
And each item of the the response array complies with the OAS schema at "/components/schemas/QosProfile"
And the restricted QoS Profiles is returned in the response
And each item of the response array complies with the OAS schema at "/components/schemas/QosProfile"
And the restricted QoS Profiles are returned in the response

@qos_profiles_retrieveQoSProfiles_05_not_return_restricted_profiles
Scenario: Do not return restricted QoS Profiles restricted to certain devices
Expand All @@ -84,11 +84,11 @@ Feature: CAMARA QoS Profiles API, vwip - Operation retrieveQoSProfiles
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"
And each item of the the response array complies with the OAS schema at "/components/schemas/QosProfile"
And each item of the response array complies with the OAS schema at "/components/schemas/QosProfile"
And no restricted QoS Profile is included in the response

@qos_profiles_retrieveQoSProfiles_06_device_qos_profiles_not_found
Scenario: Device has not QoS profiles associated
Scenario: Device has no QoS profiles associated
Given a device for which the service is not applicable, provided in the request body or identified by the access token
When the request "retrieveQoSProfiles" is sent
Then the response status code is 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: CAMARA QoS Provisioning API, vwip - Operation getQosAssignmentByDevice

Background: Common getQosAssignmentByDevice setup
Given an environment at "apiRoot"
And the resource "/qos-provisioning/vwip/retrieve-qos-assignment" |
And the resource "/qos-provisioning/vwip/retrieve-qos-assignment"
And the header "Content-Type" is set to "application/json"
# Unless indicated otherwise the QoS assignment must be created by the same API client given in the access token
And the header "Authorization" is set to a valid access token granted to the same client that created the QoS assignment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: CAMARA QoS Provisioning API, vwip - Operation getQosAssignmentById

Background: Common getQosAssignmentById setup
Given an environment at "apiRoot"
And the resource "/qos-provisioning/vwip/qos-assignments/{assignmentId}" |
And the resource "/qos-provisioning/vwip/qos-assignments/{assignmentId}"
# Unless indicated otherwise the QoS assignment must be created by the same API client given in the access token
And the header "Authorization" is set to a valid access token granted to the same client that created the QoS assignment
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
Expand Down Expand Up @@ -127,7 +127,7 @@ Feature: CAMARA QoS Provisioning API, vwip - Operation getQosAssignmentById
# Errors 404

@qos_provisioning_getQosAssignmentById_404.1_not_found
Scenario: assignmentId of a no existing QoS assignment
Scenario: assignmentId of a non-existing QoS assignment
Given the path parameter "assignmentId" is set to a random UUID
When the request "getQosAssignmentById" is sent
Then the response status code is 404
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Feature: CAMARA QoS Provisioning API, vwip - Operation revokeQosAssignment
Scenario: Invalid Argument. Generic Syntax Exception
Given the path parameter "assignmentId" has not a UUID format
When the request "revokeQosAssignment" is sent
Then the response status code is 404
Then the response status code is 400
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.status" is 400
Expand Down Expand Up @@ -165,7 +165,7 @@ Feature: CAMARA QoS Provisioning API, vwip - Operation revokeQosAssignment
# Errors 404

@qos_provisioning_revokeQosAssignment_404.1_not_found
Scenario: assignmentId of a no existing QoS assignment
Scenario: assignmentId of a non-existing QoS assignment
Given the path parameter "assignmentId" is set to a random UUID
When the request "revokeQosAssignment" is sent
Then the response status code is 404
Expand Down
12 changes: 6 additions & 6 deletions code/Test_definitions/quality-on-demand-createSession.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession
# * A device object identifying a device commercialized by the implementation for which the service is not applicable, if any.
#

# References to OAS spec schemas refer to schemas specifies in quality-on-demand.yaml
# References to OAS spec schemas refer to schemas specified in quality-on-demand.yaml

Background: Common createSession setup
Given an environment at "apiRoot"
Expand Down Expand Up @@ -229,7 +229,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession

# The maximum is considered in the schema so a generic schema validator may fail and generate a 400 INVALID_ARGUMENT without further distinction,
# and both could be accepted
@quality_on_demand_createSession_400.6_out_of_range_port
@quality_on_demand_createSession_400.5_out_of_range_port
Scenario Outline: Out of range port
Given the request body property "<port_property>" is set to a value not between between 0 and 65535
When the request "createSession" is sent
Expand All @@ -251,7 +251,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession
| $.applicationServerPorts.ports[*] |

# PLAIN and REFRESHTOKEN are considered in the schema so INVALID_ARGUMENT is not expected
@quality_on_demand_createSession_400.7_invalid_sink_credential
@quality_on_demand_createSession_400.6_invalid_sink_credential
Scenario Outline: Invalid credential
Given the request body property "$.sinkCredential.credentialType" is set to "<unsupported_credential_type>"
When the request "createSession" is sent
Expand All @@ -269,7 +269,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession

# Only "bearer" is considered in the schema so a generic schema validator may fail and generate a 400 INVALID_ARGUMENT without further distinction,
# and both could be accepted
@quality_on_demand_createSession_400.8_sink_credential_invalid_token
@quality_on_demand_createSession_400.7_sink_credential_invalid_token
Scenario: Invalid token
Given the request body property "$.sinkCredential.accessTokenType" is set to a value other than "bearer"
When the request "createSession" is sent
Expand All @@ -280,7 +280,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession
And the response property "$.code" is "INVALID_TOKEN" or "INVALID_ARGUMENT"
And the response property "$.message" contains a user friendly text

@quality_on_demand_createSession_400.9_non_existent_qos_profile
@quality_on_demand_createSession_400.8_non_existent_qos_profile
Scenario: Error response for invalid qos profile in request body
Given the request body property "qosProfile" is set to a non existent qos Profile
When the request "createSession" is sent
Expand All @@ -291,7 +291,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation createSession
And the response property "$.code" is "INVALID_ARGUMENT"
And the response property "$.message" contains a user friendly text

@quality_on_demand_createSession_400.10_invalid_duration
@quality_on_demand_createSession_400.9_invalid_duration
Scenario: Error response when duration is not valid for selected qos profile
Given the request body property "duration" is set to an invalid duration for the selected qosProfile
When the request "createSession" is sent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation deleteSession
# * The sessionId of an existing session with status "AVAILABLE", and with provided values for "sink" and "sinkCredential".
# * The sessionId of an existing session with status "UNAVAILABLE", and with provided values for "sink" and "sinkCredential".
#
# References to OAS spec schemas refer to schemas specifies in quality-on-demand.yaml
# References to OAS spec schemas refer to schemas specified in quality-on-demand.yaml

Background: Common deleteSession setup
Given an environment at "apiRoot"
Expand Down Expand Up @@ -125,7 +125,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation deleteSession
# Errors 404

@quality_on_demand_deleteSession_404.1_not_found
Scenario: sessionId of a no existing QoS session
Scenario: sessionId of a non-existing QoS session
Given the path parameter "sessionId" is set to a random UUID
When the request "deleteSession" is sent
Then the response status code is 404
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation extendQosSessionDuration
# * The sessionId of an existing session with qosStatus "AVAILABLE"
# * The sessionId of an existing session with qosStatus "UNAVAILABLE"
#
# References to OAS spec schemas refer to schemas specifies in quality-on-demand.yaml
# References to OAS spec schemas refer to schemas specified in quality-on-demand.yaml

Background: Common extendQosSessionDuration setup
Given an environment at "apiRoot"
Expand Down Expand Up @@ -62,7 +62,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation extendQosSessionDuration

@quality_on_demand_extendQosSessionDuration_400.1_schema_not_compliant
Scenario: Invalid Argument. Generic Syntax Exception
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/extendQosSessionDuration"
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/ExtendSessionDuration"
When the request "extendQosSessionDuration" is sent
Then the response status code is 400
And the response header "x-correlator" has same value as the request header "x-correlator"
Expand Down Expand Up @@ -170,7 +170,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation extendQosSessionDuration
# Errors 404

@quality_on_demand_extendQosSessionDuration_404.1_not_found
Scenario: sessionId of a no existing QoS session
Scenario: sessionId of a non-existing QoS session
Given the path parameter "sessionId" is set to a random UUID
And the request body is set to a valid request body
When the request "extendQosSessionDuration" is sent
Expand Down
6 changes: 3 additions & 3 deletions code/Test_definitions/quality-on-demand-getSession.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation getSession
# Testing assets:
# * The sessionId of an existing QoS session, and the request properties used for createSession
#
# References to OAS spec schemas refer to schemas specifies in quality-on-demand.yaml
# References to OAS spec schemas refer to schemas specified in quality-on-demand.yaml

Background: Common getSession setup
Given an environment at "apiRoot"
Expand Down Expand Up @@ -49,7 +49,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation getSession
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/SessionInfo"
And the response property "$.status" is "UNAVAILABLE"
And the response property "$.qosStatus" is "UNAVAILABLE"

# Errors 400

Expand Down Expand Up @@ -130,7 +130,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation getSession
# Errors 404

@quality_on_demand_getSession_404.1_not_found
Scenario: sessionId of a no existing QoS session
Scenario: sessionId of a non-existing QoS session
Given the path parameter "sessionId" is set to a random UUID
When the request "getSession" is sent
Then the response status code is 404
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation retrieveSessionsByDevice
# * A device object applicable for Quality On Demand service with NO QoS Sessions associated
# * A device object identifying a device commercialized by the implementation for which the service is not applicable, if any.
#
# References to OAS spec schemas refer to schemas specifies in quality-on-demand.yaml
# References to OAS spec schemas refer to schemas specified in quality-on-demand.yaml

Background: Common retrieveSessionsByDevice setup
Given an environment at "apiRoot"
Expand Down Expand Up @@ -141,7 +141,7 @@ Feature: CAMARA Quality On Demand API, vwip - Operation retrieveSessionsByDevice

@quality_on_demand_retrieveSessionsByDevice_400.1_schema_not_compliant
Scenario: Invalid Argument. Generic Syntax Exception
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/retrieveSessionsByDevice"
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/RetrieveSessionsInput"
When the request "retrieveSessionsByDevice" is sent
Then the response status code is 400
And the response header "x-correlator" has same value as the request header "x-correlator"
Expand Down