Skip to content

[refactor/#450] 테스트 패키지 구조와 네이밍 컨벤션 정리#451

Merged
Dimo-2562 merged 31 commits into
developfrom
refactor/#450
Jun 22, 2026
Merged

[refactor/#450] 테스트 패키지 구조와 네이밍 컨벤션 정리#451
Dimo-2562 merged 31 commits into
developfrom
refactor/#450

Conversation

@Dimo-2562

Copy link
Copy Markdown
Contributor

❤️ 기능 설명

테스트 패키지 구조와 네이밍 컨벤션을 정리했습니다.

  • 테스트 컨벤션 문서를 한글 기준으로 보강하고 문서 패키지를 정리했습니다.
  • 도메인별 테스트 fixture 소유 경계를 정리했습니다.
  • 테스트 클래스의 @Nested 구조와 테스트 메서드명을 도메인 단위로 정리했습니다.
  • controller 테스트 패키지를 integration 기준으로 정리했습니다.

테스트 결과: ./gradlew compileTestJava test -PexcludeIntegration 성공

연결된 issue

연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #450



🩷 Approve 하기 전 확인해주세요!

  • 테스트 fixture를 각 도메인 소유 기준으로 나눈 방향이 괜찮은지 확인해주세요.
  • @Nested 그룹명과 테스트 메서드명이 읽기 좋은지 확인해주세요.

✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 테스트 결과 사진을 넣었는가?
  • 이슈넘버를 적었는가?

Dimo-2562 added 30 commits June 22, 2026 09:53
Constraint: 도메인 단위로 Nested 구조와 테스트 메서드명을 함께 정리

Confidence: high

Scope-risk: moderate

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.activity.*'; activity integration tests with temporary MySqlRedisIntegrationTestBase restored afterward

Not-tested: full test suite
Constraint: 도메인 단위로 Nested 구조와 테스트 메서드명을 함께 정리

Confidence: high

Scope-risk: moderate

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.post.*'; post integration tests with temporary MySqlRedisIntegrationTestBase restored afterward

Not-tested: full test suite
Constraint: 도메인 단위로 Nested 구조와 테스트 메서드명을 함께 정리

Confidence: high

Scope-risk: moderate

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.personalization.*'; personalization integration test with temporary MySqlRedisIntegrationTestBase restored afterward

Not-tested: full test suite
Constraint: legacy domain/recommendation root 유지

Confidence: medium

Scope-risk: moderate

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.domain.recommendation.*'

Not-tested: RecommendationIntegrationTest blocked by Elasticsearch container startup timeout; MySqlRedisIntegrationTestBase check blocked by schema-validation mismatch
Constraint: legacy domain/source root 유지

Confidence: medium

Scope-risk: moderate

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.domain.source.*'

Not-tested: RssCrawlingJobIntegrationTest blocked by MySqlRedisIntegrationTestBase schema-validation mismatch
Constraint: legacy domain/search root 유지

Confidence: high

Scope-risk: narrow

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.domain.search.*'

Not-tested: full test suite
Constraint: shared global test support files 제외

Confidence: high

Scope-risk: narrow

Tested: ./gradlew compileTestJava; ./gradlew test -PexcludeIntegration --tests 'com.techfork.global.*'

Not-tested: full test suite
@Dimo-2562 Dimo-2562 self-assigned this Jun 22, 2026
@Dimo-2562 Dimo-2562 added the 🌟 REFACTOR 리팩터링 (기능 변화 X) label Jun 22, 2026
일반 integrationTest 레인은 MySQL/Redis base를 기본으로 맞추고, ES가 필요한 평가/검색 품질 검증은 기존 IntegrationTestBase에 남긴다. 테스트 전용 H2 설정은 @TestConfiguration으로 제한해 SpringBootTest 스캔에 새지 않게 한다.

Constraint: CI에서 Elasticsearch Testcontainer 시작 timeout이 일반 통합 테스트 컨텍스트까지 실패시킴

Rejected: 모든 integrationTest에서 IntegrationTestBase 유지 | ES 비사용 API 테스트가 ES 컨테이너 상태에 종속됨

Confidence: high

Scope-risk: moderate

Directive: ES 실기동이 필요한 테스트만 IntegrationTestBase를 사용하고 일반 API IT는 MySqlRedisIntegrationTestBase를 사용한다

Tested: ./gradlew integrationTest; ./gradlew integrationTest --tests 'com.techfork.auth.integration.AuthIntegrationTest'; ./gradlew integrationTest --tests 'com.techfork.activity.bookmark.integration.BookmarkIntegrationTest'; ./gradlew test --tests 'com.techfork.domain.source.batch.RssFeedReaderTest.enclosureExistsWithoutMedia_ExtractsThumbnail' -PexcludeIntegration

Not-tested: ./gradlew test -PexcludeIntegration 전체 레인은 RssFeedReaderTest enclosure timeout 플래키 1건으로 실패 후 단일 재실행 통과
@Dimo-2562 Dimo-2562 merged commit c99432c into develop Jun 22, 2026
1 check passed
@Dimo-2562 Dimo-2562 deleted the refactor/#450 branch June 22, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 REFACTOR 리팩터링 (기능 변화 X)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 테스트 패키지 컨벤션 및 fixture 정리

1 participant