Thanks for the reply Steffen.
I've been looking at HttpUnit the last couple of days and it will tie in
fine with JUnitDoclet for me. I can let JUnitDoclet generate my classes,
then use the HttpUnit APIs to access servlets etc. simply by modifying the
generated code as my connection methods and communication to the servlet
tests wouldn't be generated by JUnitDoclet anyway. HttpUnit tests also
extend JUnit's TestCase so everything will work fine.
John
-----Original Message-----
From: ste...@ob... [mailto:ste...@ob...]
Sent: 10 January 2003 15:42
To: John Bourke
Cc: jun...@li...
Subject: Re: [Junitdoclet-users] Customisation of output test classes
John,
thanks for your question.
> Is it possible to configure the output, say if I wanted my test class to
> extend something other than JUnits TestCase. I'm thinking this so I could
> tie in to HttpUnit also.
Sure you can extend your test classes from different base classes.
The current use of JUnit's TestCase is defined as part of
the template. There "TestCase" is placed between markers.
You can
a) modify the extend statement of your test classes.
Make them extend from different base classes (for
example MyTestCaseBase) on an individual basis
b) also have your test case implement an interface
(It is common to have sets of constants to be declared
in separate interface. Every class implementing that
interface then is aware of the constants and can use
them in a convinient way.) --- You didn't ask for interfaces,
I just tell anyway because it fits in here.
c) create your own template, if you want to change
the superclass of _all_ your test cases.
I've been thinking about generating for HttpUnit / Cactus.
It won't be difficult to extend JUnitDoclet for that, but
right now not everything for Cactus can be generated.
(it's the beginXYZ and endXYZ that won't shop up).
I guess, we will provide a variable for that XYZ very soon.
Maybe you can provide an example, how you would
like the generated classes to look like.
Regards,
Gruesse,
Steffen Gemkow
--
ObjectFab GmbH
ste...@ob...
|