What are the steps to reproduce this issue?
- Create a new ColdBox app:
coldbox create app name=myApp
- Start the server:
server start
- Create a model with its unit test:
coldbox create model User --tests
- Run the generated unit test:
testbox run bundles=tests.specs.unit.UserTest
What happens?
The test errors immediately with a global bundle exception before any specs run:
GLOBAL BUNDLE EXCEPTION
-> Application:The requested class [User] has not been located in the [bx] resolver.
What were you expecting to happen?
The generated test should run successfully out of the box, with the "can be created" spec passing.
Any logs, error output, etc?
Executing tests http://127.0.0.1:53134/tests/runner.bxm?&directory=&recurse=true&reporter=json&bundles=tests.specs.unit.UserTest&verbose=false please wait...
- tests.specs.unit.UserTest (50 ms)
[Passed: 0] [Failed: 0] [Errors: -1] [Skipped: 0] [Suites/Specs: 0/0]
GLOBAL BUNDLE EXCEPTION
-> Application:The requested class [User] has not been located in the [bx] resolver.:
-> at lib\testbox\system\MockBox.cfc:78
76: // class to mock
77: if ( !isNull( arguments.className ) ) {
78: obj = createObject( "component", arguments.className );
79: } else if ( !isNull( arguments.object ) ) {
80: // Object to Mock
-> at lib\coldbox\system\testing\BaseModelTest.cfc:27
-> at tests\specs\unit\UserTest.bx:16
-> at lib\testbox\system\runners\BDDRunner.cfc:71
-> at lib\testbox\system\TestBox.cfc:856
---------------------------------------------------------------------------------
╔═════════════════════════════════════════════════════════════════════╗
║ Passed ║ Failed ║ Errored ║ Skipped ║ Bundles ║ Suites ║ Specs ║
╠═════════════════════════════════════════════════════════════════════╣
║ 0 ║ 0 ║ -1 ║ 0 ║ 1 ║ 0 ║ 0 ║
╚═════════════════════════════════════════════════════════════════════╝
TestBox v7.0.0
CFML Engine BoxLang v1.13.0+54
Any other comments?
The issue is present in both flat and modern app layouts.
What versions are you using?
Operating System: Windows 11 Pro 25H2
Package Version: 8.12.0+30
What are the steps to reproduce this issue?
coldbox create app name=myAppserver startcoldbox create model User --teststestbox run bundles=tests.specs.unit.UserTestWhat happens?
The test errors immediately with a global bundle exception before any specs run:
What were you expecting to happen?
The generated test should run successfully out of the box, with the "can be created" spec passing.
Any logs, error output, etc?
Any other comments?
The issue is present in both flat and modern app layouts.
What versions are you using?
Operating System: Windows 11 Pro 25H2
Package Version: 8.12.0+30