Skip to content

test(sdk): comprehensive coverage boost for iota-sdk-types and iota-sdk-crypto #596

Open
abhiraj-mengade wants to merge 1 commit intoiotaledger:developfrom
abhiraj-mengade:feature/test-coverage-improvements
Open

test(sdk): comprehensive coverage boost for iota-sdk-types and iota-sdk-crypto #596
abhiraj-mengade wants to merge 1 commit intoiotaledger:developfrom
abhiraj-mengade:feature/test-coverage-improvements

Conversation

@abhiraj-mengade
Copy link
Contributor

@abhiraj-mengade abhiraj-mengade commented Feb 16, 2026

Summary

This PR significantly improves test coverage across the core SDK crates, specifically targeting iota-sdk-types and iota-sdk-crypto with an overall ~5.1% increase. ~109 new unit tests** were added, providing comprehensive validation for multisig verification, transaction effects, and cryptographic logic.

📈 Coverage Impact

Scope / Crate Base This PR Net Improvement
iota-sdk-types ~68.9% ~80.5% +11.6%
iota-sdk-crypto ~96.2% ~97.1% +0.9%
Targeted Area ~87.0% ~92.1% +5.1%

(Note: iota-sdk-crypto has a high baseline due to large generated constant files, but critical logical components like multisig saw massive improvements from 0% to ~75%)

Key Module Improvements

  • Multisig (iota-sdk-crypto/multisig.rs): 0%75.1% — Fully covered threshold validation, signature aggregation, and bitmap logic.
  • Framework (iota-sdk-types/framework.rs): 0%100% — Complete coverage for Coin structs and object conversions.
  • IOTA Names (iota_names modules): ~0%~93% — Covered registry, configuration, and name record expiration logic.
  • Transaction Effects (effects/mod.rs): ~60%92% — Added exhaustive accessor tests for transaction effects.
  • Gas Logic (gas.rs): ~30%95% — Added comprehensive tests for GasCostSummary computation.

🛠 Changes Overview

iota-sdk-types Improvements

  • Core Logic: Added unit tests for framework.rs (Coin), gas.rs, and iota_names specific logic.
  • Transaction Effects: Implemented tests for TransactionEffects enum accessors in effects/mod.rs and v1.rs.
  • Serialization: Enhanced coverage for NameRecord serialization in iota_names/registry.rs.
  • Utilities: Added missing tests for hash.rs address derivation (zkLogin, etc.) and move_package.rs upgrade policies.

iota-sdk-crypto Improvements

  • Multisig: Implemented robust tests for MultisigVerifier, bitmap operations, and public key aggregation.
  • Cryptographic Primitives: Added tests for bls12381 (+42%), ed25519 (+45%), secp256k1 (+43%), and secp256r1 (+43%).
  • ZKLogin: Maintained high coverage (~82%) while verifying new helper functions.

✅ Verification

All tests passed with --all-features:

test result: ok. 498 passed; 0 failed; 0 ignored; finished in 76.14s

Closes #504

@abhiraj-mengade abhiraj-mengade requested a review from a team as a code owner February 16, 2026 20:38
@abhiraj-mengade abhiraj-mengade changed the title test(sdk): improve test coverage for core types and crypto test(sdk): comprehensive coverage boost for iota-sdk-types and iota-sdk-crypto Feb 16, 2026
@abhiraj-mengade abhiraj-mengade force-pushed the feature/test-coverage-improvements branch 6 times, most recently from 8e49e42 to d1b67c4 Compare February 17, 2026 04:52
Achieved a total coverage improvement of +5.10% across the targeted crates.

Breakdown by Crate:
- `iota-sdk-types`: Increased by ~11.6% (from ~68.9% to 80.5%).
- `iota-sdk-crypto`: Increased by ~0.9% (from ~96.2% to 97.1%).

Total Impact:
- Combined Coverage: 92.1% (+5.1%).
- Net New Covered Lines: +2,418.
@abhiraj-mengade abhiraj-mengade force-pushed the feature/test-coverage-improvements branch from d1b67c4 to 4b0417a Compare February 17, 2026 04:54
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.

[Bounty] Increase test coverage by 5%

1 participant