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

cweill / gotests
96%
master: 94%

Build:
Build:
LAST BUILD BRANCH: develop
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 test-coverage-improvements
branch: test-coverage-improvements
CHANGE BRANCH
x
Reset
  • test-coverage-improvements
  • GitHub-actions
  • add-godoc-comments
  • ai
  • codeowners
  • develop
  • disable-1.6
  • feature/ai-test-generation
  • feature/fix_travis
  • go-11.1
  • master
  • receiver
  • release/1.5.3
  • revert-48-add-support-functions-from-tests
  • 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

22 Oct 2025 05:27PM UTC coverage: 96.272% (+11.3%) from 84.978%
18724601462

Pull #196

github

cweill
test: improve code coverage from 28.1% to 84.6%

Add comprehensive unit tests across all packages, with special focus on
previously untested generics code in render helpers. This brings overall
coverage from 28.1% to 84.6% (201% increase).

## New Test Files

- **internal/render/helpers_test.go** (650+ lines)
  - Complete coverage of all 11 helper functions (93-100%)
  - Comprehensive generics tests: type arguments, constraint mapping
  - Tests for all constraint types: any, comparable, unions, approximations
  - Numeric constraint tests: constraints.Integer, Ordered, etc.
  - Type parameter substitution in fields and receivers

- **internal/models/models_test.go** (700+ lines)
  - 17 test functions covering all model methods
  - Expression, Field, Function, Receiver, Path tests
  - Coverage: 0% → 98.0%

- **internal/goparser/goparser_test.go** (150+ lines)
  - Parser tests with generics support
  - Import handling, error cases
  - Coverage: 0% → 73.3%

- **internal/render/render_test.go** (215+ lines)
  - Template rendering and loading tests
  - Coverage: 0% → 96.4%

- **internal/output/helpers_test.go**
  - File existence helper tests
  - Coverage improvement: 8.3% → 69.4%

## Enhanced Test Files

- **internal/output/options_test.go**
  - Added Process() method tests with various configurations
  - Tests for subtests, print inputs, go-cmp options

- **gotests/process/process_test.go**
  - Added comprehensive option tests
  - Template parameter tests, JSON validation
  - Coverage: 60.7% → 78.7%

## Coverage Results by Package

| Package | Before | After | Improvement |
|---------|--------|-------|-------------|
| internal/render (helpers) | 0% | 93-100% | ✅ ALL generics |
| internal/models | 0% | 98.0% | ✅ |
| internal/goparser | 0% | 73.3% | ✅ |
| internal/render | 0% | 96.4% | ✅ |
| internal/output | 8.3% | 69.4% | ✅ |
| gotests/process | 60.7% | 78.7% | ✅ |
| **Overall** | **28.1%** | **84.6%** | **+201%** |

## Key Achievement

All generics suppo... (continued)
Pull Request #196: test: improve code coverage from 28.1% to 84.6%

878 of 912 relevant lines covered (96.27%)

1176.64 hits per line

Relevant lines Covered
Build:
Build:
912 RELEVANT LINES 878 COVERED LINES
1176.64 HITS PER LINE
Source Files on test-coverage-improvements
  • Tree
  • List 8
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
18724601462 test-coverage-improvements test: improve code coverage from 28.1% to 84.6% Add comprehensive unit tests across all packages, with special focus on previously untested generics code in render helpers. This brings overall coverage from 28.1% to 84.6% (201% increase). ## New... Pull #196 22 Oct 2025 05:30PM UTC cweill github
96.27
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

© 2025 Coveralls, Inc