Skip to content

Working With Wheels

Using the Wheels Test Environment

Wheels includes a comprehensive test environment specifically designed for testing the core framework itself. This environment is crucial for contributors to ensure their changes pass all tests across multiple platforms before submitting pull requests. This guide covers how to use the Docker-based test environment effectively.

The Wheels test environment uses Docker containers to provide a standardized setup for testing core framework functionality across:

  • Multiple CFML engines (Lucee 5/6/7, Adobe ColdFusion 2018/2021/2023/2025, BoxLang 1.x)
  • Multiple database platforms (MySQL, SQL Server, PostgreSQL, H2, Oracle, SQLite)
  • A modern test user interface (TestUI)
  • Automated test execution capabilities

This containerized approach ensures that all core framework tests run consistently across platforms, helping maintain compatibility across all supported environments.

Important: This test environment is specifically for running the core framework tests to validate contributions to the Wheels project. If you’re looking to test your own Wheels-based application, please refer to Testing Your Application for guidance on setting up tests within your application.

To use the Wheels core test environment, you’ll need:

  1. Docker installed and running
  2. Git to clone the Wheels repository
  3. CommandBox installed to manage dependencies and run commands
  4. Basic familiarity with command-line operations

If you haven’t already done so, clone the Wheels repository:

Terminal window
git clone https://github.com/wheels-dev/wheels.git
cd wheels

Before running tests, you need to install dependencies using CommandBox:

Terminal window
# Start CommandBox (if not using the globally installed version)
box
# Install dependencies
install
# Exit CommandBox shell (if you entered it)
exit

Alternatively, you can run the install command directly:

Terminal window
box install

This will install all the necessary dependencies specified in the box.json file.

The test environment uses Docker Compose profiles to selectively start components. Use one of the following commands based on your needs:

Terminal window
# Start everything (all engines, databases, and test UI)
docker compose up -d
# Start just the test UI
docker compose up -d testui
# Start a specific CFML engine and database
docker compose up -d lucee6 mysql

The first time you run these commands, Docker will build or download the necessary images, which may take several minutes.

Once the containers are running, access the TestUI by navigating to:

http://localhost:3000

This web interface allows you to:

  • Select CFML engines and databases for testing
  • Run specific test suites or individual tests
  • View test results and error details
  • Manage Docker containers directly from the UI

In order to run all CFML engines, databases, and the TestUI, use this command:

Terminal window
docker compose up -d

Besides this, test environment supports multiple profiles that you can run individually using docker compose up -d [profile]:

ProfileDescription
testuiJust the modern TestUI
lucee5Lucee 5 engine
lucee6Lucee 6 engine
lucee7Lucee 7 engine
adobe2018Adobe ColdFusion 2018 engine
adobe2021Adobe ColdFusion 2021 engine
adobe2023Adobe ColdFusion 2023 engine
adobe2025Adobe ColdFusion 2025 engine
boxlangBoxLang 1 engine
mysqlMySQL database only
postgresPostgreSQL database only
sqlserverSQL Server database only
oracleOracle Server database only

You can combine multiple profiles by specifying them together:

Terminal window
docker compose up -d lucee6 mysql testui

When contributing to Wheels, it’s essential to run tests against various engine-database combinations to ensure compatibility. Here’s how to run tests in different scenarios:

  1. Open the TestUI at http://localhost:3000
  2. Select the CFML engine and database you want to test against (e.g., Lucee 5 + MySQL)
  3. Select the test bundle or specific test to run
  4. Click “Run Tests” to execute them
  5. View the results in the UI
  6. Repeat with different engine-database combinations to ensure full compatibility

You can also run tests directly via command line for specific engine-database combinations:

Terminal window
# Connect to the Lucee 5 container
docker exec -it wheels-test-lucee5 /bin/bash
# Run all tests
cd /wheels-test-suite
box wheels test app
# Run a specific test bundle
box wheels test app --testBundles=controllers

Testing with Adobe ColdFusion 2021 and SQL Server

Section titled “Testing with Adobe ColdFusion 2021 and SQL Server”
Terminal window
# Connect to the Adobe 2021 container
docker exec -it wheels-test-adobe2021 /bin/bash
# Run all tests
cd /wheels-test-suite
box wheels test app
# Specify a test bundle
box wheels test app --testBundles=models
Terminal window
# Connect to the Lucee 6 container
docker exec -it wheels-test-lucee6 /bin/bash
# Run all tests
cd /wheels-test-suite
box wheels test app
# Run a specific test with specific options
box wheels test app --testBundles=core&testSpecs=testCaseOne

For thorough testing before submitting a PR, you should run tests on multiple engine-database combinations:

  1. Test with Lucee 5 + MySQL (minimum requirement)
  2. Test with at least one Adobe ColdFusion version (e.g., CF 2021)
  3. Test with at least one alternative database (e.g., SQL Server or PostgreSQL)

You can also run tests locally using CommandBox without Docker, though this will only test against your locally installed CFML engine:

Terminal window
# Start a server
box server start
# Run all tests
box wheels test app
# Run tests with specific parameters
box wheels test app --testBundles=controllers
EngineContainer NamePort
Lucee 5wheels-lucee5-160005
Lucee 6wheels-lucee6-160006
Lucee 7wheels-lucee7-160007
Adobe 2018wheels-adobe2018-162018
Adobe 2021wheels-adobe2021-162021
Adobe 2023wheels-adobe2023-162023
Adobe 2025wheels-adobe2025-162025
Boxlang 1wheels-boxlang-160001
DatabaseContainer NamePort
MySQLmysql3307 (3306 internal)
PostgreSQLpostgres5433 (5432 internal)
SQL Serversqlserver_cicd1434 (1433 internal)
Oracleoracle1522 (1521 internal)
H2(embedded)n/a
SQLite(embedded)n/a

Pre-flight Checks and Container Management

Section titled “Pre-flight Checks and Container Management”

The TestUI includes features to help manage the test environment:

  1. Pre-flight Checks: Verify that all required containers are running before executing tests
  2. Container Management: Start, stop, and restart containers directly from the UI
  3. Container Profiles: Manage predefined sets of containers for specific testing needs

When contributing to Wheels, you may need to create new tests for your code changes:

  1. Create a new test file in the appropriate directory:
    • For core functions: core/src/wheels/tests_testbox/specs/functional/YourTest.cfc

If you are adding in the already created test files, then you have to add in the same tests file, otherwise you can create a separate test file.

  1. Follow the TestBox syntax for your tests:
component extends="wheels.Testbox" {
function run() {
describe("test_your_feature", () => {
beforeEach(() => {
// Code to run before each test
})
afterEach(() => {
// Code to run after each test
})
it("test_your_feature_test", () => {
// Your test code
assert(true);
})
})
}
}
  1. Run your new test using the methods described above to ensure it passes on all engine-database combinations
  1. Container won’t start:

    • Check container logs: docker logs container_name
    • Ensure ports aren’t already in use on your system
    • Try stopping and removing all containers: docker compose down
  2. Tests fail inconsistently:

    • Ensure your database container is healthy
    • Check for resource constraints (memory/CPU)
    • Use the pre-flight feature in the TestUI to verify container health
  3. Port conflicts:

    • Edit the port mappings in compose.yml if needed
    • Use docker ps to see what ports are in use
  4. CommandBox issues:

    • Make sure CommandBox is properly installed and in your PATH
    • Try running box version to verify installation
    • Update CommandBox with box upgrade if you encounter compatibility issues
  5. Tests pass on one engine but fail on another:

    • This typically indicates an engine compatibility issue
    • Check for engine-specific functions or behaviors
    • Use conditional code with proper engine detection when necessary
Terminal window
# View logs from a specific container
docker logs wheels-test-lucee5
# Follow logs in real-time
docker logs -f wheels-test-lucee5
Terminal window
# Connect to a running container
docker exec -it wheels-test-lucee5 /bin/bash

To update your test environment to the latest version:

Terminal window
# Pull the latest code
git pull
# Update dependencies
box install
# Rebuild the containers
docker compose build
# Restart the environment
docker compose down
docker compose up -d

The Wheels test environment is a critical tool for ensuring that contributions to the core framework work consistently across all supported platforms. By thoroughly testing your changes across different CFML engines and databases, you help maintain the high quality and broad compatibility that Wheels users expect.

After verifying that your changes pass all tests, you’re ready to submit a pull request. For detailed instructions on the PR process, see Submitting Pull Requests.