TestBox Integration
How to run and debug TestBox tests in IntelliJ IDEA — gutter icons, test result tree, suite/spec filtering, and automatic TestBox detection.
The BoxLang IntelliJ plugin provides first-class support for TestBox, the BDD/TDD testing framework for BoxLang. Run and debug tests with gutter icons, view results in a tree structure, and filter by suites or specs.
Features
Gutter Icons
Run or debug individual tests, suites, or entire test files
Test Result Tree
Visual tree showing pass/fail status for each test
Suite Filtering
Run only specific describe() blocks
Spec Filtering
Run only specific it() blocks
Bundle Execution
Run all tests in a test file
Automatic Detection
Detects TestBox installation and prompts to install if missing
Debug Support
Debug tests with breakpoints and variable inspection
Running Tests
Method 1: Gutter Icons
TestBox test files show gutter icons for quick execution:
▶️
Next to component declaration
Run all tests in the file
▶️
Next to describe() block
Run only that test suite
▶️
Next to it() block
Run only that specific test
🐛
Next to any test element
Debug the test
Click the icon to run or debug immediately.
Method 2: Context Menu
Right-click a test file in the Project view
Select Run 'TestBox: filename' or Debug 'TestBox: filename'
Method 3: Run Configuration
Select Run → Edit Configurations...
Click + and select TestBox
Configure the test scope (see below)
Click OK
Test Configuration Options
Name
Display name for the test configuration
Test Scope
What to run: BUNDLE (file), SUITE (describe block), or SPEC (it block)
Bundle Path
Dot-notation path to the test file (e.g., tests.specs.UserServiceSpec)
Filter Suites
Comma-separated list of suite names to run (for SUITE scope)
Filter Specs
Comma-separated list of spec names to run (for SPEC scope)
Working Directory
Directory where tests run. Defaults to project root
Environment Variables
Environment variables set before test execution
Example: Run Single Test
Example: Run Test Suite
Example: Run All Tests in File
Test Result Tree
After running tests, the Run tool window shows a tree structure:
Result Indicators
✅
Test passed
❌
Test failed
⏭️
Test skipped
⏸️
Test pending
Navigating Failures
Click a failed test to see the error message and stack trace
Double-click to navigate to the failing line in the test file
Use the Jump to Source button (Cmd+F4 / Ctrl+F4) to open the test code
TestBox Detection
The plugin automatically detects TestBox installations:
On project open — Checks for TestBox in
boxlang_modules/ormodules/On test execution — Verifies TestBox is available before running tests
Missing TestBox — Shows a notification with option to install
Installing TestBox
If TestBox is not detected:
Click Install TestBox in the notification
Or run manually:
box install testboxRestart the IDE or reload the project
Debugging Tests
Debug tests the same way as regular BoxLang code:
Set breakpoints in your test file or application code
Click the debug icon 🐛 next to a test
The debugger pauses at breakpoints
Inspect variables, evaluate expressions, and step through code
Debugging Tips
Break on test failures:
Watch test state: Add watch expressions to monitor test variables:
Evaluate during tests: Use the Debug Console to inspect test state:
Test File Structure
TestBox test files follow this structure:
The plugin recognizes:
component extends="testbox.system.BaseSpec"— Test file markerdescribe()— Test suiteit()— Individual test specbeforeEach(),afterEach()— Lifecycle methods
Running Tests from Terminal
You can also run TestBox tests from the integrated terminal:
Related Pages
Last updated
Was this helpful?