first commit
This commit is contained in:
14
scripts/test.sh
Normal file
14
scripts/test.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/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
|
Reference in New Issue
Block a user