mxunit testsuite weirdness

I have a testsuit.cfm in the handlers/foo directory to run the foo
handler tests.
Every OTHER time I run it from the browser I get this error:
The handlers directory: C:\Inetpub\wwwroot\My Application\webroot
\handlers\foo\handlers does not exist please check your application
structure or your Application Mapping.
If I reload it it runs correctly. If I reload it again I get the above
error, again. what the heck?

Hmm, weirdness for sure.

Check the configAutoReload setting.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

OK, if I set the HandlersIndexAutoReload and ConfigAutoReload to any
combination of values other than both "false" I get the error every
time, but its not a CF error, it's a CB error. It's almost as though
it thinks C:\Inetpub\wwwroot\My Application\webroot\handlers\foo\ is
the application root and so it's looking for the default handlers
directory. The testsuite is in handlers\testing\testsuite.cfm
I added a mapping in CFAdmin so now Myapp/ m,aps to C:\Inetpub\wwwroot
\MyApp. The cf error now is :
The handlers directory: C:\Inetpub\wwwroot\MyApp\webroot\handlers
\testing\handlers does not exist please check your application
structure or your Application Mapping.
I dont know why webroot shows up twice.

Remember that the tests run outside of your web root, they are ran by mxunit. So it needs the correct information to run the tests.

If you are using coldbox 3, make sure your tests have the appMapping annotation in the cfcomponent tag

Which should have the path from the webserver root to your application, so it can create it and test it.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

I have a need of getPlugin(“JavaLoader”) in an authentication model cfc.

I’ve tried:

Didn’t work. Tried:

Didn’t work. Tried:

What do I need to do to have the coldbox api available to my whole cfc or even to an individual method?

Tim Heald

Luis we have not upgraded to 3 yet what the solution with the previous
version?

Tim,

Did you have autowire=“true” in your component declaration? It should look something like the following:

Tom

Turns out that even if you’re not going to cache the object, the dependencies are still cached and I was doing something wrong.

After I reset the framework it came right up, without the autowire=true.

Dude why are you hijacking my thread?

You are (as usual) correct sir. I added <Setting name="AppMapping"
value="/MyApp"/> to coldbox.xml.cfm and the problem magically
stopped.
Thanks Luis!

model objects DO NOT need autowire = true, because they can always be wired up.

Make sure that you request the objects via getModel() or wiring in the handlers.

Also, please note that an object’s metadata is cached. So if you add more metadata elements to a model, handler, etc, you will need to reinit the framework.

I have a ticket for this and it should be resolved in 3.0

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com