Skip to content

[Step2] ian.lee2 인수 테스트 체계 고도화 코드 리뷰#52

Open
ianlee2 wants to merge 8 commits intonext-step:ianlee2from
ianlee2:step2
Open

[Step2] ian.lee2 인수 테스트 체계 고도화 코드 리뷰#52
ianlee2 wants to merge 8 commits intonext-step:ianlee2from
ianlee2:step2

Conversation

@ianlee2
Copy link
Copy Markdown

@ianlee2 ianlee2 commented Feb 24, 2026

작업 요약

인수 테스트 체계를 고도화하여 테스트 실행 경로를 명확히 분리하고, Cucumber BDD + PostgreSQL + Docker 기반 검증 흐름을 구축했습니다.

주요 변경 사항

  • Cucumber BDD 테스트 구조 정비
  • test 태스크와 cucumberTest 태스크 역할 분리
  • PostgreSQL + Docker Compose 기반 테스트 자동화
  • 시나리오 단위 DB 초기화로 테스트 격리 강화
  • 테스트/실행 문서(README, TEST_RUN_GUIDE) 최신화

상세 변경

  • Cucumber 실행 엔트리/스텝 구성 정리
  • ./gradlew test
    • 로컬(H2) 기반 Cucumber 실행 경로
  • ./gradlew cucumberTest
    • dockerUp -> Cucumber 실행(spring.profiles.active=test) -> dockerDown
    • PostgreSQL 컨테이너 healthcheck 기반 대기 후 실행

Copy link
Copy Markdown

@shared-moon shared-moon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주승님 안녕하세요!
2단계 미션 잘 진행 해 주셨네요 :)
좀 고민해보면 좋을 것 같은 코멘트를 몇개 남겨뒀는데요
확인해보시고 리뷰 재요청 부탁드려요!

기능: 상품 관리

시나리오: 상품을 생성하고 목록에서 확인한다
Given 빈 데이터 상태다
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 개발자라 그런지 Given-When-Then은 약간 테스트코드를 문자열로만 옮겨 온 느낌인데요..!
만약 ~~라면 조건이 ~~일 때 응답은 ~~다 이런 식으로 표현될 수 있게 해보면 어떨까요 ?

기능: 선물하기

시나리오: 재고가 충분할 때 선물하기에 성공한다
Given 기본 테스트 데이터가 준비되어 있다
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중복 제거보단 테스트 데이터가 어떻게 세팅된지가 여기 드러나는게 좋을 것 같아요!
이건 비단 여기뿐만이 아니라 테스트코드 작성할때는 개인적으로 재사용성보단 테스트 가독성에 더 중점을 둬야 한다고 생각합니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants