forked from mcuadros/ofelia
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gremlins.yaml
More file actions
75 lines (64 loc) · 2.46 KB
/
.gremlins.yaml
File metadata and controls
75 lines (64 loc) · 2.46 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Gremlins Mutation Testing Configuration
# https://github.com/go-gremlins/gremlins
# Packages to test (default: all in ./...)
test-packages:
- .
- ./cli/...
- ./config/...
- ./core/...
- ./logging/...
- ./metrics/...
- ./middlewares/...
- ./web/...
# Mutator types to enable
# Available: CONDITIONALS_BOUNDARY, CONDITIONALS_NEGATION, INCREMENT_DECREMENT,
# INVERT_ASSIGNMENTS, INVERT_BITWISE, INVERT_BWASSIGN, INVERT_LOGICAL,
# INVERT_LOOPCTRL, INVERT_NEGATIVES, REMOVE_SELF_ASSIGNMENTS
mutators:
- CONDITIONALS_BOUNDARY # Change < to <=, > to >=, etc.
- CONDITIONALS_NEGATION # Negate conditions (== to !=)
- INCREMENT_DECREMENT # Change ++ to -- and vice versa
- INVERT_LOGICAL # Invert && to ||, || to &&
- INVERT_NEGATIVES # Remove negation operators
- INVERT_LOOPCTRL # Change break to continue and vice versa
# Files/patterns to exclude from mutation
exclude:
- "**/*_test.go" # Test files
- "**/test/**" # Test helpers
- "**/static/**" # Static assets
- "**/mock/**" # Mock implementations
- "**/adapters/mock/**" # Mock adapters
# Coverage mode: only mutate code covered by tests
# This significantly speeds up mutation testing
coverage: true
# Threshold for mutation score (percentage of mutants killed)
# Build fails if score is below this value
threshold: 60
# Timeout multiplier for individual test runs
# Helps with tests that may take longer due to mutations
# Increased for integration tests which connect to real Docker daemon
timeout-coefficient: 5
# Number of parallel workers (0 = auto-detect based on CPU)
workers: 0
# Output format options
output:
# Generate JSON report for CI integration
json: mutation-report.json
# Generate HTML report for detailed analysis
html: mutation-report.html
# Diff mode: only test mutations in changed files (for CI efficiency)
# Set via CLI flag --diff for PR workflows
diff: false
# Tags for conditional compilation
# Note: Integration tests are NOT included in the main mutation test run because
# they connect to real Docker daemon and would cause timeouts for all packages.
#
# For Docker adapter mutation testing WITH integration tests, use:
# gremlins unleash --config .gremlins-docker.yaml
#
# This achieves ~69% test efficacy vs ~50% without integration tests.
tags: ""
# Additional test flags
test-cpu: 0
# Increased timeout for integration tests with real Docker daemon
test-timeout: 120s