testbox-bdd

Write and organize BDD-style tests with describe/it and Gherkin aliases in ColdBox and BoxLang TestBox bundles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many ColdBox projects need readable, behavior-driven tests that express intent, lifecycle setup, and data-driven cases without brittle fixtures or tangled setup code. This Skill helps authors structure suites and specs so behavior is clear, reusable, and easy to maintain across unit, integration, and parallel scenarios.

Core Features & Use Cases

  • Behavior-driven suite and spec structure using describe/it and Gherkin-style aliases for readable tests and requirements mapping.
  • Lifecycle management with beforeAll/afterAll and nested beforeEach/afterEach plus aroundEach for transactions or resource wrapping.
  • Focused and skipped execution, spec data binding to avoid closure-capture issues, labels for targeted runs, and asyncAll support for safe parallel IO-bound specs.

Quick Start

Create a new BDD spec that tests user creation using describe/it, lifecycle hooks, and spec data binding so you can run focused or parallel suites immediately.

Frequently Asked Questions about testbox-bdd

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

FAQPage Schema
How do I write BDD-style tests in CFML using describe and it blocks?

BDD-style tests in CFML use describe and it blocks to express expected behavior clearly. Gherkin-style aliases map requirements to readable specs, while lifecycle hooks like beforeAll and beforeEach manage setup across unit, integration, and parallel scenarios.

What is the best way to manage test setup and teardown in TestBox bundles?

Test setup and teardown in TestBox bundles is managed using lifecycle hooks: beforeAll and afterAll for suite-level execution, beforeEach and afterEach for spec-level runs, and aroundEach for wrapping transactions or resource handling.

Can I run parallel asyncAll specs safely in ColdBox without closure-capture issues?

Yes, parallel asyncAll specs run safely by using spec data binding to avoid closure-capture issues. This ensures data-driven cases execute correctly during parallel IO-bound test runs within ColdBox and BoxLang environments.

How do I focus or skip specific test suites during a TestBox run?

You can focus or skip specific test suites and specs using focused and skipped execution controls. Labels can also be applied to target specific test runs, allowing you to isolate execution to relevant behavior-driven tests.

Does TestBox support data-driven testing for BoxLang applications?

Yes, TestBox supports data-driven testing for BoxLang applications through spec data binding. This mechanism passes distinct datasets into individual specs, preventing brittle fixtures and ensuring reliable behavior verification across varied inputs.

When should I use aroundEach hooks in my behavior-driven specs?

Use aroundEach hooks in behavior-driven specs when you need to wrap spec execution in transactions or manage resource wrapping. This lifecycle hook intercepts spec runs, allowing precise setup and teardown around individual test executions.