CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
wheels test
⚠️ DEPRECATED: This command is deprecated. Use wheels test run
or the advanced testing commands (wheels test:all
, wheels test:unit
, etc.) instead.
Run Wheels framework tests (core, app, or plugin tests).
Synopsis
wheels test [type] [servername] [options]
Description
The wheels test
command runs the built-in Wheels framework test suite. This is different from wheels test run
which runs your application's TestBox tests. Use this command to verify framework integrity or test Wheels plugins.
Arguments
| Argument | Description | Default |
|----------|-------------|---------|
| type
| Test type: core
, app
, or plugin
| app
|
| serverName
| CommandBox server name | Current server |
Options
| Option | Description | Default |
|--------|-------------|---------|
| reload
| Reload before running tests | true
|
| debug
| Show debug output | false
|
| format
| Output format | json
|
| adapter
| Test adapter | ""
(empty) |
| --help
| Show help information | |
Test Types
Core Tests
wheels test core
- Tests Wheels framework functionality
- Verifies framework integrity
- Useful after framework updates
App Tests
wheels test app
- Runs application-level framework tests
- Tests Wheels configuration
- Verifies app-specific framework features
Plugin Tests
wheels test plugin
- Tests installed Wheels plugins
- Verifies plugin compatibility
- Checks plugin functionality
Examples
Run app tests (default)
wheels test
Run core framework tests
wheels test core
Run tests on specific server
wheels test type=app serverName=myserver
Run with debug output
wheels test debug=true
Skip reload
wheels test reload=false
Deprecation Notice
⚠️ WARNING: The 'wheels test' command is deprecated.
Please use 'wheels test run' instead.
See: wheels help test run
Output Example
╔═══════════════════════════════════════════════╗
║ Running Wheels Tests ║
╚═══════════════════════════════════════════════╝
Test Type: app
Server: default
Reloading: Yes
Initializing test environment...
✓ Environment ready
Running tests...
Model Tests
✓ validations work correctly (15ms)
✓ associations load properly (23ms)
✓ callbacks execute in order (8ms)
Controller Tests
✓ filters apply correctly (12ms)
✓ caching works as expected (45ms)
✓ provides correct formats (5ms)
View Tests
✓ helpers render correctly (18ms)
✓ partials include properly (9ms)
✓ layouts apply correctly (11ms)
Plugin Tests
✓ DBMigrate plugin loads (7ms)
✓ Scaffold plugin works (22ms)
╔═══════════════════════════════════════════════╗
║ Test Summary ║
╚═══════════════════════════════════════════════╝
Total Tests: 11
Passed: 11
Failed: 0
Errors: 0
Time: 173ms
✓ All tests passed!
Framework Test Categories
Model Tests
- Validations
- Associations
- Callbacks
- Properties
- Calculations
Controller Tests
- Filters
- Caching
- Provides/formats
- Redirects
- Rendering
View Tests
- Helper functions
- Form helpers
- Asset helpers
- Partials
- Layouts
Dispatcher Tests
- Routing
- URL rewriting
- Request handling
- Parameter parsing
Configuration
Test Settings
In /config/settings.cfm
:
<cfset set(testEnvironment=true)>
<cfset set(testDataSource="myapp_test")>
Test Database
Create separate test database:
CREATE DATABASE myapp_test;
Debugging Failed Tests
Enable debug mode
wheels test debug=true
Check specific test file
Failed: Model Tests > validations work correctly
File: /tests/framework/model/validations.cfc
Line: 45
Expected: true
Actual: false
Common issues
- Database not configured: Check test datasource
- Reload password wrong: Verify settings
- Plugin conflicts: Disable plugins and retest
- Cache issues: Clear cache and retry
Continuous Integration
GitHub Actions
- name: Run Wheels tests
run: |
box install
box server start
wheels test core
wheels test app
Jenkins
stage('Framework Tests') {
steps {
sh 'wheels test core'
sh 'wheels test app'
}
}
Custom Framework Tests
Add tests in /tests/framework/
:
component extends="wheels.Test" {
function test_custom_framework_feature() {
// Test custom framework modification
actual = customFrameworkMethod();
assert(actual == expected);
}
}
Performance Testing
Run with timing:
wheels test --debug | grep "Time:"
Monitor slow tests:
✓ complex query test (523ms) ⚠️ SLOW
✓ simple validation (8ms)
Test Isolation
Tests run in isolation:
- Separate request for each test
- Transaction rollback (if enabled)
- Clean application state
Troubleshooting
Tests won't run
# Check server is running
box server status
# Verify test URL
curl http://localhost:3000/wheels/tests
Reload issues
# Manual reload first
wheels reload
# Then run tests
wheels test reload=false
Memory issues
# Increase heap size
box server set jvm.heapSize=512
box server restart
Best Practices
- Run before deployment
- Test after framework updates
- Verify plugin compatibility
- Use CI/CD integration
- Keep test database clean
Migration to New Command
Old Command (Deprecated)
wheels test app
wheels test core myserver
wheels test debug=true
New Command
wheels test run
wheels test run --group=core
wheels test run --verbose
Difference from TestBox Tests
| Feature | wheels test
(deprecated) | wheels test run
|
|---------|---------------------------|-------------------|
| Purpose | Framework tests | Application tests |
| Framework | Wheels Test | TestBox |
| Location | /wheels/tests/
| /tests/
|
| Use Case | Framework integrity | App functionality |
| Status | Deprecated | Current |
See Also
- wheels test run - Run TestBox application tests
- wheels test coverage - Generate coverage reports
- wheels test debug - Debug test execution
- wheels reload - Reload application
- Synopsis
- Arguments
- Options
- Test Types
- Core Tests
- App Tests
- Plugin Tests
- Examples
- Run app tests (default)
- Run core framework tests
- Run tests on specific server
- Run with debug output
- Skip reload
- Deprecation Notice
- Output Example
- Framework Test Categories
- Model Tests
- Controller Tests
- View Tests
- Dispatcher Tests
- Configuration
- Test Settings
- Test Database
- Debugging Failed Tests
- Enable debug mode
- Check specific test file
- Common issues
- Continuous Integration
- GitHub Actions
- Jenkins
- Custom Framework Tests
- Performance Testing
- Test Isolation
- Troubleshooting
- Tests won't run
- Reload issues
- Memory issues
- Best Practices
- Migration to New Command
- Old Command (Deprecated)
- New Command
- Difference from TestBox Tests
- See Also