JUnitPerf Concepts


There are two major types of tests for JunitPerf: the timed test and the load test, defined by the TimedTest class and LoadTest class, respectively.

When you create a TimedTest test decorator, you pass it an existing JUnit test and a maximum elapsed time in milliseconds . A TimedTest is a JUnit TestDecorator, which fails the decorated test after a specified time. You can use the TimedTest in two ways: Wait until the test completes and check the elapsed time, or fail immediately if the elapsed time exceeds the maximum.

A LoadTest is also a test decorator that runs a test with a number of simulated users for a certain amount of iterations. You can slowly ramp the load or turn it on all at once.




Professional Java Tools for Extreme Programming
Professional Java Tools for Extreme Programming: Ant, XDoclet, JUnit, Cactus, and Maven (Programmer to Programmer)
ISBN: 0764556177
EAN: 2147483647
Year: 2003
Pages: 228

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net