Skip to content

refactor: 테스트 코드 작성 및 테스트 환경 통합#11

Merged
changi1122 merged 10 commits intodevelopfrom
refactor
Feb 22, 2025
Merged

refactor: 테스트 코드 작성 및 테스트 환경 통합#11
changi1122 merged 10 commits intodevelopfrom
refactor

Conversation

@changi1122
Copy link
Contributor

@changi1122 changi1122 commented Feb 22, 2025

  • MusicActionService와 MusicAnalysisService에 대해 테스트 코드를 새롭게 추가
  • MusicController 테스트를 수정하여 새로 작성
  • 통합 테스트(서비스)와 컨트롤러 테스트에 대해 IntegrationTestSupport, ControllerTestSupport 클래스를 만들고, 각 테스트 클래스가 상속하도록 하여 ApplicationContext 생성 횟수를 4회 -> 2회로 축소시킴. 테스트 속도 향상.

@github-actions
Copy link

Test Results

77 tests  +35   77 ✔️ +35   3s ⏱️ -1s
  9 suites +  2     0 💤 ±  0 
  9 files   +  2     0 ±  0 

Results for commit deb1fef. ± Comparison against base commit f07eb61.

This pull request removes 7 and adds 42 tests. Note that renamed tests count towards both.
kr.ac.chungbuk.harmonize.HarmonizeApplicationTests ‑ contextLoads()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ create()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ delete()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ list()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ listMusicOfTheme()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ listThemes()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ update()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ create()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ delete()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ list()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ listMusicOfTheme()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ listThemes()
kr.ac.chungbuk.harmonize.controller.MusicControllerOldTest ‑ update()
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ 새로운 음악을 생성한다.
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ 음악 생성시 노래방 번호 길이가 50을 넘으면 400 오류가 응답된다.
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ 음악 생성시 장르 문자열 검증 오류시 400 오류가 응답된다.
kr.ac.chungbuk.harmonize.controller.MusicControllerTest ‑ 회원 권한으로 음악을 생성하면 403 오류가 응답된다.
…

@changi1122 changi1122 merged commit e5f146b into develop Feb 22, 2025
3 checks passed
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.

1 participant