coldbox-testing-interceptor
OfficialIsolate and unit test ColdBox interceptors
Software Engineering#mocking#testbox#unit-testing#interceptor#request-context#coldbox#config-properties
AuthorColdBox
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a concise, repeatable approach for unit testing ColdBox interceptor CFCs in complete isolation without booting a full ColdBox application, reducing test flakiness and setup overhead.
Core Features & Use Cases
- Pre-wired mocks: Supplies ready-to-use mockController, mockRequestService, mockLogger, mockLogBox, and mockFlash for rapid test development.
- Direct interception testing: Call interception points (preProcess, postProcess, onException, custom announce points) directly on the interceptor instance to assert behavior and side effects.
- Configurable interceptor properties: Set configProperties before super.setup() and inject mock collaborators via prepareMock or property injection to simulate dependencies.
- Scaffolding support: Use provided CommandBox generators to scaffold interceptors and their unit tests quickly.
Quick Start
Create a unit test that extends BaseInterceptorTest, set configProperties before setup, inject any required mocks, invoke the desired interception point on variables.interceptor with a mocked request context, and assert interactions on the mocks.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: coldbox-testing-interceptor Download link: https://github.com/ColdBox/skills/archive/main.zip#coldbox-testing-interceptor Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.