Skip to content

Test Coverage

Current test statistics for the Wippidu Kita App backend (as of February 2026).

Summary

Metric Value
Test functions ~950
Test files 63
Go version 1.24.0
Test framework Go testing + testify
Test database SQLite (in-memory)

Test structure

backend/
├── internal/
│   ├── controller/               # Controller tests (HTTP handlers)
│   │   ├── *_test.go             # Per-controller test files
│   │   ├── test_helpers.go       # Controller test utilities
│   │   └── integration_test_helpers.go
│   ├── service/                  # Service tests (business logic)
│   │   └── *_test.go
│   ├── model/                    # Model tests (DB operations)
│   │   ├── *_test.go
│   │   └── test_helpers.go
│   ├── middleware/               # Middleware tests
│   │   ├── *_test.go
│   │   └── test_helpers.go
│   ├── util/                     # Utility tests
│   │   └── *_test.go
│   └── integrationtesting/      # Full integration tests
│       └── *_test.go
└── Makefile                      # Test automation targets

Test data

Tests use automatic test data initialization (same as debug mode):

  • 2 locations (Alpha, Beta)
  • 5 groups
  • 50 children (10 per group)
  • 44 parent accounts
  • 7+ employee accounts
  • 1 admin account

See Test Accounts for full credentials.

Running tests

cd backend
make test           # All tests
make test-verbose   # With output
make test-coverage  # With coverage report
make test-race      # With race detector

See How to Run Tests for all options.

CI integration

Tests run automatically in the CI pipeline for every PR and branch build. The pipeline:

  1. Builds the application
  2. Runs all tests
  3. Generates coverage report
  4. Builds Docker image
  5. Deploys to PR subdomain (for PRs)