Performance testing Tools
For Java developers, it is cumbersome to learn performance testing tools.
But sometimes there is a need for performance testing.
Junitperf
Junitperf is a performance testing framework designed for Java developers, and it's easy to learn if you have Junit.
Characteristics
Support junit4+jdk1.7+, easy to get started (@since 1.0.0)
Support junit5+jdk1.8+, easy to use (@since 2.0.0)
Support i18n
- Performance reports support Custom Outreach
Getting Started with examples
Introductory Case Address
<dependency> <groupId>com.github.houbb</groupId> <artifactId>junitperf</artifactId> <version>2.0.0</version></dependency>
import com.github.houbb.junitperf.core.annotation.JunitPerfConfig;public class HelloWorldTest { @JunitPerfConfig(duration = 1000) public void helloTest() throws InterruptedException { Thread.sleep(100); System.out.println("Hello Junit5"); }}
Test Result Log Form
[INFO] 2018-01-14 22:16:31.419 [] - Started at: 2018-01-14 22:16:30.194[INFO] 2018-01-14 22:16:31.419 [] - Invocations: 10[INFO] 2018-01-14 22:16:31.420 [] - Success: 10[INFO] 2018-01-14 22:16:31.420 [] - Errors: 0[INFO] 2018-01-14 22:16:31.420 [] - Thread Count: 2[INFO] 2018-01-14 22:16:31.421 [] - Warm up: 0ms[INFO] 2018-01-14 22:16:31.421 [] - Execution time: 1000ms[INFO] 2018-01-14 22:16:31.421 [] - Throughput: 10/s (Required: -1/s) - PASSED[INFO] 2018-01-14 22:16:31.424 [] - Min latency: 200.2112ms (Required: -1.0ms) - PASSED[INFO] 2018-01-14 22:16:31.424 [] - Max latency: 205.67862ms (Required: -1.0ms) - PASSED[INFO] 2018-01-14 22:16:31.425 [] - Ave latency: 202.97829ms (Required: -1.0ms) - PASSED
HTML form
Java Performance Testing Framework tool-junitperf