test-deduplicator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited test-deduplicator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill analyzes test suites to identify redundant or duplicate tests by examining code coverage, semantic similarity, and execution behavior. It groups equivalent tests, explains deduplication rationale, and recommends which tests can be safely removed while preserving overall test effectiveness.
First, gather coverage information for each test in the suite.
For Python projects with pytest:
# Run tests with coverage for each test individually
pytest --cov=src --cov-report=json tests/
# Or use the coverage analyzer script with pre-collected data
python scripts/coverage_analyzer.py coverage_data.json --output coverage_analysis.jsonCoverage data format:
{
"test_module::test_function_1": {
"coverage": {
"src/module.py": [10, 11, 12, 15, 20],
"src/utils.py": [5, 6, 7]
}
},
"test_module::test_function_2": {
"coverage": {
"src/module.py": [10, 11, 12, 15, 20],
"src/utils.py": [5, 6, 7]
}
}
}Parse test code to identify semantic similarities:
python scripts/semantic_analyzer.py tests/*.py --output semantic_analysis.json --threshold 0.7This analyzes:
Combine coverage and semantic analysis to produce recommendations:
python scripts/deduplicator.py \
--coverage coverage_analysis.json \
--semantic semantic_analysis.json \
--output recommendations.json \
--threshold 0.8Examine the generated recommendations:
{
"redundant_groups": [
{
"type": "identical_coverage",
"tests": ["test_a", "test_b", "test_c"],
"reason": "Tests have identical code coverage",
"confidence": 1.0,
"keep": "test_a",
"remove": ["test_b", "test_c"],
"rationale": "test_a has descriptive name, fast execution"
}
],
"removal_candidates": [...],
"coverage_impact": {
"coverage_preserved": true,
"tests_removed": 15
}
}After manual review, remove approved redundant tests and verify coverage is preserved.
Identifies tests with overlapping or identical coverage patterns.
Redundancy Types:
Script: scripts/coverage_analyzer.py
Output:
Identifies tests with similar code structure and assertions.
Similarity Metrics:
Script: scripts/semantic_analyzer.py
Output:
Combines multiple signals for comprehensive recommendations.
Redundancy Score:
Redundancy = 0.5 × Coverage_Sim + 0.3 × Semantic_Sim + 0.2 × Execution_SimScript: scripts/deduplicator.py
Output:
Customize analysis using the configuration template:
cp assets/deduplication_config.json my_config.json
# Edit my_config.jsonKey Settings:
Thresholds:
identical_coverage: 1.0 (exact match)highly_similar_coverage: 0.9semantic_similarity: 0.7overall_redundancy: 0.8Prioritization Weights:
unique_coverage_lines: 10 (most important)execution_speed_bonus: 5stability_bonus: 3name_clarity_bonus: 2Safety Checks:
preserve_coverage: true (must maintain coverage)require_manual_review: true (human approval needed)min_confidence_for_auto_removal: 0.95User: "Our test suite has grown to 500 tests and takes too long to run. Find redundant tests."
→ Run coverage analysis on all tests
→ Run semantic analysis on test files
→ Generate deduplication recommendations
→ Review and remove redundant tests
→ Verify coverage is preservedUser: "We merged two branches and suspect there are duplicate tests now."
→ Analyze tests from both branches
→ Find tests with identical coverage and assertions
→ Recommend which duplicates to remove
→ Prioritize keeping tests with better names/documentationUser: "Tests take 30 minutes in CI. Which tests can we safely remove?"
→ Analyze coverage overlap
→ Find subsumed tests (tests fully covered by others)
→ Calculate time savings from removal
→ Generate removal plan with coverage guaranteeUser: "Clean up our test suite and remove low-value tests."
→ Identify tests with zero unique coverage contribution
→ Find tests with identical assertions
→ Group semantically similar tests
→ Recommend merging or removing redundant testsIdentical Coverage (Confidence: 1.0)
Subsumed Tests (Confidence: 0.95)
Highly Similar (Confidence: 0.85)
Semantically Identical (Confidence: 0.90)
Tests are prioritized to keep based on:
Analyzes test coverage to identify redundant tests:
Analyzes test code for semantic similarity:
Integrated deduplication engine:
Comprehensive methodology guide covering:
Read this reference when you need deeper understanding of the methodology, want to customize similarity metrics, or need to explain the approach to stakeholders.
Configuration template for customizing:
Copy and modify this template to create custom configurations for specific projects or test suite characteristics.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.