MXUnit 2.0 w/ColdFusion 7?

42 views
Skip to first unread message

Jim Priest

unread,
Aug 2, 2010, 1:01:27 PM8/2/10
to mxunit
Does MXUnit 2.0 work with CF7?

On this page is sort of indicates NO:
http://wiki.fuseboxframework.com/display/default/Installation+Requirements

On this matrix it sort of appears MAYBE:
http://wiki.fuseboxframework.com/pages/viewpage.action?pageId=5734455

Inquiring minds (using CF7) want to know :)

Thanks!
Jim

Sean Corfield

unread,
Aug 2, 2010, 11:22:23 PM8/2/10
to mxu...@googlegroups.com
Where did you get those URLs? The fuseboxframework domains are going
away soon (because no one in the Fusebox community was interested in
taking them on - and they expire in two weeks).

John Whish

unread,
Aug 3, 2010, 4:04:43 AM8/3/10
to mxu...@googlegroups.com
Hi Sean,
The "getting started" and "installing the eclipse plugin" links on the wiki homepage (http://wiki.mxunit.org/display/default/MXUnit+Documentation) both point to wiki.fuseboxframework.com.
- John


--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To post to this group, send email to mxu...@googlegroups.com.
To unsubscribe from this group, send email to mxunit+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mxunit?hl=en.


Sean Corfield

unread,
Aug 3, 2010, 11:51:09 AM8/3/10
to mxu...@googlegroups.com
Thanx John.

Someone needs to fix those in the next two weeks then - and scrub the
mxunit wiki for any other errant references to the fuseboxframework
domain...

Sandra Clark

unread,
Aug 3, 2010, 12:30:08 PM8/3/10
to mxu...@googlegroups.com
Looks like someone named Bill Shelton took it upon himself to add those pages in the last month to both Wikis.  Perhaps locking down the wiki for the next few weeks would be appropriate?

Jim Priest

unread,
Aug 3, 2010, 1:36:51 PM8/3/10
to mxunit
So barring the bad links...

Can anyone confirm it works on CF7? I'd rather get confirmation before
spending hours trying to make it work :)

Jim

bill shelton

unread,
Aug 3, 2010, 2:36:32 PM8/3/10
to mxunit
Jim,

Download the nightly build for CF7 - http://mxunit.org/downloadNightly.cfm
. The core features will work. Advanced features like mocking and
dataproviders will not. The plugin should work fine.

And, Sandra, I'm going to have a word with that "Bill Shelton"
fellow ;-)

bill

Sandra Clark

unread,
Aug 3, 2010, 3:20:14 PM8/3/10
to mxu...@googlegroups.com
Ah ha!  The culprit is found!

Marc Esher

unread,
Aug 3, 2010, 9:44:46 PM8/3/10
to mxu...@googlegroups.com
"Who is Bill Shelton?"

Love,

Ayn Rand

Bob Chesley

unread,
Nov 10, 2011, 9:06:16 AM11/10/11
to mxu...@googlegroups.com
Just downloaded the latest build from mxunit.org and unpacked in webroot on a CF7 local machine and no joy on installation test (see message below).  Samples aren't happy either.  Many thanks in advance.
  • Type:
    Application
  • Message:
    Could not find the ColdFusion Component framework.TestCase.
  • Detail:
    Please check that the given name is correct and that the component exists.


Marc Esher

unread,
Nov 10, 2011, 9:56:04 AM11/10/11
to mxu...@googlegroups.com
Uggg....

Bob, try restarting CF and hit that page again.

If that doesn't work, try this:

1) restart CF
2) run http://localhost/mxunit/PluginDemoTests/run.cfm
3) run the mxunit home page

FWIW, we think we've fixed it in the latest stable release. You can
download that here: https://github.com/mxunit/mxunit/tags and give
that a shot, too.

> --
> You received this message because you are subscribed to the Google Groups
> "mxunit" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/mxunit/-/75wFTUunAUsJ.

Bob Chesley

unread,
Nov 10, 2011, 1:31:12 PM11/10/11
to mxu...@googlegroups.com
No luck with the run.cfm approach or restarts.  The dev box is Windows XP (:-() and it's running CF7 with the built in web server rather than IIS.

After pulling the latest build the home page shows:
  • Type:
    Template
  • Message:
    Invalid token '!' found on line 445 at column 28.
  • Detail:

    The CFML compiler was processing:

    • a script statement beginning with "if" on line 445, column 25.
    • a cfscript tag beginning on line 444, column 18.
    • a cfscript tag beginning on line 444, column 18.


Attribute validation error for tag directory.

The tag does not have an attribute called type. The valid attribute(s) are action, recurse, directory, name, filter, sort, newdirectory, mode, listinfo.
 
The error occurred in C:\CFusionMX7\wwwroot\mxunit\PluginDemoTests\run.cfm: line 12
10 : <cfset dir = expandPath(".")>
11 : 
12 : <cfset DTS = createObject("component","mxunit.runner.DirectoryTestSuite")>
13 : 
14 : <cfinvoke component="#DTS#" 

Thanks for your help.

Bob

Marc Esher

unread,
Nov 10, 2011, 3:47:32 PM11/10/11
to mxu...@googlegroups.com
Bob,

  Try opening up TestCase.cfc, and at line 45, replace "! " with "NOT. len... and see if that gets it working. We only test on CF8+ which is why we didn't catch this. I'll patch it this weekend.

Marc

--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mxunit/-/xEQz5cXXan0J.

Robert Chesley

unread,
Nov 10, 2011, 6:14:06 PM11/10/11
to mxu...@googlegroups.com
Marc, 

Will do tomorrow morning.  

Thanks again.

bc
--
Bob Chesley
NH SoftWerks LLC
Phone - 603-685-4253
Skype - bchesleynh
Twitter - @bobchesley
Blog - cfmeta.net

Bob Chesley

unread,
Nov 11, 2011, 9:17:33 AM11/11/11
to mxu...@googlegroups.com
Marc - made the !->NOT change in TestCase.cfc and ran into a different CF7 issue.

isInstanceOf not defined on line 493 in the same component.  Apparently this function is not in CF7.  

So, I added the following function def just above the offending line:
<cffunction name="isInstanceOf" access="public" returntype="Boolean" output="false">
      <cfargument name="obj" type="any" required="true"/>
      <cfargument name="reqType" type="string" required="true" />
      <cfset var searchMd = getMetaData(obj) />
      <cfif searchMd.name IS reqType >
        <cfreturn true />
      <cfelse>
        <cfloop condition="#StructKeyExists(searchMd, "extends")#">
           <cfset searchMd = searchMd.extends />
           <cfif searchMd.name IS reqType>
             <cfreturn true />
           </cfif>
        </cfloop>
      </cfif>
      <cfreturn false />
</cffunction>

This gets us around isInstanceOf, but...
The following two components have cfdump tags with attributecollection and no var attribute which CF7 requires:
/mxunit/framework/htmlTestResult.cfc
/mxunit/framework/remoteFacade.cfc

I swapped var for attributecollection in these and the test page runs cleanly.

If these changes seem good let me know and I would be happy to push them up to github (develop branch?).

Cheers, 

Bob
Reply all
Reply to author
Forward
0 new messages