Getting MXUnit to work when not in web root

We're trying to get MXUnit to work with our ColdBox 3 installation...
MXUnit has been installed in a common folder outside the web root,
which is maped to /mxunit in the IIS web server. We have our test
folder from ColdBox, however when we run

http://localhost/myAppName/test/TestSuite.cfm

We get an MXunit page but failures of the tests:

GeneralTest Error The .integration.GeneralTest name is not a valid
component or interface name.
Component and interface names cannot be empty and cannot start or end
with a period.

MainTest Error The .integration.MainTest name is not a valid
component or interface name.
Component and interface names cannot be empty and cannot start or end
with a period.

Obviously there's still something missing somewhere but not sure
where!

In myAppname/test/Application.cfc we have this:

<cfcomponent output="false">
  <!--- APPLICATION CFC PROPERTIES --->
  <cfset this.name = "ColdBoxTestingSuite" &
hash(getCurrentTemplatePath())>
  <cfset this.sessionManagement = true>
  <cfset this.sessionTimeout = createTimeSpan(0,0,30,0)>
  <cfset this.setClientCookies = true>

  <cfset this.mappings['/coldbox'] = "C:\Inetpub\common\ColdBox\v3.0.0
M6 (vendor)" />
  <cfset this.mappings['/mxunit'] = "C:\Inetpub\common\MXunit\v2.0.0
(vendor)" />
</cfcomponent>

Anyone help with what else we need to configure, I read some things
about "appMapping", but still can't peice together where (if anywhere)
this setting should go...

Cheers,
Colin.

You need to modify your rewrite rules to not rewrite your tests and mxunit
directories.

Regards,
Andrew Scott
http://www.andyscott.id.au/

This link might help more, very basic info.

http://www.andyscott.id.au/2010/9/23/ColdFusion-and-ColdBox-unit-testing-wit
h-SES-URLs

Regards,
Andrew Scott
http://www.andyscott.id.au/

Hi Andy - thanks - we're not actually using re-write rules at all at
the moment, as we're not using SES for this app just now... so have
nothign being rewritten anyway...

Colin,

It thinks its an AppMapping issue.

Your app is probably using an app specific mapping for '/'.

When the test suite tries to determine the path to the tests
it calculates incorrectly causing the leading '.'

MXUnit can be a bit of a pain when its not in the webroot.
It expects to be there, and expects all of your apps to be, as well.
Which is not great when you take advantage of app specific mappings and set the root to your app,
commonly done when using virtual hosts instead of a webroot filled with apps.

I believe it is possible to get mxunit running from an external folder.
You will still need the IIS virtual folder you have setup to allow the result output to find the assets (css,js,images).
Don't forget to set the appMapping meta data on your integration test cfc meta data, too.

I haven't had the time to dig into this, yet.
I end up putting mxunit in the app webroot and exclude it on builds.
If you or anyone else has please post it.

Quick update on this one as I think I've got it working for us now

Posted on the MXUnit UG:- http://groups.google.com/group/mxunit/browse_thread/thread/d533bde9879620d4

Thanks for all the help everyone.

Cheers,
James

If you had followed my advice about setting a Virtual Directory for you
mxunit, you would not have had to map it in ColdFusion as you have.

I know you said that you didn't have SES switched on but even still mappings
and Virtual Directories still play a big part, as do the mappings or
settings of the project and or global settings in Eclipse/CF Builder.

But it is good to know you are sorted.

Regards,
Andrew Scott
http://www.andyscott.id.au/

Hi Andy,

Sorry unless I'm misunderstanding you I don't see how IIS Virtual
Directories have any influence on the CF side of things.

The mappings are needed for the CFC calls made in the Unit tests and
so MXUnit has copies of ColdBox, Transfer etc. I personally can't
think of any other way I could do it but I'm happy to take any advice
if you have it.

In your blog post you're running MXUnit off the root. In our case
we're wanting to run it from two levels in so things weren't as
straight forward as I'd hoped but we did try and implement it in the
way you'd suggested and countless others.

We've managed to get there though and it seems to be holding up. Not
the easiest beast to configure but we got there.

Thanks very much for your input :-).

Cheers,
James

No, in my blog post I am running it from a directory elsewhere on my HD. The
only way it appears in the root is via a Virtual Directory, if you setup a
VDir you don't need the ColdFusion mappings.

I can see the confusion when I meant underneath, I didn't mean literally but
the opposite. The directory is actually sitting a level below the wwwroot
directory.

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of James Buckingham
Sent: Tuesday, 5 October 2010 10:08 AM
To: ColdBox Platform
Subject: [coldbox:6067] Re: Getting MXUnit to work when not in web root

Hi Andy,

Sorry unless I'm misunderstanding you I don't see how IIS Virtual

Directories

have any influence on the CF side of things.

The mappings are needed for the CFC calls made in the Unit tests and so
MXUnit has copies of ColdBox, Transfer etc. I personally can't think of

any

other way I could do it but I'm happy to take any advice if you have it.

In your blog post you're running MXUnit off the root. In our case we're
wanting to run it from two levels in so things weren't as straight forward

as