coldbox-testing-base-classes

Select and configure ColdBox testing base classes for integration, handler, model, and interceptor tests.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill coldbox-testing-base-classes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coldbox-testing-base-classes
Source: https://github.com/ColdBox/skills/tree/main/coldbox/testing-base-classes
Command: npx skills add https://github.com/ColdBox/skills --skill coldbox-testing-base-classes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies and aligns the appropriate ColdBox testing base class for a given test type and provides the standardized harness structure to accelerate test development.

Core Features & Use Cases

  • Guides selection among BaseTestCase, BaseHandlerTest, BaseModelTest, and BaseInterceptorTest based on test goals.
  • Outlines the required harness structure (tests/Application.cfc, tests/resources, tests/specs) and common annotations.
  • Clarifies how to implement integration, isolated handler, model, and interceptor tests with pre-wired setups and mocks.

Quick Start

Create a new test class extending the appropriate ColdBox base class and follow the harness layout to implement your tests.

Frequently Asked Questions about coldbox-testing-base-classes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right ColdBox testing base class for my integration or unit tests?

Choose your ColdBox testing base class by matching test goals: BaseTestCase for integration, BaseHandlerTest for isolated handlers, BaseModelTest for models, and BaseInterceptorTest for interceptors. This alignment accelerates test development by providing pre-wired setups and mocks for each specific scenario.

What is the required harness structure for setting up ColdBox testing?

The standard ColdBox testing harness structure requires a tests directory containing Application.cfc, resources, and specs subdirectories. This conventional layout provides the necessary mappings, fixtures, and configurations to support integration, handler, model, and interceptor testing scenarios.

Can I use ColdBox base test classes for isolated handler and interceptor testing?

Yes, you can use BaseHandlerTest for isolated handler testing and BaseInterceptorTest for isolated interceptor testing in ColdBox. These base classes provide pre-wired setups and mocks specifically designed to test handlers and interceptors independently without loading the entire framework.

What's the best way to structure ColdBox test specs, mappings, and fixtures?

The best way to structure ColdBox test specs, mappings, and fixtures is to extend the appropriate base test class and follow the conventional harness layout. Place test specifications in the tests/specs directory, configure mappings in tests/Application.cfc, and store fixtures in tests/resources for standardized test development.

Do I need to know ColdBox annotations to set up a test harness?

Yes, knowledge of common ColdBox annotations is required to set up a test harness effectively. The harness setup uses standard annotations to configure pre-wired setups, mocks, and mappings that enable proper integration, handler, model, and interceptor testing scenarios.

Why does my ColdBox test fail to extend the correct base test class?

ColdBox tests fail when extending the wrong base test class for the intended test type. Ensure you extend BaseTestCase for integration, BaseHandlerTest for handlers, BaseModelTest for models, or BaseInterceptorTest for interceptors, and verify the standard harness layout is properly configured.