From what I could tell from CFUnit, the TestCase or TestSuite class
implemented the display code as well as the machinery to implement the test
runner.  Faithful to the Junit API, these are clearly separated in my
framework.  There is a base TestRunner class that you can extend, and there
is a TestListener class that you can also extend (there are others that you
can extend as well).  The TestListener class has a simple interface that
allows the TestRunner to to give it information about each test as it runs,
and it can do anything it wants with that info.  At the end, you can get the
test info from the TestListener (you have to extend it), and pass it on to
your presentation layer.  

So far, I have two presentation styles: plain text (same as Junit) and a
html interface that gives a lot more information about errors and failures.
One could also implement a remote interface to support running tests through
an IDE of your choice (ala Studio or DW extension).

Paul Kenney
WebMaster, CorporateWarriors.com
916-663-1963

-----Original Message-----
From: Jon Gunnip [mailto:[EMAIL PROTECTED]
Sent: Friday, March 19, 2004 9:50 AM
To: CF-Talk
Subject: Re: JUnit with Cold Fusion

I've also made some modifications to CFUnit.  It works great for
testing my Model layer which is written in CFC's.  I've got about 40
Tests running about 10 test functions each.  It is nice to open a web
page and see whether the recent changes you made have broken your
Model!

I added support for TestSuites to include other TestSuites as well as
individual Tests.  I also added some GetTickCount()'s to report the
execution time that each test function (as well as Test/TestSuite
execution times).

I would love to share my code, but because it is *highly* based on code
from the code in the DRK03 (which we purchased), I'm not sure if I am
prohibited from sharing my code.  Does anyone know?

By the way, the Mach-II/JUnit implementation for CFC's sounds great!
One complaint about cfunit is that the way it is written makes it
difficult to configure (and extend) the display of test results.  Hence,
the display code I've added on is a tad messy.  I would like to see an
elegant implementation that allows one to easily configure and extend
the display of test results.

Jon

>CFUnit is really handy and works similarly to JUnit. I have been
using
>it for a while now although I did added some additional assertions
for
>Query, Structure, Array and Component comparisons.
>
>Qasim
>
>-----Original Message-----
>From: Chris Jensen [mailto:[EMAIL PROTECTED]
>Sent: Thursday, March 18, 2004 9:31 PM
>To: CF-Talk
>Subject: JUnit with Cold Fusion
>
>
>Hi,
>I've been looking into getting into better testing practices with cold

>fusion development.
>I was looking into tools to support this, and while not actually a
cold
>fusion tool - JUnit (and some supporting projects for it) seems to be

>the best option by far, so I was thinking of trying to get it working
in
>
>CFMX.
>
>Has anyone else tried this and found any pitfalls?
>Or, does anyone know of some good native Cold Fusion tools that can
>provide the same thing?
>
>--
>  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to