[Coldbox-5.0.0][CF 2016][cborm 1.4.0+79] - error in running unit tests on CF

23 views
Skip to first unread message

Stefano Ricci

unread,
Jun 13, 2018, 11:03:30 AM6/13/18
to ColdBox Platform
Hi

first of all I need to say I'm new to coldbox, so please be patient :)

I'm developing a test application using cborm to connect to my DB.

I'm able to run the application and a (simple) unit test on a single cborm.models.ActiveEntity derived model using the CommandBox integrated Lucee app server

When I switch to my CF2016 installation, I'm still able to run the application, but when I try to unit test I get either

"Could not find the ColdFusion component or interface /.config.Coldbox."

or 

"Variable BINDER is undefined."

About the first error, in my tests/Application.cfc I have the following mappings (but I think they are non enough!)

// Create testing mapping
this.mappings[ "/tests" ] = getDirectoryFromPath( getCurrentTemplatePath() );
// Map back to its root
rootPath = REReplaceNoCase( this.mappings[ "/tests" ], "tests(\\|/)", "" );
this.mappings["/root"]   = rootPath;
this.mappings[ '/config' ] = rootPath & 'config';
this.mappings[ '/coldbox' ] = rootPath & 'coldbox';
this.mappings[ '/cborm' ] = rootPath & 'modules/cborm';
this.mappings[ '/models' ] = rootPath & 'models';


The second error ("Variable BINDER is undefined.") is sourced by coldbox\system\remote\ColdBoxProxy.cfc, where (I added a few dump to find the root cause)

var injector = getWirebox();

returns a structure which fields are undefined

Please note that the application I'm developing is not in the root of my IIS+CF2016 server (nor I can move it to the root)

I read the documentation and googled around but I was not able to find a solution :(

Any suggestion?

thanks in advance

Stefano



Reply all
Reply to author
Forward
0 new messages