| Issue 92: | getComponentRoot breaks on J2EE deploys - mxunit-0.9.88-rc1 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Version: mxunit-0.9.88-rc1 getComponentRoot should not compensate for context root. Context root is only applicable to requests coming to the server. Example: Take this file path: cfusion.war/includes/myPic.cfm To access it through the web I would go to http://localhost/cfusion/includes/myPic.cfm note that cfusion is my context root. In the simplest of setups the context root is the same as the WAR's name (excluding the .war). To include this on another page (any page) I would use <cfinclude template="/includes/myPic.cfm" />. Notice when I include that file there is no cfusion.
Mar 14, 2008
Project Member
#1
virtix
Mar 14, 2008
Hey Adam, which J2EE server do you use?
Mar 14, 2008
I got JBoss 4.x and CF8 Working together, so, I'm seeing the issue ... Pop Quiz: How many possible CF configurations can you have? What is the coverage criteria to functionally test that?
Status:
Accepted
Mar 14, 2008
Fixing getComponentRoot Fixes it, the other one getInstallRoot() should still contain the context root information. I have one more bug I saw I will submit a fix info sometime this weekend (the linking to rerun specific test cases is not taking context roots into account). As long as you install ColdFusion EAR (if you are using updater 1) or a ColdFusion war into jboss in something other than ROOT you should be able to write code and test it to ensure it works in all J2EE environments. 2 Rules to make sure you follow, never write anything that directly references your .war folder/file name (as this will inevitably differ in other installs) and never assume the context root matches the .war name (as it will not in many instances).
Mar 14, 2008
Ok, try 0.9.88-rc1 again. I just deleted the old one (i know ...bad form) and re- uploaded it. I got JBoss up and running and installed cf as a war - nice and fast! Finally understand what the issue is: getComponentRoot() was including /cfusion.mxunit... but now works and ignores the cfusion context. getInstallRoot() correctly returns the path info on JBoss and other non J2EE installs, /cfusion/mxunit/... Nested installations also work. So, we should be real close. >the linking to rerun specific test cases is not taking context roots into account I saw that, too, I think using the ComponentUtils.getInstallRoot() should do the trick in ExtTestResult. dude, you're giving me a real workout here ... thx
Status:
In
Cc: marc.esher
Mar 14, 2008
bill, are you saying getting it installed was nice and fast, or it runs faster? just curious.
Mar 14, 2008
Runs faster! But install was easier than expected. I felt I was fortunate with the install. Unzip jboss, run cfinstall for j2ee and put cfusion.war into /servers/default/deploy and then do a jboss/bin/run ...
Mar 14, 2008
It really is easy. If you install WTP into eclipse you can even start and stop it in Eclipse. Check out my blog for a nice ANT build that will push projects from a workspace out to your install, that how we are all setup at Kroger.
Mar 15, 2008
Adam, let me know if this build works for you and I can release it. thx! And I'll be sure to check out WTP and the like. cool stuff
Mar 15, 2008
it's been a long time since i investigated running cf inside a j2ee container, but if i remember correctly, wasn't that for enterprise-only? we run pro at work, so if it's enterprise only it'd be a no-go before i even got started.
Mar 15, 2008
I checked out trunk and it seems to be working as expected. I'll file a new bug about the links.
Mar 17, 2008
done
Status:
Verified
|