본문 바로가기
프로그래밍/Java & Spring

gradle test코드를 패키지 단위로 제외시키는 방법

by 방구석개발자 2022. 9. 16.
반응형

test 코드를 패키지 단위로 제외시키는 방법

 

실무에서 테스트 자동화 도입시 study를 위한 테스트 코드는 제외해야되는 경우가 생겼습니다.

gradle에서 test 메소드를 만들때 아래와 같이 exclude를 하면 해당 패키지는 test할때 제외 됩니다.

test {
    systemProperty 'spring.profiles.active', 'test'
    useJUnitPlatform {
        exclude("com/study/**/*.class")
    }
}

 

반응형

'프로그래밍 > Java & Spring' 카테고리의 다른 글

Spring Cloud Service Discorvery  (0) 2023.03.25
CompletableFuture와 daemon Thread  (0) 2022.09.02
Java Spring OOM 분석 및 해결 후기  (0) 2022.08.18
Flyway 에러처리  (0) 2022.06.16
configuration test 대체하기  (0) 2022.05.07

댓글