> Hi All,
>
> I now have my StrutsTestCase's running. But I want to decorate them using
> JUnitPerf. The problem is that each time I invoke the StrutsTestCase
> perforAction() method Struts appears to re-initialize. This overhead
> detracts from the value of the load/stress tests performed by JUnitPerf.
>
> Is it possible to tell StrutsTestCase to initialize Struts once only?
>
No. This is due to the underlying JUnit design goal of having each test be
completely isolated. StrutsTestCase creates all mock objects from scratch
in the setUp() that is run from each test - this cannot be overriden in an
elegant way.
There were a couple messages on this yesterday. They addressed some ideas
for designing tests that invoke multiple Actions in a single test - search
the mail archives for strutstestcase using yesterday's date and you'll see
them.
Here's a link to an article on JUnit 'best practices'. In it, there is some
discussion on the value in keeping all tests isolated from each other. Look
for the section titled: "Avoid writing test cases with side effects".
http://www.javaworld.com/javaworld/jw-12-2000/jw-1221-junit.html
Best of luck,
Kevin
http://www.strutskickstart.com
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>