increase-coverage

Aggregate Dart/Flutter monorepo coverage artifacts and identify uncovered source lines.

803|85|Updated Nov 18, 2023
One-click install
npx skills add https://github.com/rodydavis/signals.dart --skill increase-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: increase-coverage
Source: https://github.com/rodydavis/signals.dart/tree/main/.agents/skills/increase-coverage
Command: npx skills add https://github.com/rodydavis/signals.dart --skill increase-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps teams systematically raise code coverage by running coverage across the monorepo, locating uncovered lines, and turning those gaps into meaningful tests rather than guesswork.

Core Features & Use Cases

  • Monorepo coverage execution and aggregation: Runs tests with coverage and merges per-package results into a unified lcov.info for consistent reporting.
  • Uncovered-line gap analysis: Extracts exact file paths and line numbers for statements not exercised by tests using a fast lcov.info query.
  • Coverage-focused test design strategies: Guides how to cover copyWith behaviors, equality/hashCode branches, complex conditionals, exception/catch paths, lifecycle error cases after dispose, and deep recursive collections.

Quick Start

Run melos run test to generate coverage outputs, then execute melos run coverage to aggregate them and use grep to identify specific uncovered line numbers to target with new unit tests.

Frequently Asked Questions about increase-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge code coverage reports across a Dart monorepo?

To merge code coverage across a Dart monorepo, run Melos test suites to generate per-package outputs, then aggregate the package lcov.info files into a unified root report for consistent global analysis.

What is the best way to find uncovered lines in a Flutter monorepo?

Finding uncovered lines in a Flutter monorepo involves querying the aggregated lcov.info file with grep to extract exact file paths and line numbers for statements not exercised by tests.

Does this test gap analysis approach work with Melos workflows?

Yes, this test gap analysis approach works specifically with Melos workflows by requiring Melos-driven coverage commands to execute tests, aggregate package reports, and analyze source-line level data.

How do I write unit tests for complex conditionals and lifecycle error cases?

Writing unit tests for complex paths involves targeting specific uncovered statements using gap data to design tests for copyWith behaviors, equality branches, exception catches, and post-dispose lifecycle errors.

What strategies help increase code coverage for reactive framework branches?

Increasing code coverage for reactive framework branches requires using line-level gap data to systematically design high-fidelity unit tests targeting deep recursive collections, complex conditionals, and exception paths.