← ClaudeAtlas

coldbox-testing-base-classeslisted

Use this skill to understand which ColdBox testing base class to extend for a given test type, configure test bundle annotations (appMapping, configMapping, unloadColdBox, loadColdBox, coldboxAppKey), set up the tests/ harness (Application.cfc, folder structure), or choose between integration testing (BaseTestCase), isolated handler testing (BaseHandlerTest), model unit testing (BaseModelTest), and interceptor unit testing (BaseInterceptorTest).
ColdBox/skills · ★ 0 · Testing & QA · score 61
Install: claude install-skill ColdBox/skills
# ColdBox Testing Base Classes ## Class Hierarchy ``` testbox.system.BaseSpec └── coldbox.system.testing.BaseTestCase ├── coldbox.system.testing.BaseHandlerTest ├── coldbox.system.testing.BaseModelTest └── coldbox.system.testing.BaseInterceptorTest ``` --- ## Quick Decision Guide | I want to test… | Extend | |---|---| | Handler actions using the full virtual app (execute / routes / interceptors) | `BaseTestCase` | | Handler CFC in complete isolation (no app load) | `BaseHandlerTest` | | A model/service/ORM entity in isolation | `BaseModelTest` | | An interceptor CFC in isolation | `BaseInterceptorTest` | | Any CFML/BX component with no ColdBox app | `BaseSpec` (TestBox) | --- ## Bundle Annotations Reference All ColdBox test bundles support these annotations: | Annotation | Default | Description | |---|---|---| | `appMapping` | `/` | Slash-notation path to the app root relative to the web root (e.g. `/apps/blog`) | | `configMapping` | `{appMapping}/config/Coldbox.cfc` | Dot-notation path to the config CFC | | `coldboxAppKey` | `cbController` | Application scope key where the controller is stored | | `loadColdBox` | `true` | Boot the virtual ColdBox app in `beforeAll` | | `unloadColdBox` | `true` | Destroy the virtual app in `afterAll` | ```boxlang class extends="coldbox.system.testing.BaseTestCase" appMapping="/apps/blog" configMapping="apps.blog.test.resources.Config" coldboxAppKey="cbController" unloadColdBox="false" {} ``` > Set