Using the Test Environment
Last updated
Was this helpful?
Last updated
Was this helpful?
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, Adobe ColdFusion 2018/2021/2023)
Multiple database platforms (MySQL, SQL Server, PostgreSQL, H2)
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 for guidance on setting up tests within your application.
To use the CFWheels core test environment, you'll need:
installed and running
to clone the CFWheels repository
installed to manage dependencies and run commands
Basic familiarity with command-line operations
If you haven't already done so, clone the Wheels repository:
Before running tests, you need to install dependencies using CommandBox:
Alternatively, you can run the install command directly:
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:
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:
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
The test environment includes several profiles you can use with docker compose --profile [profile] up -d
:
all
All CFML engines, databases, and the TestUI
ui
Just the modern TestUI
ui-legacy
The legacy TestUI interface
lucee
Lucee 5 and 6 engines
adobe
Adobe ColdFusion 2018, 2021, 2023 engines
db
All database platforms
mysql
MySQL database only
postgres
PostgreSQL database only
sqlserver
SQL Server database only
quick-test
Minimal setup for quick testing (Lucee 5 + MySQL)
compatibility
Engines used for compatibility testing
current
Latest stable versions of engines
legacy
Older versions of engines
You can combine multiple profiles by specifying them together:
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:
Open the TestUI at http://localhost:3001
Select the CFML engine and database you want to test against (e.g., Lucee 5 + MySQL)
Select the test bundle or specific test to run
Click "Run Tests" to execute them
View the results in the UI
Repeat with different engine-database combinations to ensure full compatibility
You can also run tests directly via command line for specific engine-database combinations:
For thorough testing before submitting a PR, you should run tests on multiple engine-database combinations:
Test with Lucee 5 + MySQL (minimum requirement)
Test with at least one Adobe ColdFusion version (e.g., CF 2021)
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:
Lucee 5
cfwheels-test-lucee5
60005
Lucee 6
cfwheels-test-lucee6
60006
Adobe 2018
cfwheels-test-adobe2018
62018
Adobe 2021
cfwheels-test-adobe2021
62021
Adobe 2023
cfwheels-test-adobe2023
62023
MySQL
mysql
3307 (3306 internal)
PostgreSQL
postgres
5433 (5432 internal)
SQL Server
sqlserver_cicd
1434 (1433 internal)
H2
(embedded)
n/a
Modern TestUI
http://localhost:3001
Vue.js based interface with dark/light theme
Legacy TestUI
http://localhost:3000
Original test interface
The TestUI includes features to help manage the test environment:
Pre-flight Checks: Verify that all required containers are running before executing tests
Container Management: Start, stop, and restart containers directly from the UI
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:
Create a new test file in the appropriate directory:
For core functions: /tests/functions/YourTest.cfc
For request tests: /tests/requests/YourTest.cfc
Follow the TestBox syntax for your tests:
Run your new test using the methods described above to ensure it passes on all engine-database combinations
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
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
Port conflicts:
Edit the port mappings in compose.yml if needed
Use docker ps
to see what ports are in use
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
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
To update your test environment to the latest version:
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 .