-
Notifications
You must be signed in to change notification settings - Fork 217
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
Remove the so-called "pointless" tests from Api.TypesSpec
.
#3523
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's not clear what value these tests provide. Of course, they do allow us to artificially increase our coverage from the point of view of the code coverage checker. But it's not clear why we should want to do this. Moreover, artificially increasing the coverage score in this way may hide real gaps in test coverage: because of these "pointless" tests, our code coverage report currently can't tell us which types are really exercised by our test suite, and which are not. Additionally, the set of types tested here is incomplete: many newer types were never added to the list. If we really need to have this kind of test, then instead of maintaining these test definitions manually (a process that is error prone, requires a lot of boilerplate, and increases review overhead), it would be better to generate them automatically: then we can automatically cover all types used in the API, rather than just an subset. However, if our goal is to reach 100% coverage of all API record field accessors, perhaps it would be better to focus our efforts on writing meaningful tests that actually stimulate the API.
Anviking
approved these changes
Oct 4, 2022
piotr-iohk
approved these changes
Oct 4, 2022
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.
Fair enough.
On the side note, it would be good to actually revive code coverage report to be published.
bors r+ |
iohk-bors bot
added a commit
that referenced
this pull request
Oct 4, 2022
3523: Remove the so-called "pointless" tests from `Api.TypesSpec`. r=jonathanknowles a=jonathanknowles ## Issue Number None. ## Description This PR removes the so-called "pointless" tests from `Api.TypesSpec`. ## Justification It's not clear what real value these tests provide, if any. Of course, they do allow us to artificially increase our coverage from the point of view of the code coverage checker. But it's not clear why we should want to do this. Moreover, artificially increasing the coverage score in this way may hide real gaps in test coverage: because of these "pointless" tests, our code coverage report currently can't tell us which types are really exercised by our test suite, and which are not. Additionally, the set of types tested here is **_incomplete_**: many newer types were never added to the list. If we really need to have this kind of test, then instead of maintaining these test definitions manually (a process that is error prone, requires a lot of boilerplate, and increases review overhead), it would be better to generate them automatically: then we can automatically cover all types used in the API, rather than just an subset. However, if our goal is to reach 100% coverage of all API record field accessors, perhaps it would be better to focus our efforts on writing meaningful tests that actually stimulate the API. 3524: Document minimum UTxO behaviour in OpenAPI specification. r=jonathanknowles a=jonathanknowles ## Issue Number ADP-2250 ## Description This PR adds documentation to the OpenAPI specification to describe how the wallet software handles minimum UTxO values. Co-authored-by: Jonathan Knowles <[email protected]>
This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried. Additional information: {"message":"Required status check \"docs\" is expected.","documentation_url":"https://docs.github.com/articles/about-protected-branches"} |
bors r+ |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue Number
None.
Description
This PR removes the so-called "pointless" tests from
Api.TypesSpec
.Justification
It's not clear what real value these tests provide, if any.
Of course, they do allow us to artificially increase our coverage from the point of view of the code coverage checker. But it's not clear why we should want to do this.
Moreover, artificially increasing the coverage score in this way may hide real gaps in test coverage: because of these "pointless" tests, our code coverage report currently can't tell us which types are really exercised by our test suite, and which are not.
Additionally, the set of types tested here is incomplete: many newer types were never added to the list.
If we really need to have this kind of test, then instead of maintaining these test definitions manually (a process that is error prone, requires a lot of boilerplate, and increases review overhead), it would be better to generate them automatically: then we can automatically cover all types used in the API, rather than just an subset.
However, if our goal is to reach 100% coverage of all API record field accessors, perhaps it would be better to focus our efforts on writing meaningful tests that actually stimulate the API.