3.15. Test Templates

@TestTemplate method is not a regular test case but rather a template for test cases. As such, it is designed to be invoked multiple times depending on the number of invocation contexts returned by the registered providers. Thus, it must be used in conjunction with a registered TestTemplateInvocationContextProvider extension. Each invocation of a test template method behaves like the execution of a regular @Test method with full support for the same lifecycle callbacks and extensions. Please refer to Providing Invocation Contexts for Test Templates for usage examples.



3.15. 테스트 템플릿츠

@TestTemplate 매서드는 정기적인, 규칙적인 테스트 케이스가 아니고 정확히 말하자면 테스트 케이스들을 위한 템플릿 입니다. 그 때문에, 그것은 등록 프로 바이더가 돌려주는 호출 문맥의 수에 응해, 여러번 호출하도록 설계되고 있습니다. 따라서 그것은 반드시 등록TestTemplateInvocationContextProvider 의 확장과 함께 사용해야 합니다. 테스트 템플릿 메소드를 호출 할 때마다 동일한 라이프 사이클 콜백 및 확장을 완벽하게 지원하는 일반 @Test 메소드를 실행하는 것처럼 동작합니다. 사용 예제는 Providing Invocation Contexts for Test Templates 을 참조하십시오.


























'스터디 > JUnit' 카테고리의 다른 글

[JUnit5] 3.17. Parallel Execution  (0) 2018.12.26

+ Recent posts