- Home
- Skills
- Openharmonyinsight
- Openharmony Skills
- Ai Generated Ut Code Review
ai-generated-ut-code-review_skill
- Python
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openharmonyinsight/openharmony-skills --skill ai-generated-ut-code-review- SKILL.md3.4 KB
Overview
This skill reviews AI-generated unit tests and scores their quality on a 0–10 scale. It evaluates coverage, assertion effectiveness, negative/edge-case handling, determinism, and maintainability. The output includes a numeric score, a risk level, and a prioritized must-fix checklist tied to concrete evidence.
How this skill works
It confirms tests exercise the intended business code and core paths, checks overall line coverage (requirement: >= 80%), and inspects assertions for behavior relevance. It verifies negative and edge cases, looks for flakiness (time, network, env), and assesses test structure and naming. Finally, it produces a score by dimension, assigns a risk level, and lists must-fix items with supporting evidence and quick remediation notes.
When to use it
- When evaluating AI-generated unit tests for release readiness
- When you need a numeric quality score and an actionable risk level
- When coverage looks high but assertion validity is unclear
- When you need a prioritized must-fix checklist for test debt
- When assessing whether tests are deterministic and isolated
Best practices
- Require overall line coverage >= 80% before marking coverage as acceptable
- Ensure each test includes at least one behavior-anchored assertion (not just non-null or log checks)
- Include negative, boundary, and exception-path tests for core logic
- Avoid external dependencies; mock or stub external systems and freeze time where needed
- Name tests clearly and group by behavior to improve maintainability
Example use cases
- Score a batch of AI-generated tests to decide if they can be merged
- Identify missing negative cases when coverage is reported as high
- Produce a must-fix checklist for engineers after an automated test generation run
- Assess whether generated tests are flaky due to time, network, or environment reliance
- Compare multiple AI test outputs and pick the safest candidate for production
FAQ
Coverage under 80% forces at least a High risk. The report will include a must-fix entry requiring increased line coverage and cite uncovered key paths.
How is the 0–10 score computed?
Five dimensions (Coverage, Assertion Quality, Negative & Edge, Data & Isolation, Maintainability) are each scored 0–2 and summed for a 0–10 total. Evidence must support each subscore.