# Integration Tests

This directory contains integration tests that verify end-to-end behavior of the Wasot compiler beyond unit tests. These tests are not run automatically and must be executed manually.

## Test Categories

### Memory Constraint Tests
- `memory_constraint_tests.sh`: Tests that verify memory usage stays within specified limits
- Tests large file generation scenarios with bounded memory usage

### Performance Tests  
- Performance and throughput verification under various conditions
- Stress testing with large inputs

### Roundtrip Tests
- End-to-end conversion testing (Wasot → XML → SQLite → Wasot)
- Data integrity verification across format conversions

## Running Tests

### Run All Integration Tests
```bash
./tests/integration/run_all.sh
```

### Run Individual Test Categories
```bash
./tests/integration/memory_constraint_tests.sh
./tests/integration/performance_tests.sh
./tests/integration/roundtrip_tests.sh
```

## Test Philosophy

Integration tests should:
- Test real-world scenarios and edge cases
- Verify resource constraints (memory, performance)
- Test cross-component interactions
- Validate external dependencies and file I/O
- Be independent and idempotent

## Adding New Tests

1. Create test script in appropriate category directory
2. Follow naming convention: `*_tests.sh`
3. Include test documentation and expected outcomes
4. Update `run_all.sh` to include new test
5. Add usage examples to this README