mxunit testsuite weirdness

9 views
Skip to first unread message

jim collins

unread,
Dec 15, 2009, 12:07:13 PM12/15/09
to ColdBox Platform
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?

Luis Majano

unread,
Dec 15, 2009, 4:15:23 PM12/15/09
to col...@googlegroups.com
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



--
You received this message because you are subscribed to the Google Groups "ColdBox: A ColdFusion Framework" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For more information, visit http://www.luismajano.com/projects/coldbox
For Documentation, visit http://ortus.svnrepository.com/coldbox/trac.cgi

jim collins

unread,
Dec 16, 2009, 3:16:17 PM12/16/09
to ColdBox Platform
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.


On Dec 15, 4:15 pm, Luis Majano <lmaj...@gmail.com> wrote:
> 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
>

Luis Majano

unread,
Dec 16, 2009, 4:13:43 PM12/16/09
to col...@googlegroups.com
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

<cfcomponent appMapping="/pathToApp">

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


Timothy Heald

unread,
Dec 17, 2009, 11:47:52 AM12/17/09
to col...@googlegroups.com

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

 

I’ve tried:

 

      <cfproperty name="ColdBox" type="coldbox" scope="variables">

 

Didn’t work.  Tried:

 

 

      <cfproperty name="JavaLoader" type="coldbox:plugin:Javaloader" scope="instance">

 

Didn’t work.  Tried:

 

            <cfargument name="JavaLoader" type="any" _wireme="coldbox:plugin:Javaloader">

 

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

 

Tim Heald

 

jim collins

unread,
Dec 17, 2009, 1:14:17 PM12/17/09
to ColdBox Platform
Luis we have not upgraded to 3 yet what the solution with the previous
version?

On Dec 16, 4:13 pm, Luis Majano <lmaj...@gmail.com> wrote:
> 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
>
> <cfcomponent appMapping="/pathToApp">
>
> 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
>

Thomas Woestman

unread,
Dec 17, 2009, 1:24:42 PM12/17/09
to col...@googlegroups.com
Tim,

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

<cfcomponent name="secureSite" output="false" autowire="true">

Tom

--

jim collins

unread,
Dec 17, 2009, 1:44:53 PM12/17/09
to ColdBox Platform
Dude why are you hijacking my thread?

jim collins

unread,
Dec 17, 2009, 1:46:07 PM12/17/09
to ColdBox Platform
You are (as usual) correct sir. I added <Setting name="AppMapping"
value="/MyApp"/> to coldbox.xml.cfm and the problem magically
stopped.
Thanks Luis!

On Dec 16, 4:13 pm, Luis Majano <lmaj...@gmail.com> wrote:
> 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
>
> <cfcomponent appMapping="/pathToApp">
>
> 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
>

LRS Scout

unread,
Dec 17, 2009, 1:28:06 PM12/17/09
to col...@googlegroups.com

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.

Luis Majano

unread,
Dec 17, 2009, 3:06:13 PM12/17/09
to col...@googlegroups.com
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


Reply all
Reply to author
Forward
0 new messages