application test : junit5 - 태깅, 필터링
This commit is contained in:
@@ -38,4 +38,35 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</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>
|
</project>
|
||||||
|
|||||||
@@ -11,23 +11,41 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||||||
class StudyTest {
|
class StudyTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("DisabledIfEnvironmentVariable test")
|
@DisplayName("tag test")
|
||||||
@DisabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
@Tag("fast")
|
||||||
void test_12() {
|
void test_14() {
|
||||||
System.out.println("테스트");
|
System.out.println("fast");
|
||||||
Study study = new Study(10);
|
Study study = new Study(10);
|
||||||
assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("EnabledIfEnvironmentVariable test")
|
@DisplayName("tag test")
|
||||||
@EnabledIfEnvironmentVariable(named = "TEST_ENV", matches = "KIM")
|
@Tag("slow")
|
||||||
void test_11() {
|
void test_13() {
|
||||||
System.out.println("테스트");
|
System.out.println("slow");
|
||||||
Study study = new Study(10);
|
Study study = new Study(10);
|
||||||
assertTrue(study.getLimit() > 0, () -> "limit 는 0보다 커야한다.");
|
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
|
// @Test
|
||||||
// @DisplayName("EnabledOnJre test")
|
// @DisplayName("EnabledOnJre test")
|
||||||
// @EnabledOnJre({JRE.JAVA_8, JRE.JAVA_11})
|
// @EnabledOnJre({JRE.JAVA_8, JRE.JAVA_11})
|
||||||
|
|||||||
Reference in New Issue
Block a user