Skip to content

Feat/31 integration test #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 20, 2023
Merged

Feat/31 integration test #44

merged 13 commits into from
Jul 20, 2023

Conversation

junha-ahn
Copy link
Member

@junha-ahn junha-ahn commented Jul 18, 2023

What is this PR?

Key Changes

  • TestContainer를 사용하여 통합테스트 환경 구축 (및 Example Test 코드 추가)
    • 도커 의존성을 가지기 때문에, 도커 설치 필요
    • 싱글톤 패턴 적용
  • ./gradlew integrationTest를 통해 통합 테스트 실행(./gradlew test유닛 테스트만 실행)
  • Git actions 유닛 테스트 / 통합 테스트 병렬 실행
  • docker-compose.yml 추가
    • mysql container 추가
    • init script 설정 완료
    • docker-compose up을 통해 mysql 설치 없이 쉽게 개발 환경 세팅 가능
    • 향후 testcontainer에 각각의 container 구성 복잡성이 증가한다면, docker-compose를 testcontainer에서 사용

통합 테스트는 상당히 무거운 작업입니다 (docker 를 통해 mysql container를 구동합니다) 따라서 유닛 테스트와 분리 했습니다.
물런 해당 프로젝트에서 부르는 "유닛테스트"는 순수한 유닛테스트가 아니라, 통합테스트와 유닛테스트 사이에 어딘가에 있습니다 :)

Test Checklist

  • local test
  • git actions test

image

image

@junha-ahn junha-ahn linked an issue Jul 18, 2023 that may be closed by this pull request
9 tasks
@junha-ahn junha-ahn mentioned this pull request Jul 19, 2023
9 tasks
@junha-ahn junha-ahn self-assigned this Jul 19, 2023
@junha-ahn junha-ahn merged commit a968998 into main Jul 20, 2023
@junha-ahn junha-ahn deleted the feat/31-integration-test branch July 20, 2023 16:05
@junha-ahn junha-ahn mentioned this pull request Jul 21, 2023
13 tasks
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