@@ -20,6 +20,52 @@ following twelve-factor principles for better maintainability and deployment rel
20
20
21
21
---
22
22
23
+ ## Automated Testing Alternative
24
+
25
+ ** For automated testing** , you can use the end-to-end test script that implements this exact workflow:
26
+
27
+ ``` bash
28
+ # Run the automated version of this guide
29
+ ./tests/test-e2e.sh
30
+ ```
31
+
32
+ The automated test script (` tests/test-e2e.sh ` ) follows the same steps described in this guide:
33
+
34
+ - ** Step 1** : Prerequisites validation
35
+ - ** Step 2** : Infrastructure provisioning (` make infra-apply ` )
36
+ - ** Step 3** : Application deployment (` make app-deploy ` )
37
+ - ** Step 4** : Health validation (` make health-check ` )
38
+ - ** Step 5** : Smoke testing (basic functionality validation)
39
+ - ** Step 6** : Cleanup (` make infra-destroy ` )
40
+
41
+ ** Benefits of the automated test** :
42
+
43
+ - ✅ ** Consistent execution** - No manual errors or missed steps
44
+ - ✅ ** Comprehensive logging** - All output saved to ` /tmp/torrust-e2e-test.log `
45
+ - ✅ ** Smoke testing included** - Additional tracker functionality validation
46
+ - ✅ ** Time tracking** - Reports duration of each stage
47
+ - ✅ ** CI/CD integration** - Can be used in automated pipelines
48
+
49
+ ** When to use automated vs manual** :
50
+
51
+ - ** Use automated** (` ./tests/test-e2e.sh ` ) for: CI/CD, quick validation, consistent testing
52
+ - ** Use this manual guide** for: Learning the workflow, debugging issues, understanding individual steps
53
+
54
+ ** Environment variables for automated testing** :
55
+
56
+ ``` bash
57
+ # Skip cleanup (leave infrastructure running for inspection)
58
+ SKIP_CLEANUP=true ./tests/test-e2e.sh
59
+
60
+ # Skip confirmation prompt (for CI/CD)
61
+ SKIP_CONFIRMATION=true ./tests/test-e2e.sh
62
+ ```
63
+
64
+ Continue with the manual guide below if you want to understand each step in detail
65
+ or need to debug specific issues.
66
+
67
+ ---
68
+
23
69
## Prerequisites
24
70
25
71
Ensure you have completed the initial setup:
@@ -419,6 +465,27 @@ You have successfully tested the complete twelve-factor deployment workflow
419
465
for the Torrust Tracker Demo. The application is now running and validated
420
466
on a fresh virtual machine.
421
467
468
+ ## Automated Testing
469
+
470
+ ** Tip** : For future testing, consider using the automated version of this guide:
471
+
472
+ ``` bash
473
+ # Run the same workflow automatically
474
+ ./tests/test-e2e.sh
475
+
476
+ # With cleanup skipped (for inspection)
477
+ SKIP_CLEANUP=true ./tests/test-e2e.sh
478
+ ```
479
+
480
+ The automated test (` tests/test-e2e.sh ` ) performs the exact same steps as this manual guide,
481
+ with additional smoke testing and comprehensive logging. It's perfect for:
482
+
483
+ - ** CI/CD pipelines** - Automated validation
484
+ - ** Quick testing** - Consistent execution without manual errors
485
+ - ** Regression testing** - Verify changes don't break the workflow
486
+
487
+ ---
488
+
422
489
** Expected Output** : All checks should show "✅" (no conflicts).
423
490
424
491
### 1.4.1 Manual Cleanup (if needed)
0 commit comments