forked from Stellabill/stellabill-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-outbox.bat
More file actions
57 lines (49 loc) · 1.36 KB
/
Copy pathtest-outbox.bat
File metadata and controls
57 lines (49 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
REM Test script for outbox pattern implementation (Windows)
REM This script should be run after Go is properly installed
echo Running Outbox Pattern Tests...
REM Clean dependencies
echo Cleaning dependencies...
go mod tidy
if %errorlevel% neq 0 (
echo Failed to clean dependencies
exit /b 1
)
REM Run unit tests with coverage
echo Running unit tests with coverage...
go test -v -cover ./internal/outbox/...
if %errorlevel% neq 0 (
echo Unit tests failed
exit /b 1
)
REM Run all tests with coverage report
echo Running all tests with coverage report...
go test -coverprofile=coverage.out ./...
if %errorlevel% neq 0 (
echo Coverage test failed
exit /b 1
)
REM Generate HTML coverage report
echo Generating HTML coverage report...
go tool cover -html=coverage.out -o coverage.html
if %errorlevel% neq 0 (
echo Failed to generate coverage report
exit /b 1
)
REM Run benchmarks
echo Running benchmarks...
go test -bench=. ./internal/outbox/...
if %errorlevel% neq 0 (
echo Benchmark tests failed
exit /b 1
)
REM Run race condition tests
echo Running race condition tests...
go test -race ./internal/outbox/...
if %errorlevel% neq 0 (
echo Race condition tests failed
exit /b 1
)
echo All tests completed successfully!
echo Coverage report available at: coverage.html
pause