|
At the moment the performance test range caters for a maximum
execution time for a test case. How could one go about determining
the average time for the test case being executed n times with m
number of conurrent threads?
Further to that, how could one add in some other performance results
calculation formulas such as 90th percentile?
One approach I have looked into to so write an ElapsedTimeTest which
extends TimedTest. The printElapsedTime(long elapsedTime) method
which writes each test elapsedTime to a file.
Then I have another test case called AverageLoadTest which has
assert methods for minimum duration, maximum duration, median
duration, mean duration. The minimum and maximum can also take a
ratio (0.0 to 1.0) which defines the percentile for reporting.
This means though that if I have test case MyClassTestCase, I then
need to have MyClassPerformanceTest to execute the test case, and
also have MyClassAverageLoadTest to assert the results of the
performance test for MyClass.
Is there anyway I can combine all this together, perhaps as a single
test suite? The average load test must be executed after the elapsed
time tests complete.
Thanks,
Peter
|