What problem does it solve?
Integration testing in ColdBox requires executing real handlers, services, and database operations which is time-consuming to configure and easy to make nondeterministic; this skill documents patterns to run reliable end-to-end tests that exercise the full ColdBox stack without relying on mocks.
Core Features & Use Cases
- Full request-cycle execution: run handlers and API endpoints via execute() with renderResults and assert response codes and payloads.
- Real dependency testing: obtain actual WireBox-injected services and verify persistence and inter-service interactions.
- Database lifecycle patterns: setup and teardown test data, use dedicated test datasources, and adopt transaction rollback or targeted cleanup to keep tests isolated.
- Use Case: verify a user registration flows through the handler stack, returns 201, and persists the user record in the test database.
Quick Start
Run an integration test that executes the users.register event through ColdBox, asserts a 201 response, and verifies the user record exists in the test database.