Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Create API-Testing-Guidelines.md #117
Create API-Testing-Guidelines.md #117
Changes from 3 commits
aa3f2fd
57ef1a2
2cbf0da
cbfb886
b026270
0e98b46
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We should not impose one single .feature file per API, but one feature file per operation or API endpoint/resource. In general, it is not advisable to test several unrelated "API features" within the same .feature file. For closely related operations we may add scenarios in the same file testing crossed behaviour between several operations.
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.
@shilpa-padgaonkar following today Commonalities meeting I proposed to update this sentence but I'm not able to update the file. My proposal for line 25:
Granularity of the feature file must be decided at the project level but it is recommended to:
Perhaps @jlurien could provide a better wording. I think we're aligned.
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.
Where does this reference recommend having one file per API? APIs are not explicitly mentioned, but considering several files for specific parts is advised:
In the issue #94, another reference was mentioned. There, it is advised to:
So we should identify what are the "features" in the context of an API, and put a feature per file. To me a feature in this context is an API operation or resource. For simple APIs with single operations, it is quite straight-forward to decide that one file is enough, e.g. location-verification API, but for more complex APIs, such as QoD, we may need several files to test unrelated features, e.g. discovery of QoD profiles, creating QoD sessions, etc
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.
@jlurien The reference link for one feature per API is https://copyprogramming.com/howto/multiple-feature-inside-single-feature-file#multiple-feature-inside-single-feature-file @shilpa-padgaonkar
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.
@mdomale. In my understanding, the guidelines there does not advice for one feature per API but one "feature" per *.feature file. So that is what I suggest, to identify which are the "features" to test in the context of an API, and put each feature in each own *.feature file. Thus, an API may have several *.feature files for testing different aspects of the API. In simple APIs with just one endpoint that will not be the case.