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

Code coverage audit, rework to obtain coverage w/o large E2E tests #1497

Open
Tracked by #2532
cwgoes opened this issue Jun 2, 2023 · 6 comments
Open
Tracked by #2532

Code coverage audit, rework to obtain coverage w/o large E2E tests #1497

cwgoes opened this issue Jun 2, 2023 · 6 comments
Assignees
Labels

Comments

@cwgoes
Copy link
Contributor

cwgoes commented Jun 2, 2023

A lot of our coverage is provided by two large E2E tests (MASP & ledger transactions), which should be mostly replaced with / supplanted by unit / prop tests with proper mocks so that we can reach sufficient coverage.

@cwgoes cwgoes changed the title Code coverage audit Code coverage audit, rework to obtain coverage w/o large E2E tests Jun 2, 2023
@tzemanovic
Copy link
Member

to my knowledge make test-unit-coverage skips e2e

@cwgoes
Copy link
Contributor Author

cwgoes commented Jun 5, 2023

Hmm - in that case @batconjurer or @mariari can you clarify the concern here?

@tzemanovic
Copy link
Member

I agree that MASP should have unit / integration / prop tests. There's nothing to catch issues in it besides e2e tests and the lack of these tests is being a serious issue for the more complex integrations

@cwgoes cwgoes added the pre-mainnet Must happen before mainnet. label Feb 5, 2024
@cwgoes cwgoes mentioned this issue Feb 6, 2024
6 tasks
@brentstone brentstone added this to the Phase 1: mainnet genesis milestone Apr 10, 2024
@brentstone
Copy link
Collaborator

@tzemanovic @batconjurer @Fraccaman how relevant is this issue still?

@Fraccaman
Copy link
Member

I think coverage is still low especially for MASP.

@tzemanovic
Copy link
Member

tzemanovic commented Aug 27, 2024

I went through coverage report from #3704: https://app.codecov.io/gh/anoma/namada/pull/3704/tree/crates

In our crates, the least coverage comes from sdk (14466 missed lines), node (6593 lines), ibc (2186), apps_lib (2011). I think we can improve the coverage a lot in these if we include integration tests, which should be possible (WIP in #3704).

Specific section that need attention:

  • account
    • auth & storage mods
    • priority: medium
  • ibc
    • lib - a lot of the ibc functionality is only tested in e2e
    • priority: medium
  • node
    • shell/governance.rs - should also be able to move this into governance crate now
    • priority: medium
  • sdk
    • masp - can we also move it (with shielded-sync sub-mod) into shielded_token?
    • priority: high
  • shielded_token
    • vp & validation mods
    • priority: high
  • token - done in Add test coverage on token transfer struct #3709
    • Transfer methods
    • priority: high
  • tx
    • a lot of functionality inside the types mod is not covered
    • it also looks like the types mod contains too much uncategorized logic that should be refactored
    • priority: high

@Fraccaman Fraccaman pinned this issue Aug 28, 2024
@cwgoes cwgoes unpinned this issue Aug 29, 2024
@Fraccaman Fraccaman pinned this issue Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants