This document provides an overview of all testing infrastructure in the Windshift project.
Black-box HTTP integration tests that start real server instances with isolated databases.
# Run all Go tests
cd tests && go test -v
# Run with HTML report
./tests/run-tests.sh
# Run specific test category
go test -v -run "Permission" ./tests/
go test -v -run "Workflow" ./tests/
go test -v -run "VQL" ./tests/Coverage:
- API endpoint validation (workspaces, items, custom fields)
- Workflow system (statuses, workflows, screens, configuration sets)
- Permission system (global permissions, workspace roles, isolation)
- VQL queries (filtering, relationships)
- Link type restrictions
- Bearer token authentication
See tests/README.md for detailed test documentation.
Load and capacity testing using Node.js scripts.
# Basic load test
./stresstest/run-load-test.sh
# Mixed operations load test
./stresstest/run-mixed-load-test.sh
# PostgreSQL-specific tests
./stresstest/run-postgres-load-test.sh
./stresstest/run-postgres-capacity-test.shAvailable Tests:
load-test.js- Basic concurrent request testupdate-load-test.js- Update operation stress testmixed-load-test.js- Mixed read/write operationsrealistic-load-test.js- Simulated real-world usage patterns
# Verify PostgreSQL schema
./tests/verify-postgres-schema.sh- Go tests create isolated SQLite databases in the system temp directory
- Database files:
${TMPDIR}/windshift-tests/test_<timestamp>_<pid>.db - Automatic cleanup on test completion
- Stale database cleanup on test start (files older than 5 minutes)
- Each test starts its own server instance
- Random port allocation (8000-8999) to prevent conflicts
- Graceful shutdown with SIGTERM
- Output capture for debugging failed tests
Tests use bearer token authentication:
- Complete initial setup (create admin user)
- Login to get session cookie
- Create API bearer token
- Use bearer token for all API calls
# Run all integration tests with report
./tests/run-tests.sh
# Run specific test
cd tests && go test -v -run TestWorkspaceOperations
# Run with coverage
cd tests && go test -cover -coverprofile=coverage.out# Recommended CI command
go test ./tests/... -v -cover -timeout 10mtests/README.md- Complete Go test documentationtests/PERMISSION_TEST_DOCUMENTATION.md- Permission system testing notesstresstest/README.md- Stress test documentation