Skip to content

feat: add contract coverage analysis#473

Merged
Nanle-code merged 1 commit into
Nanle-code:masterfrom
iammrjude:issue-367-contract-coverage-analysis
Jun 30, 2026
Merged

feat: add contract coverage analysis#473
Nanle-code merged 1 commit into
Nanle-code:masterfrom
iammrjude:issue-367-contract-coverage-analysis

Conversation

@iammrjude

Copy link
Copy Markdown
Contributor

Description

Adds Soroban contract coverage analysis for StarForge test runs, including function coverage, branch-path tracking, line-span coverage, coverage goals, report generation, visualization data, and CI workflow generation.

Closes #367

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

  • Expanded contract coverage analysis with function, line, and branch coverage tracking
  • Added branch detection for if, match, auth checks, assertions, and result propagation paths
  • Added coverage goals for overall, function, line, and branch coverage
  • Added HTML, JSON, Markdown, and text coverage report rendering
  • Added coverage visualization data for summary bars and function heatmaps
  • Added starforge test coverage flags for reports, thresholds, CI mode, and GitHub Actions workflow generation
  • Integrated coverage metadata into existing test runner and contract fixture framework
  • Added focused integration tests for coverage tracking, reporting, goals, and CI workflow output
  • Updated command reference documentation

Testing

How has this been tested?

Ran targeted validation before the final master sync:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
cargo check
cargo fmt --all -- --check
cargo clippy -- -D warnings
cargo test --test contract_coverage_analysis -- --nocapture
cargo test --test contract_testing_automation -- --nocapture
cargo test --test contract_testing_framework -- --nocapture

Test Coverage

  • Happy path: coverage report tracks covered Soroban contract functions
  • Edge cases: uncovered functions, partial branch coverage, and missed thresholds
  • Error handling: CI mode fails when configured coverage goals are not met

Code Quality Checklist

  • My code follows the style guidelines of this project (cargo fmt)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature works

Breaking Changes

None.

Documentation

  • README.md updated
  • DEVELOPER_GUIDE.md updated
  • API_REFERENCE.md updated
  • Command reference updated

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@iammrjude Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@iammrjude iammrjude marked this pull request as ready for review June 30, 2026 11:05
@Nanle-code Nanle-code merged commit fa51bd3 into Nanle-code:master Jun 30, 2026
2 of 12 checks passed
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.

D-30: Implement Contract Testing Coverage Analysis

2 participants