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

cweill / gotests
94%

Build:
DEFAULT BRANCH: master
Repo Added 25 Jan 2016 05:22AM UTC
Files 14
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

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • GitHub-actions
  • add-godoc-comments
  • ai
  • codeowners
  • develop
  • disable-1.6
  • feature/ai-test-generation
  • feature/fix_travis
  • go-11.1
  • receiver
  • release/1.5.3
  • revert-48-add-support-functions-from-tests
  • test-coverage-improvements
  • v1.0
  • v1.1
  • v1.2
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.5.1
  • v1.5.2
  • v1.5.3
  • v1.6.0

23 Oct 2025 05:20PM UTC coverage: 94.232% (-2.0%) from 96.272%
18882875710

push

github

web-flow
feat: AI-powered test case generation (#194)

* feat: add AI test generation foundation (WIP)

Implementing AI-powered test case generation as proposed in issue #41.
This is the foundation layer with provider interface and Ollama support.

New package: internal/ai/
- provider.go: Provider interface and config structs
- ollama.go: Ollama provider implementation with retry logic
- prompt.go: Prompt templates for LLM test case generation
- validator.go: In-memory compilation validation using go/parser

CLI additions:
- `-ai`: Enable AI test case generation
- `-ai-model`: Specify model (default: qwen2.5-coder:0.5b)
- `-ai-endpoint`: Ollama endpoint (default: localhost:11434)
- `-ai-cases`: Number of cases to generate (default: 3)

Options propagation:
- Added UseAI, AIModel, AIEndpoint, AICases to Options structs
- Flows from CLI flags → process.Options → gotests.Options

Still TODO:
- Integrate AI into output processing
- Modify templates for AI case injection
- Testing and validation

Related to #41

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

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: complete AI test case generation integration

Implements full integration of AI-powered test case generation:

1. Added function body extraction:
   - Modified goparser to extract function body source code
   - Added Body field to models.Function for AI context
   - Implemented extractFunctionBody helper using AST positions

2. Enhanced AI prompt with one-shot examples:
   - Added example for simple functions (Max)
   - Added example for error-returning functions (Divide)
   - Includes function body in prompt for better context
   - Aligned prompt with wantName() helper conventions

3. Template integration:
   - Updated function.tmpl to render AI-generated test cases
   - Falls back to TODO comment when AI is not enabled/fails
   - Properly handles Args and Want maps from TestCase struct

4. Configuration improvements:
   - Set temperature... (continued)

690 of 753 new or added lines in 10 files covered. (91.63%)

1552 of 1647 relevant lines covered (94.23%)

1320.52 hits per line

Relevant lines Covered
Build:
Build:
1647 RELEVANT LINES 1552 COVERED LINES
1320.52 HITS PER LINE
Source Files on master
  • Tree
  • List 14
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
18882875710 master feat: AI-powered test case generation (#194) * feat: add AI test generation foundation (WIP) Implementing AI-powered test case generation as proposed in issue #41. This is the foundation layer with provider interface and Ollama support. New pac... push 28 Oct 2025 05:02PM UTC web-flow github
94.23
18726612678 master docs: add godoc comments to all exported functions (#195) Added comprehensive godoc comments following Go conventions to all exported types, functions, methods, and variables across the codebase. This improves code documentation and makes the pac... push 22 Oct 2025 06:52PM UTC web-flow github
84.98
18674194587 master docs: enhance README introduction with Key Features section Improved the README introduction to be more compelling and informative: Changes: - Rewrote opening paragraph to emphasize value proposition - Added "Key Features" section highlighting 8... push 21 Oct 2025 05:47AM UTC cweill github
84.98
18674156967 master docs: add Quick Start Examples section to README Added a comprehensive "Quick Start Examples" section to help new users get started quickly with gotests. The section includes: Examples: - Generate tests for a single function (with full output) -... push 21 Oct 2025 05:44AM UTC cweill github
84.98
18674144524 master docs: update table driven tests link to go.dev Updated the table driven tests link from the old GitHub wiki URL (github.com/golang/go/wiki/TableDrivenTests) to the new canonical go.dev wiki URL (go.dev/wiki/TableDrivenTests). 🤖 Generated with [C... push 21 Oct 2025 05:44AM UTC cweill github
84.98
18674065592 master ci: revert to goveralls for coverage reporting Reverted coverage reporting to use goveralls tool (like the original implementation) instead of the GitHub Action. This approach provides better control over which packages are included in coverage m... push 21 Oct 2025 05:39AM UTC cweill github
84.98
18673216511 master Add full Go generics support (v1.8.0) This release adds complete support for Go generics (type parameters), enabling gotests to generate tests for generic functions and methods on generic types. Features: - Generate tests for generic functions w... push 21 Oct 2025 04:49AM UTC cweill github
72.07
18671742228 master Merge develop into master - v1.7.1 through v1.7.4 releases This merge brings in 4 releases worth of improvements: v1.7.1 - New Features: - Add -use_go_cmp flag for google/go-cmp support - Add -version flag to display version information v1.7.2 ... push 21 Oct 2025 03:18AM UTC cweill github
83.96
18670495476 master Merge branch 'develop' push 21 Oct 2025 02:05AM UTC cweill github
87.42
18670325265 master Merge branch 'develop' push 21 Oct 2025 01:54AM UTC cweill github
25.28
See All Builds (1379)
  • Repo on GitHub
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

© 2026 Coveralls, Inc