setting up mxunit plugin for eclipse

157 views
Skip to first unread message

fmdano

unread,
Jul 30, 2014, 2:09:20 PM7/30/14
to mxu...@googlegroups.com
Hey all,
so i know mxunit is kinda being phased out, but I want to set it up again anyway. 
when I had it set up on an old machine, I had a custom remoteFacade.cfc. I am inside coldbox (2.6.3) so I also have to have a custom application.cfc file to keep mxunit separate from coldbox.

I remembered to use the custom remoteFacade file, i had to click on the project, pick properties, and set some info into the mxunit properties for the project. I set the path:

http://localhost/test/unit/remotefacade.cfc?wsdl then i try to run my test, and get an error...

an internal error occured durning "establishing connection to server:
could not connect to facade URL

my remotefacade is in projectFolder/test/unit

my remotefacade.cfc file extents this: coldbox.system.testing.BaseModelTest

it also has a cfinlude temlate="../Application.cfc"

I am not sure what am not doing wrong...i can run the tests via the browser, but for some reason i can't set up this mxunit plugin for builder 3.

any thoughts from anyone?

thanks
dan

Marc Esher

unread,
Jul 30, 2014, 4:06:51 PM7/30/14
to mxu...@googlegroups.com

Hey Dan,

You probably need to add wsversion=1 attribute to the cfcomponent tag for your custom remote facade. That's now required for any custom remote facade on cf 10 and above.

Marc

--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mxunit+un...@googlegroups.com.
To post to this group, send email to mxu...@googlegroups.com.
Visit this group at http://groups.google.com/group/mxunit.
For more options, visit https://groups.google.com/d/optout.

Jim O'Keefe

unread,
Jul 30, 2014, 7:07:12 PM7/30/14
to mxu...@googlegroups.com
Marc,could you clarify the status of mxunit? I hadn't heard it was "kinda being phased out."

Marc Esher

unread,
Jul 30, 2014, 9:11:41 PM7/30/14
to mxu...@googlegroups.com

Nothing has really changed... Which has been the status for some time. Nome of us who contributed heavily to mxunit are working with CF anymore, or at least aren't using it much. I've done a bad job of outreach on this part, due to very limited time (a bad excuse, I know)

fmdano

unread,
Aug 1, 2014, 8:31:46 AM8/1/14
to mxu...@googlegroups.com
Thanks Marc, i added that into my remoteFacade.
I update the properties of my project with the remotefacade.cfc file, and did a test URL, and i get a Server Response of FaultDetail and when i try to run the test, i get a can't establish connection to server.

when i run this in a browser: http://localhost/test/unit/RemoteFacade.cfc?wsdl&method=ping
i get The system has attempted to use an undefined value, programming error in code or null pointers are another reason for this.

not sure what I am doing wrong now...ugh


override test runner url: http://localhost/test/unit/RemoteFacade.cfc?wsdl
component root: cfc path: test.unit  (this is where I have my mxunit test files)


hope this helps and thanks for replying even though  you are not doing anything with mxunit...i figure i am close.

dan



On Wednesday, July 30, 2014 4:06:51 PM UTC-4, Marc Esher wrote:

Marc Esher

unread,
Aug 1, 2014, 8:40:50 AM8/1/14
to mxu...@googlegroups.com

Dan,

What happens when you hit localhost/mxunit/framework/remote facade.cfc?

Also, is there an application.cfc in your test folder that might be causing troubles? Basically, if ping doesn't work, the problem is usually in something outside of mxunit, such as application.cfc or a misconfigured server

Marc

fmdano

unread,
Aug 1, 2014, 9:49:08 AM8/1/14
to mxu...@googlegroups.com
I put the path above in chrome, and it came up wiht the mxunit.framework.remotefacate help page.

I do have an application.cfc page inside my test folder to keep the mxunit code separate from the coldbox code. my remoteFacade.cfc file is calling this...all this worked for CF8, now we are cf9, have not set it up for that...i am trying to get it to work on our new CF11 development server.

my remotefacade.cfc file which is inside my test/unit folder inside my webroot:
<!---<cfcomponent extends="mxunit.framework.RemoteFacade">--->
<cfcomponent extends="coldbox.system.testing.BaseModelTest" wsversion=1>
<cffunction name="actOnTestCase">
<cfargument name="testgetStatus">
<!--- TODO: Add include to your apps Application.cfm.
This would setup the Application scope when accessing tests from Eclipse
This RemoteFacade is used to call the internal application.cfc file that will set the application variables that are needed for the model functions such as dsn info.
--->
<cfinclude template="../Application.cfc">
</cffunction> 
</cfcomponent> 

my application.cfc file is a copy from the application.cfc file we are using for coldbox with a few additional queries added.

So, I am not really sure what I have done wrong...basic CF11 developer edition install, on port 80. I saw an issue on my application.cfc where I had the wrong path but rebooted CF and reran my test, and nothing...still the faultDetail...ugh. The browser works for testing, just not the built in extension for builder.

thanks for  your help...
dan

fmdano

unread,
Aug 1, 2014, 10:00:53 AM8/1/14
to mxu...@googlegroups.com
damnit, now i tried to run my test in the browser localhost/test/unit/foldname/filename.cfc?method=runTestremote and now the application.dsnName i set in the setup function says it is not found in application.

I guess this means because my remotefacade is not working, it is not referencing my application.cfc file, it can't set an application variable?

so this seems to be a server setup?

ugh!! :)

dan

Marc Esher

unread,
Aug 1, 2014, 10:15:24 AM8/1/14
to mxu...@googlegroups.com

Dan,

Your remotefacade should extend mxunit remotefacade,  not coldbox base test. Your tests should extend coldbox. Your remotefacade will likely also be empty except for the cfcomponent tag.

You don't need to include application.cfc anywhere. As long as the remotefacade is in the same directory or a subdirectory as the application.cfc, it'll run under that application.cfc context.

Marc

Reply all
Reply to author
Forward
0 new messages