|
#!/bin/bash
|
|
|
|
# 运行所有测试
|
|
go test -v ./...
|
|
|
|
# 运行指定包的测试
|
|
# go test -v ./internal/service/...
|
|
|
|
# 运行指定测试
|
|
# go test -v ./internal/service -run TestLicenseService
|
|
|
|
# 生成测试覆盖率报告
|
|
go test -coverprofile=coverage.out ./...
|
|
go tool cover -html=coverage.out -o coverage.html |