You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81-18Lines changed: 81 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,55 @@ Laravel TDDraft enables true Test-Driven Development in Laravel applications by
34
34
35
35
**The key innovation is the five-command workflow that separates experimental draft tests from production tests, with powerful filtering and status tracking to manage your TDD process professionally.**
36
36
37
+
## ποΈ Test Architecture & Isolation
38
+
39
+
Laravel TDDraft creates a **completely separate testing environment** that doesn't interfere with your existing test suite:
40
+
41
+
```
42
+
tests/
43
+
βββ Feature/ # π’ Your production CI tests (unchanged)
44
+
βββ Unit/ # π’ Your production CI tests (unchanged)
45
+
βββ TDDraft/ # π΅ Isolated draft tests (new - never affects CI)
46
+
βββ Feature/ # Draft feature tests
47
+
βββ Unit/ # Draft unit tests
48
+
βββ .status.json # Status tracking (auto-generated)
49
+
```
50
+
51
+
### Key Architectural Benefits:
52
+
53
+
-**π« Zero CI Interference**: TDDraft tests in `tests/TDDraft/` are **completely excluded** from your main test suites
54
+
-**π Independent Operation**: Your existing `tests/Unit/` and `tests/Feature/` continue working exactly as before
55
+
-**π Separate Test Suites**: PHPUnit/Pest configuration keeps TDDraft isolated via test suite definitions
56
+
-**β‘ Parallel Development**: Teams can practice TDD in the draft environment while CI runs production tests
57
+
58
+
### How Isolation Works:
59
+
60
+
**Standard PHPUnit/Pest Configuration:**
61
+
```xml
62
+
<testsuites>
63
+
<testsuitename="Unit">
64
+
<directorysuffix="Test.php">tests/Unit</directory> <!-- Production tests -->
65
+
</testsuite>
66
+
<testsuitename="Feature">
67
+
<directorysuffix="Test.php">tests/Feature</directory> <!-- Production tests -->
68
+
</testsuite>
69
+
<!-- tests/TDDraft/ is intentionally NOT included -->
70
+
</testsuites>
71
+
```
72
+
73
+
**TDDraft Tests Run Separately:**
74
+
```bash
75
+
# Your CI pipeline (unchanged)
76
+
pest # Runs only tests/Unit + tests/Feature
77
+
phpunit # Runs only tests/Unit + tests/Feature
78
+
79
+
# TDDraft workflow (isolated)
80
+
php artisan tdd:test # Runs only tests/TDDraft/**
81
+
pest --testsuite=tddraft # Alternative access to draft tests
82
+
```
83
+
84
+
This architectural separation ensures that **failing TDDraft tests never break your CI builds** while you practice the Red-Green-Refactor cycle.
85
+
37
86
### π― Why Laravel TDDraft?
38
87
39
88
**TDD is hard to practice in real projects because:**
@@ -52,7 +101,7 @@ Laravel TDDraft enables true Test-Driven Development in Laravel applications by
52
101
53
102
## β¨ Features
54
103
55
-
- ποΈ **Isolated TDD Environment** - Separate `tests/TDDraft/` directory that never affects CI
104
+
- ποΈ **Complete Test Isolation** - `tests/TDDraft/` directory completely separate from `tests/Unit/` and `tests/Feature/` - never affects CI
56
105
- π **Unique Reference Tracking** - Every test gets a `tdd-YYYYMMDDHHMMSS-RANDOM` ID for precise tracking
57
106
- π **Advanced Filtering** - Filter tests by type, path, reference, status, and more
58
107
- π **Automatic Status Tracking** - Monitor test results and history during TDD cycles
@@ -61,7 +110,7 @@ Laravel TDDraft enables true Test-Driven Development in Laravel applications by
0 commit comments