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

Audit: PDM-003 - Test Coverage #265

Closed
ashneverdawn opened this issue Jul 5, 2023 · 1 comment · Fixed by #316
Closed

Audit: PDM-003 - Test Coverage #265

ashneverdawn opened this issue Jul 5, 2023 · 1 comment · Fixed by #316
Assignees

Comments

@ashneverdawn
Copy link
Contributor

ashneverdawn commented Jul 5, 2023

The current test coverage of the orml-currencies-allowance-extension pallet is insufficient, with only 22.22% coverage. Moreover, the implementation of ChainExtension in the runtime lacks any test coverage.

ID PDM-003
Scope Code Quality / Testing
Status New

Description
To evaluate the test coverage, we recommend using the cargo tarpaulin command:

cargo tarpaulin --out Html --output-dir ./tarpaulin-report

Running this command generates an HTML file that provides detailed coverage information for all packages. Specifically, it highlights the orml-currencies-allowance-extension pallet, which currently has a coverage of only 22.22%. Additionally, it reveals the absence of tests for the methods utilized in the runtime to implement ChainExtension , including is_allowed_currency , allowance , do_approve_transfer , and do_transfer_approved , as well as the lack of testing for the overall ChainExtension implementation in the
foucoco runtime.

Recommendation
To address the low test coverage in the orml-currencies-allowance-extension pallet and the lack of test coverage in the runtime implementation of ChainExtension , it is essential to develop a comprehensive test suite. This suite should include thorough testing to ensure the security, stability, and maintainability of the project.
Implementing continuous integration (CI) systems to automate the execution of the test suite is highly recommended. This practice enables the team to identify areas with insufficient test coverage, detect regressions, and uncover areas that require improvement. By incorporating CI into the development workflow, valuable feedback is obtained, ultimately enhancing the overall quality of the codebase.

@vadaynujra
Copy link

Hey team! Please add your planning poker estimate with Zenhub @ashneverdawn @ebma @TorstenStueber

@ebma ebma self-assigned this Sep 13, 2023
@ebma ebma linked a pull request Oct 5, 2023 that will close this issue
@ebma ebma closed this as completed in #316 Oct 20, 2023
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 a pull request may close this issue.

3 participants