The generator.cfm in the generator directory (like,
http://localhost/mxunit/generator/generator.cfm) is the original
generator that bill wrote. It's pretty self-explanatory once the page
actually loads. It might take a while to load, though, because he's
using the cfcexplorer built into coldfusion to load up the select
list, and cfcexplorer is a slow pig of a thing.
anyway, once that page loads, it has lots of instructions on there for
how to use it.
The other generator that comes with mxunit hasn't been put through the
ringer, so to speak, but it works quite nicely in my experience. Mike
Rankin, another mxunit contributor, wrote a project called CFCBlaster
and he ported part of that project to work with mxunit. IT uses XSLT
to generate tests. you can load it at
http://localhost/mxunit/cfcblaster/ The benefits of using the
cfcblaster teset generator are 1) it recurses subdirectories, unlike
the original generator and 2) you can use your own style sheets to
create tests that suit your style. Basicallly, you can just copy one
of the built-in xslt documents, paste it into a new file name, and
modify it until it does what you want. But you don't need to do that
at all. just select one of the pre-built ones and have at it.
When cfcblaster loads, it'll have some weird options in the text
fields, so overwrite them with whatever is appropriate to your
environment (you'll see what i mean). Then hit "submit" and let her
rip.
Eventually, we'll get the whole "which generator to use" thing sorted out.
Sorry for the confusion. Please post back if you have troubles using
either of the generators.
Marc
Oh, one more thing. while we're on the subject of cranking out test
cases, as you write new test cases where you're not using the
generator, you might want to check out the MXUnit snippets if you're
using Eclipse. Instructions for using it are here:
http://mxunit.org/doc/index.cfm?doc=eclipsesnippets
Now, these "snipex" snippets are different from regular snippets in
a very important way: you can't assign "shortcuts" to them. this sucks
and I hope someday that this gets remedied. Nonetheless, you can still
create your own snippets for the kind of code you find yourself
writing over and over, and you can assign shortcuts to those snippets.
It's a good idea, I think, to spend a few minutes reading this:
http://trac.cfeclipse.org/cfeclipse/wiki/CFSnippets
it's the "official" cfeclipse.org snippets documentation. there's also
a link at the top for a video showing how to use them!
marc
I don't see an "MX Unit" subtree after following those instructions...
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
also, note that the mxunit package is at the bottom of the tree.
Marc
I FOLLOWED THE INSTRUCTIONS EXACTLY! :)
I had never setup SnipEx before.
> also, note that the mxunit package is at the bottom of the tree.
The last entries are:
General (empty)
Prototype.js
SwissMades (empty)
Eclipse (empty)
CF Functions
My last two entries are Javascript and MXUnit.
I'm afraid this is beyond me; so I'm going to email todd sharp and see
if he has any suggestions.
Thanks Sean.
Marc
what do you think?
I have tried to set that up on 2 computers, none have ever had a snipex
server added before.
So there was never a cache to clear, and all I get is an icon with no text.
And YES, like Sean I followed the instructions.
Now having said that, I did do a 3rd one (actually my first one many months
ago) where I had this problem and came across that the URL is dodgy in some
way. And came across a leaner one or one that worked at least. Do you think
I can find it again:-)
Maybe a bug in snipex server or client side, not sure either way the
instructions do not work for me either.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 9015 8628
Mobile: 0404 998 273
Now I know the reason, the site is down:-(