Skip to content
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

Common artifacts for testing error scenarios for device and phoneNumber #325

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

jlurien
Copy link
Contributor

@jlurien jlurien commented Oct 24, 2024

What type of PR is this?

  • enhancement/feature
  • tests

What this PR does / why we need it:

Adds the first common artifacts, with scenarios that can be included in test plans for operations that receive an input with device and phoneNumber. They must be aligned with the guidelines in Commonalities and indicate a proper way to validate that guidelines are enforced by the implementation.

Each artifact is assigned a code number, e.g. C01, and within each artifact, each scenario is numbered with the artifact code "." scenario number, e.g. C01.01, plus a short description.

Which issue(s) this PR fixes:

Fixes #323

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

Changelog input

New common artifacts for test plans with operations that receive an input with `device` and `phoneNumber`. 

artifacts/testing/C01-device-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C01-device-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C01-device-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C01-device-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C02-phoneNumber-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C02-phoneNumber-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C02-phoneNumber-errors.feature Outdated Show resolved Hide resolved
Comment on lines 3 to 15
Common error scenarios for POST operations with device as input either in the request
body or implied from the access.

Artifact parameters (to be replaced by values according to the API operation):

- {{feature_identifier}}

This is not a complete feature but a collection of scenarios that can be applied
with minor modifications to test plans.

These scenarios assume that other properties not explicitly mentioned in the scenario
are set by default to a valid value. This can be specified in the feature Background.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can have more clearer feature description to let know what should be removed or replaced when using the templates. Mark the block to be removed when instantiating this feature file. Eg. $Hint_Start --to be removed { } $Hint_End .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this text has not to be copied, as it says "This is not a complete feature but a collection of scenarios that can be applied with minor modifications to test plans.". I formatted it as a Feature so Gherkin format is recognized by the IDE. If it is not understood in this way I may clarify it better.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jlurien Please clarify in more better way

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdomale, please review the new wording. Feel free to add any suggestions


# Error scenarios for management of input parameter device

# If the access token identifies a device, error 422 UNNECESSARY_DEVICE may be returned instead
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scenario details are not clear,if we expect 422 then we anticipate 422 being considered and written in below mentioned scenario where we see only 400.

Copy link
Contributor Author

@jlurien jlurien Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the misleading comment, here it should be 400

patrice-conil
patrice-conil previously approved these changes Nov 25, 2024
Copy link
Collaborator

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

PedroDiez
PedroDiez previously approved these changes Nov 27, 2024
Copy link
Collaborator

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mdomale
Copy link

mdomale commented Nov 28, 2024

@jlurien except above minor comments PR LGTM

@jlurien jlurien dismissed stale reviews from PedroDiez and patrice-conil via 9f05b73 December 4, 2024 16:53
@jlurien
Copy link
Contributor Author

jlurien commented Dec 5, 2024

@mdomale @PedroDiez @patrice-conil hi, you may need to approve again after the last commit to address remaining comment

PedroDiez
PedroDiez previously approved these changes Dec 5, 2024
Copy link
Collaborator

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor editorial

LGTM in advance

artifacts/testing/C02-phoneNumber-errors.feature Outdated Show resolved Hide resolved
artifacts/testing/C01-device-errors.feature Outdated Show resolved Hide resolved
Copy link
Collaborator

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mdomale
Copy link

mdomale commented Dec 6, 2024

LGTM

Copy link
Collaborator

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlurien
Copy link
Contributor Author

jlurien commented Dec 11, 2024

Hi @rartych, al past reviewers have given the LGTM. Please, double check if it is ready to be merged now. Thanks

Copy link
Collaborator

@rartych rartych left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rartych rartych merged commit 2afc51f into camaraproject:main Dec 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Artifact for test plan scenarios for device/phoneNumber errors
5 participants