boxlang-testing

Author, run, and debug BoxLang tests using TestBox in BDD and xUnit styles.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-testing-ortus-boxlang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: boxlang-testing
Source: https://github.com/ortus-boxlang/skills/tree/main/boxlang-developer/testing
Command: npx skills add https://github.com/ortus-boxlang/skills --skill boxlang-testing-ortus-boxlang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang testing with TestBox standardizes how developers write, run, and debug tests using both BDD style (describe/it) and xUnit style, with built-in mocking, data generation, and lifecycle hooks.

Core Features & Use Cases

  • Supports BDD and xUnit styles for BoxLang tests.
  • Lifecycle hooks (beforeAll/afterAll/beforeEach/afterEach/aroundEach) to manage setup and teardown.
  • Mocking with MockBox (createMock/prepareMock/$()/...).
  • Mock data generation with mockData().
  • Async testing with asyncAll and parallel specs.
  • Test harness patterns for unit, integration, and data-driven tests.

Quick Start

Write your first test using TestBox by creating a bundle with a BaseSpec-based class or describe/it blocks, then run tests with the BoxLang test runner.

Frequently Asked Questions about boxlang-testing

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

FAQPage Schema
How do I write BoxLang tests using TestBox?▼

To write BoxLang tests using TestBox, create a test bundle using a BaseSpec-based class for BDD describe/it blocks or xUnit style, then run them via the BoxLang CLI test runner.

Can I use MockBox for mocking in BoxLang test suites?▼

Yes, BoxLang test suites support MockBox for mocking, allowing you to use createMock, prepareMock, and the $() syntax to stub methods during unit and integration testing.

Does TestBox support async and parallel testing for BoxLang?▼

Yes, TestBox supports async testing for BoxLang by utilizing asyncAll and parallel specs to execute behavior-driven and unit test suites concurrently.

What lifecycle hooks are available for BoxLang behavior-driven tests?▼

BoxLang behavior-driven tests support lifecycle hooks including beforeAll, afterAll, beforeEach, afterEach, and aroundEach to manage setup and teardown procedures.

How do I generate mock data for data-driven BoxLang tests?▼

You can generate mock data for data-driven BoxLang tests by using the built-in mockData() helper provided by the TestBox framework to populate test harnesses.

Does BoxLang testing support focused or skipped specs?▼

Yes, BoxLang testing validates focused and skipped specs, allowing you to isolate specific tests or exclude them from execution during the test run.