java-unit-test-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited java-unit-test-generator (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.
Before generating tests, ask:
Provide an upfront estimate: 10-15 credits per method.
For each method, generate exactly 3 tests:
Use this structure:
@Test
@DisplayName("Should [expected behavior] when [condition]")
void test[MethodName][Scenario]() {
// Given - setup
// When - execute
// Then - verify
}STOP after each batch. Ask the user to run and confirm before continuing.
Do NOT generate more tests until the user confirms the current batch works.
Validation command:
python scripts/validate_tests.py <TestClassName>If tests fail:
When skipping, say:
"This test failed twice. Skipping to preserve credits. Issue: [describe]. Options: (1) skip, (2) provide more context, (3) simplify scope."
Never attempt the same fix more than twice. Mark flaky tests @Disabled.
After a passing batch, offer:
Methods Tested: N
Total Tests: N
Skipped: N (with reasons)
Coverage: happy path / error / edge case breakdownCredit costs vary by Kiro account, model, and code complexity. To get accurate numbers for your environment, follow these steps.
Run the built-in benchmark with a simple sample class:
python track_credits.py benchmark java-simpleThis measures the cheapest possible unit test on your account (e.g., 0.063 credits/test).
Your real classes are more complex. The tool scores complexity based on:
| What makes tests cost more | How it's scored |
|---|---|
| More lines of code | +1 for every 50 lines |
| More mock dependencies | +1 for each mock |
| More branching (if/else/switch) | +1 for every 3 branches |
| More framework annotations | +1 for every 3 annotations |
python track_credits.py estimate \
--type java-unit \
--source-lines 150 \
--mocks 3 \
--branches 6 \
--annotations 4 \
--tests 3# Note credit balance before and after, then record:
python track_credits.py add "MyService-3tests" <before> <after> "3 JUnit5 tests, Mockito"Your measurements improve future estimates automatically. See ../../../skills-workshop/credit-estimation/CREDIT-ESTIMATION-GUIDE.md for the full guide.
references/junit5-patterns.md - Common JUnit 5 patternsreferences/examples/UserServiceTest.java - Complete example../../../skills-workshop/credit-estimation/CREDIT-ESTIMATION-GUIDE.md - Credit measurement methodology~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.