문서의 이전 판입니다!
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
메소드 호출