Automated Integration Testing
The ESCTL door controller codebase includes a 100% automated integration test suite built with Perl TAP (Test::More) and Docker Compose.
Overview
The integration testing framework emulates physical door hardware node controllers (door_232) over TCP sockets. This allows developers to validate real-time access control decisions, protocol handshakes, time/date/day restrictions, GMT/BST timezone offset calculations, and database audit logging without requiring physical hardware or interactive UI components.
Quick Start
To execute the test suite against a containerized environment:
cd server/trunk/tests
./run-tests.sh
Common Runner Flags
./run-tests.sh -d(or-v) : Enables real-time container debug logging on assertion failures../run-tests.sh -j junit.xml: Generates a JUnit XML test report for CI pipeline integration.
The run-tests.sh runner automatically manages container orchestration (controller, db, ldap), executes the test harness, and tears down container services upon completion. In GitLab CI pipelines, test reports automatically populate the Merge Request Test Summary widget and Pipeline detail view.
Technical Documentation in Source Control
Deep technical specifications for individual test files, runner architecture, Docker socket fixture loading, helper APIs (TestEnv.pm), and AI directives are maintained directly alongside the test code in source control:
- Technical Test Suite Documentation (
server/trunk/tests/README.md): Complete test coverage breakdown, container lifecycle mechanics, subtest hierarchy specs, and runner architecture. - AI Agent Guidelines (
server/trunk/tests/AGENTS.md): Guidelines for AI coding assistants modifying test suites or environment helpers.