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

Remove the so-called "pointless" tests from Api.TypesSpec. #3523

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented Oct 4, 2022

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.

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.
@jonathanknowles jonathanknowles marked this pull request as ready for review October 4, 2022 02:27
@jonathanknowles jonathanknowles self-assigned this Oct 4, 2022
Copy link
Contributor

@piotr-iohk piotr-iohk left a 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.

@jonathanknowles
Copy link
Member Author

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]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 4, 2022

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"}

@Anviking
Copy link
Member

Anviking commented Oct 4, 2022

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 4, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit 3ab6c4d into master Oct 4, 2022
@iohk-bors iohk-bors bot deleted the jonathanknowles/remove-pointless-tests branch October 4, 2022 14:25
WilliamKingNoel-Bot pushed a commit that referenced this pull request Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants