Skip to content

Commit 645c589

Browse files
committed
docs: [#14] add automated test script reference to integration testing guide
- Add 'Automated Testing Alternative' section after Overview - Add 'Automated Testing' tip after completion message - Reference tests/test-e2e.sh script with usage examples - Explain benefits and when to use automated vs manual testing - Include environment variables for customizing automated tests - Preserve all existing manual testing documentation and procedures
1 parent f115545 commit 645c589

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

docs/guides/integration-testing-guide.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,52 @@ following twelve-factor principles for better maintainability and deployment rel
2020

2121
---
2222

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+
2369
## Prerequisites
2470

2571
Ensure you have completed the initial setup:
@@ -419,6 +465,27 @@ You have successfully tested the complete twelve-factor deployment workflow
419465
for the Torrust Tracker Demo. The application is now running and validated
420466
on a fresh virtual machine.
421467

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+
422489
**Expected Output**: All checks should show "✅" (no conflicts).
423490

424491
### 1.4.1 Manual Cleanup (if needed)

0 commit comments

Comments
 (0)