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
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!
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...
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...
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.
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.
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.
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.
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