ORGANIZATION.mdā¢2.61 kB
# Test Organization Summary
## š Structure
```
tests/
āāā test-config.yaml.template # Template for test configuration
āāā test-config.yaml # Your local config (NOT IN GIT)
āāā test-helper.js # Common test utilities
āāā run-all-tests.js # Universal test runner
āāā test-*.js # Individual test scripts
āāā README.md # Quick reference
doc/tests/
āāā README.md # Documentation index
āāā TESTING_GUIDE.md # Complete testing guide
āāā TEST_INFRASTRUCTURE.md # Technical overview
āāā CREATE_DOMAIN_TOOL.md # CreateDomain handler docs
āāā test-config.yaml.template # Template reference copy
```
## šÆ Key Points
### Test Scripts Location: `tests/`
- All executable test files
- Test helper utilities
- Test runner
- Template for configuration
### Documentation Location: `doc/tests/`
- Complete testing guides
- Tool documentation
- Infrastructure overview
- Configuration templates
### Git Tracking
ā
**Tracked in Git**:
- `tests/test-config.yaml.template` - Template only
- `tests/test-helper.js`, `tests/run-all-tests.js`
- `tests/test-*.js` - All test scripts
- `doc/tests/*.md` - All documentation
ā **NOT Tracked** (in .gitignore):
- `tests/test-config.yaml` - Contains real transport requests
## š Workflow
1. **First Time Setup**:
```bash
# Copy template to create your local config
cp tests/test-config.yaml.template tests/test-config.yaml
# Edit with real values
# - Update transport_request
# - Update package_name if needed
# - Enable test cases you want to run
```
2. **Run Tests**:
```bash
npm run build
node tests/run-all-tests.js --list # See available tests
node tests/test-create-domain.js # Run specific test
node tests/run-all-tests.js # Run all enabled
```
3. **Add New Test**:
- Add test case to `tests/test-config.yaml.template`
- Create `tests/test-new-handler.js` using test-helper
- Update `tests/run-all-tests.js` HANDLER_MAP
- Document in `doc/tests/` if needed
## š Documentation Reference
- **Quick Start**: `tests/README.md`
- **Full Guide**: `doc/tests/TESTING_GUIDE.md`
- **Technical Details**: `doc/tests/TEST_INFRASTRUCTURE.md`
- **CreateDomain Tool**: `doc/tests/CREATE_DOMAIN_TOOL.md`
## ā ļø Important
- Never commit `tests/test-config.yaml` (gitignored)
- Always use template as starting point
- Update transport requests before write operations
- Build before testing: `npm run build`