application test : junit5 - 태깅, 필터링
This commit is contained in:
@@ -38,4 +38,35 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- 기본 profile 설정 -->
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<!-- 빌드시 사용할 설정 추가-->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<groups>fast</groups>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>ci</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -11,23 +11,41 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
class StudyTest {
|
||||
|
||||
@Test
|
||||
@DisplayName("DisabledIfEnvironmentVariable test")
|
||||
@DisabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
||||
void test_12() {
|
||||
System.out.println("테스트");
|
||||
@DisplayName("tag test")
|
||||
@Tag("fast")
|
||||
void test_14() {
|
||||
System.out.println("fast");
|
||||
Study study = new Study(10);
|
||||
assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("EnabledIfEnvironmentVariable test")
|
||||
@EnabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
||||
void test_11() {
|
||||
System.out.println("테스트");
|
||||
@DisplayName("tag test")
|
||||
@Tag("slow")
|
||||
void test_13() {
|
||||
System.out.println("slow");
|
||||
Study study = new Study(10);
|
||||
assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
||||
}
|
||||
|
||||
// @Test
|
||||
// @DisplayName("DisabledIfEnvironmentVariable test")
|
||||
// @DisabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
||||
// void test_12() {
|
||||
// System.out.println("테스트");
|
||||
// Study study = new Study(10);
|
||||
// assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// @DisplayName("EnabledIfEnvironmentVariable test")
|
||||
// @EnabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
||||
// void test_11() {
|
||||
// System.out.println("테스트");
|
||||
// Study study = new Study(10);
|
||||
// assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
||||
// }
|
||||
|
||||
// @Test
|
||||
// @DisplayName("EnabledOnJre test")
|
||||
// @EnabledOnJre({JRE.JAVA_8, JRE.JAVA_11})
|
||||
|
||||
Reference in New Issue
Block a user