• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cweill / gotests / 18735290381
94%
master: 94%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: master
Ran 23 Oct 2025 02:07AM UTC
Jobs 1
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Oct 2025 02:06AM UTC coverage: 94.319% (-2.0%) from 96.272%
18735290381

Pull #194

github

cweill
fix: improve AI prompt to prevent duplicate test cases

Improved the LLM prompt and validation to ensure test cases have unique,
diverse values instead of duplicates or placeholder names.

**Prompt Improvements:**
- Emphasize "UNIQUE, DIFFERENT input values" for each test case
- Changed example from "descriptive_test_name" to "specific_scenario_name"
  with concrete examples (e.g., "valid_input", "empty_string", "negative_value")
- Simplified instructions for small model compatibility
- Added explicit instruction to show scaffold at end of prompt
- Added "Requirements" section with clear expectations

**Validation Enhancements:**
- Added `hasDuplicates()` function to detect identical test cases
- Validation now rejects test cases where all args+want values are the same
- LLM will retry with error feedback when duplicates are detected

**Golden Files:**
- Regenerated all 11 golden files with improved prompt
- Test case names now follow pattern: "valid_input", "empty_string", "negative_value"
- No more placeholder "descriptive_test_name" in golden files
- All E2E tests pass with strict golden validation

**Tests:**
- Updated unit tests to match new prompt text
- All 9 E2E tests pass with deterministic qwen2.5-coder:0.5b output
- Full test suite passes (24 tests, 95.2% coverage)

Note: Small model limitations still produce some type errors in generated code
(e.g., `price: ""` for float64), but output is deterministic for E2E validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request #194: feat: AI-powered test case generation

682 of 743 new or added lines in 10 files covered. (91.79%)

6 existing lines in 2 files now uncovered.

1544 of 1637 relevant lines covered (94.32%)

1328.25 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
98.36
internal/ai/prompt.go
3
98.01
-0.94% internal/goparser/goparser.go
5
86.6
2.99% internal/output/options.go
6
94.87
internal/ai/prompt_go.go
20
88.1
internal/ai/ollama.go
24
86.05
internal/ai/parser_go.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
96.99
0.09% gotests.go
4
86.6
2.99% internal/output/options.go
Jobs
ID Job ID Ran Files Coverage
1 18735290381.1 23 Oct 2025 02:07AM UTC 14
94.32
GitHub Action Run
Source Files on build 18735290381
  • Tree
  • List 14
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #194
  • PR Base - develop (#18725169102)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc