Get up and running with Complement testing in 5 minutes! 🚀
Big shoutout to the FERRETCANNON massive! 🎆
# From the FERRETCANNON repository root
cd complement
./run-complement.shThat's it! The script will:
- ✅ Check prerequisites (Docker, Go)
- ✅ Build the Complement Docker image
- ✅ Clone the Complement test suite
- ✅ Run all compliance tests
# Test registration only
./run-complement.sh -t TestRegistration
# Test federation
./run-complement.sh -t TestFederation
# Test with longer timeout
./run-complement.sh -T 1h -t TestRoomVersionscd /path/to/FERRETCANNON
docker build -t complement-ferretcannon -f Complement.Dockerfile .git clone https://github.com/matrix-org/complement.git
cd complementCOMPLEMENT_BASE_IMAGE=complement-ferretcannon:latest go test -v ./tests/...Complement runs hundreds of tests covering:
✅ Client-Server API
- User registration and authentication
- Room creation and management
- Sending and receiving messages
- User profiles and presence
- Device management
✅ Server-Server API (Federation)
- Server discovery and verification
- Room joins across servers
- Event distribution and backfill
- State resolution
✅ Security & Crypto
- Event signing and verification
- Server key exchange
- Content hashing
- End-to-end encryption basics
✅ Room Versions
- Support for room versions v1-v12
- State resolution algorithms
- Event format validation
=== RUN TestRegistration
--- PASS: TestRegistration (2.34s)
Your implementation is correct!
=== RUN TestFederationJoin
federation_test.go:45: Expected status 200, got 404
--- FAIL: TestFederationJoin (1.23s)
There's a bug to fix. Check the test output for details.
=== RUN TestAdvancedFeature
--- SKIP: TestAdvancedFeature (0.00s)
This test doesn't apply to your configuration.
Build the image first:
docker build -t complement-ferretcannon -f Complement.Dockerfile .Stop any running Matrix servers:
docker ps # Find the container ID
docker stop <container-id>Install Go 1.21+:
# On Ubuntu/Debian
sudo apt install golang-go
# On macOS
brew install go
# Or download from https://go.dev/dl/Increase timeout:
./run-complement.sh -T 1h- Run the full suite:
./run-complement.sh - Fix any failures: Check test output for error details
- Run specific tests: Test individual features as you fix them
- Celebrate: When all tests pass! 🎉
- Script options:
./run-complement.sh --help - Detailed docs: See README.md
- Troubleshooting: See README.md#troubleshooting
💡 Run specific test packages:
cd complement-checkout
COMPLEMENT_BASE_IMAGE=complement-ferretcannon:latest go test -v ./tests/csapi/...💡 See test names without running:
cd complement-checkout
go test -list . ./tests/... | grep Test💡 Run with race detector:
cd complement-checkout
COMPLEMENT_BASE_IMAGE=complement-ferretcannon:latest go test -race -v ./tests/...💡 Save test output:
./run-complement.sh 2>&1 | tee test-results.logYou're now ready to validate FERRETCANNON against the Matrix Specification! 🚀
Big shoutout to the Matrix.org team for Complement and to the FERRETCANNON massive! 🎆