|
Hello. I am trying to use JUnitPerf through a servlet rather than
the command line. Is this possible? I have a few test cases built
with JUnit that are working fine. I am also using JUnitEE so that I
can run these tests in a servlet environment. JUnitEE comes with a
servlet runner and a couple of GUI screens for test selection and
results. That is working fine as well. However, when I try and
integrate JUnitPerf for a Timed test, it does not seem to be
working.
For example, one of my existing test cases takes about 2 minutes to
run normally. It runs a database query and it is successful if one
or more records come back. When I try and use JUnitPerf to wrap
around this test case for a timed test (less than 30 seconds is
successful), it only runs for about 1 second and comes back
successful. So, I'm not sure if the test is running at all. I've
tried using junit.textui.TestRunner.run() to run the test, but this
method is mainly used from the command line, so I'm not sure it will
work in my case. I've also tried Test.run(), but I get the same
results.
So, I guess my questions are 1) is JUnitPerf compatible with JUnitEE,
2) can JUnitPerf be run in a servlet/J2EE environment, 3) what are
some alternate techniques for running my test where I perhaps can
evaluate the results of the timed test to see if it actually ran
correctly?
Thanks!
|