boxlang-testing

Automate BoxLang application testing with TestBox BDD and xUnit styles.

16|78|Updated Nov 28, 2014
One-click install
npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: boxlang-testing
Source: https://github.com/ortus-docs/coldbox-docs/tree/main/.agents/skills/boxlang-testing
Command: npx skills add https://github.com/ortus-docs/coldbox-docs --skill boxlang-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

BoxLang testing workflows often require a cohesive framework to author, run, and validate tests across bundles. This Skill provides a complete testing framework based on TestBox and MockBox, including BDD and xUnit styles, lifecycle hooks, and rich assertion tooling.

Core Features & Use Cases

  • BDD and xUnit style test bundles for BoxLang applications.
  • Lifecycle methods (beforeAll, afterAll, beforeEach, afterEach, aroundEach) support and MockBox mocking.
  • Mock data generation, async testing, and exception testing with fluent assertions.

Quick Start

Create a tests bundle with TestBox and run it via the BoxLang CLI to execute your specs.

Frequently Asked Questions about boxlang-testing

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

FAQPage Schema
How do I write BDD specs for BoxLang applications?

You can write BDD specs for BoxLang applications using describe/it blocks, lifecycle hooks like beforeAll and afterAll, and fluent assertions to validate behavior across bundles.

Can I run unit and integration tests for BoxLang bundles from the CLI?

Yes, you can execute unit, integration, and behavior-driven tests for BoxLang bundles using the BoxLang CLI runner, with options for async specs and skip/focus controls.

Does BoxLang testing support mocking and mock data generation?

BoxLang testing supports MockBox for mocking and mockData for generating mock data, enabling you to isolate dependencies and simulate various test scenarios within your specs.

What is the difference between BDD and xUnit styles in BoxLang testing?

BDD style uses descriptive blocks like describe and it for behavior specification, while xUnit style provides traditional unit testing structure, and both are supported with lifecycle hooks and assertions.

How do I test asynchronous code in BoxLang?

You can test asynchronous code in BoxLang by utilizing optional async specs, allowing your test bundles to handle and validate asynchronous operations and workflows effectively.