사용자 도구

사이트 도구


java:junit:contiperf

문서의 이전 판입니다!


ContiPerf

Test Code

public class UserSerializerTest {
 
    @Rule
    public ContiPerfRule i = new ContiPerfRule();
 
    @Test
    @PerfTest(invocations = 200, threads = 2) // 2개 쓰레드에서 200번(각 100번)호출
    @Required(max = 1200, average = 250) // 테스트 통과조건
    public void shouldSerializeRandomUser() throws JAXBException {
 
        // ...
    }
}

테스트 코드 작동구조

First the @Before method is called. Then the test method is invoked 1,000 times subsequently and finally the @After method(s). ContiPerf 2 supports this behaviour for all JUnit 4 versions since version 4.7.
  • @Before 메소드 호출
  • @Test 메소드 지정된 횟수대로 호출
  • @After 메소드 호출
java/junit/contiperf.1448256076.txt.gz · 마지막으로 수정됨: 2015/11/23 13:51 저자 kwon37xi