p-unit 0.14

p-unit is a framework for benchmarking performance.
p-unit is a framework for benchmarking performance. The project records memory consumption and execution time, and generates results in the form of plain text, image, and PDF file. Users can also easily register their own reporters by implementing PUnitEventList.

Test Suite and Test Class

Test suite and test class are two important concepts in p-unit. p-unit does not require any special type for a test class, so every class can be a test class. Of course, it includes junit test cases. There is one special interface for special p-unit only test class - p-unitTest. p-unit executes a normal test as following procedure:

invoke setUp if there is.
invoke the test method.
invoke tearDown method.

Noticed that setUp and tearDown will also be regarded as a part of performance test. If you don't want to count them into performance data, you need to implement p-unitTest interface, which will be executed as:

invoke setUpBeforeWatchers.
invoke setAfterWatchers.
invoke the test method.
invoke tearDownBeforeWatchers.
invoke tearDownAfterWatchers.

As the name suggests, you can put the setUp and tearDown code into the setUpBeforeWatchers and tearDownAfterWatchers.

Time/Memory Record

p-unit records the memory and time consumption of running a test method. There is a "watcher" concept in p-unit, which supervises the status during running the test method. By default, memory watcher and time watcher are installed. p-unit supports user-defined watcher too. The user only needs to implement the Watcher interface and register it to p-unit method runner.

What's New in This Release:

The p-unit core is based on J2SE5 now.
Some minor bugs were fixed.

last updated on:
January 14th, 2008, 20:29 GMT
price:
FREE!
developed by:
Andrew Zhang
license type:
The Apache License 2.0 
category:
ROOT \ System \ Benchmarks

FREE!

In a hurry? Add it to your Download Basket!

user rating 22

UNRATED
3.5/5
 

0/5

Add your review!

SUBMIT