coldbox-testing-integrationlisted
Install: claude install-skill ColdBox/skills
# Integration Testing in ColdBox
## Overview
Integration tests verify how components work together using real dependencies — actual database connections, real WireBox injections, and full ColdBox request cycles. Unlike unit tests, integration tests do not mock external dependencies, instead relying on a test database or real services.
## Language Mode Reference
Examples use **BoxLang (`.bx`)** syntax by default. Adapt for your target language:
| Concept | BoxLang (`.bx`) | CFML (`.cfc`) |
|---------|-----------------|---------------|
| Class declaration | `class [extends="..."] {` | `component [extends="..."] {` |
| DI annotation | `@inject` above `property name="svc";` | `property name="svc" inject="svc";` |
| View templates | `.bxm` suffix | `.cfm` / `.cfml` suffix |
| Tag prefix | `<bx:if>`, `<bx:output>`, `<bx:set>` | `<cfif>`, `<cfoutput>`, `<cfset>` |
> **CFML Compat Mode**: With BoxLang + CFML Compat module, `.bx` and `.cfc` files coexist freely. BoxLang-native classes use `class {}` (`.bx` files); CFML-compat classes use `component {}` (`.cfc` files).
## Basic Integration Test
```boxlang
component extends="coldbox.system.testing.BaseTestCase" appMapping="/root" {
function beforeAll() {
super.setup()
// Get real services from WireBox (no mocks)
variables.userService = getInstance( "UserService" )
}
function afterAll() {
structDelete( application, "cbController" )
}
function run() {
describe( "UserSe