-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial test plan #19
base: main
Are you sure you want to change the base?
Initial test plan #19
Conversation
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/TenureInfo" | ||
And the response property "$.tenureDateCheck" is true | ||
And if the response contains property "$.contractType" is one of ["PAYG", "PAYM", "Business"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if the response contains property "$.contractType" is one of ["PAYG", "PAYM", "Business"] | |
And if the response contains property "$.contractType", the value is one of ["PAYG", "PAYM", "Business"] |
And if the response contains property "$.contractType" is one of ["PAYG", "PAYM", "Business"] | ||
|
||
@checkTenure_2_tenure_check_false | ||
Scenario: Validate successful response when tenureDateCheck is true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scenario: Validate successful response when tenureDateCheck is true | |
Scenario: Validate successful response when tenureDateCheck is false |
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/TenureInfo" | ||
And the response property "$.tenureDateCheck" is false | ||
And if the response contains property "$.contractType" is one of ["PAYG", "PAYM", "Business"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if the response contains property "$.contractType" is one of ["PAYG", "PAYM", "Business"] | |
And if the response contains property "$.contractType", the value is one of ["PAYG", "PAYM", "Business"] |
Given the header "Authorization" is set to an expired access token | ||
When the HTTP "POST" request is sent | ||
Then the response status code is 401 | ||
And the response property "$.code" is "UNAUTHENTICATED" or "AUTHENTICATION_REQUIRED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that AUTHENTICATION_REQUIRED
is returned when the access token has expired (i.e. was once valid, but is no longer because its lifetime has expired), whereas UNAUTHENTICATED
is returned when the access token was either never valid, or has been "cancelled" for some other reason (e.g. token was reported stolen and thus voided).
But I agree that the API design guidelines are not at all clear on this point.
And the response property "$.code" is "UNAUTHENTICATED" or "AUTHENTICATION_REQUIRED" | |
And the response property "$.code" is "AUTHENTICATION_REQUIRED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's not very clear.. I opted for both since there is no consensus and other test plans have used different options. I think this way is a bit more flexible and we can always update it before the meta if there is a more clear path.
|
||
@checkTenure_401.2_invalid_access_token | ||
Scenario: Error response for invalid access token | ||
Given the header "Authorization" is set to an invalid access token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the header "Authorization" is set to an invalid access token | |
Given the header "Authorization" is set to an invalid access token which is invalid for reasons other than lifetime expiry |
@checkTenure_404.1_phone_number_not_found | ||
Scenario: Phone number not found | ||
Given the header "Authorization" is set to a valid access token from which the phone number cannot be deducted | ||
And the request body property "$.phoneNumber" is compliant with the schema but does not identify a valid subscription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the request body property "$.phoneNumber" is compliant with the schema but does not identify a valid subscription | |
And the request body property "$.phoneNumber" is compliant with the schema but does not identify a valid subscription managed by the API provider |
|
||
@checkTenure_422.1_service_not_applicable | ||
Scenario: Service not applicable for the phone number | ||
Given that service is not supported for all phone numbers commercialized by the operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"network operator" could also be replaced by "API provider"
Given that service is not supported for all phone numbers commercialized by the operator | |
Given that service is not supported for all phone numbers managed by the network operator |
See also C02-phoneNumber-errors.feature, which defines an additional test |
Thanks @eric-murray for the review. I've applied most of the suggestions and I have align the errors with the common artifact. I checked with Jose and the idea is that the common can be copy/pasted as it is modifying the minimum. cc: @GillesInnov35 |
Hi @GillesInnov35 @eric-murray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good _ some typos to be fixed
And the response property "$.code" is "INVALID_ARGUMENT" | ||
And the response property "$.message" contains a user friendly text | ||
|
||
@check_device_swap_400.3_out_of_range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy error - device swap --> checkTenure
|
||
# Only with a 3-legged access token | ||
@checkTenure_C02.03_unnecessary_phone_number | ||
Scenario: Phone number not to included when can be deducted from the access token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phone number "not to be included" or should not be included"
Thanks for the review @tanjadegroot Please @GillesInnov35 can you approve again? it got dismissed.. cc: @eric-murray |
hi @eric-murray @grgpapadopoulos according to @tanjadegroot, everything seems fine with the release PR, we just need to merge the test plan to complete the process. |
What type of PR is this?
Add one of the following kinds:
What this PR does / why we need it:
Include initial basic test plan for the API