Skip to content

[DEV-178/BE] test: dashboard controller 통합 테스트 작성#375

Merged
kckc0608 merged 5 commits intodevfrom
DEV-178/test/dashboard-controller-통합-테스트-작성
Feb 16, 2026

Hidden character warning

The head ref may contain hidden characters: "DEV-178/test/dashboard-controller-\ud1b5\ud569-\ud14c\uc2a4\ud2b8-\uc791\uc131"
Merged

[DEV-178/BE] test: dashboard controller 통합 테스트 작성#375
kckc0608 merged 5 commits intodevfrom
DEV-178/test/dashboard-controller-통합-테스트-작성

Conversation

@kckc0608
Copy link
Collaborator

관련 이슈

close #251

작업한 내용

  • 대시보드 통합 테스트 작성
  • 통합 테스트 작성 과정에서 발견한 버그 수정

PR 리뷰시 참고할 사항

참고 자료 (링크, 사진, 예시 코드 등)

@vercel
Copy link

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web-team4-refit Ready Ready Preview, Comment Feb 16, 2026 1:49am

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kckc0608, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 대시보드 기능의 견고성을 보장하기 위해 통합 테스트 스위트를 도입합니다. 이 테스트는 다양한 시나리오에서 대시보드 API의 동작을 검증하며, 테스트 과정에서 발견된 몇 가지 작은 로직 오류를 수정하여 전반적인 안정성을 향상시켰습니다.

Highlights

  • 대시보드 통합 테스트 추가: 대시보드 관련 API 엔드포인트에 대한 포괄적인 통합 테스트가 추가되었습니다. 이는 대시보드 헤드라인 조회, 캘린더 조회, 곧 있을 면접 조회, 어렵게 느낀 질문 조회, 복기 대기중인 면접 조회 기능을 포함합니다.
  • 통합 테스트 중 발견된 버그 수정: 통합 테스트 작성 과정에서 발견된 사소한 버그들이 수정되었습니다. 여기에는 InterviewRepository의 쿼리 파라미터 이름 수정과 DashboardService에서 복기 필요 상태에 QNA_SET_DRAFT가 추가된 것이 포함됩니다.
  • 테스트 유틸리티 메서드 확장: 통합 테스트를 용이하게 하기 위해 IntegrationTest 클래스에 IndustryJobCategory 엔티티를 생성하고 저장하는 헬퍼 메서드가 추가되었습니다.
Changelog
  • backend/src/main/java/com/shyashyashya/refit/domain/interview/repository/InterviewRepository.java
    • findAllSimilarInterviewsByUser 메서드의 쿼리 파라미터 이름이 'interview'에서 'industry'로 수정되었습니다.
  • backend/src/main/java/com/shyashyashya/refit/domain/interview/service/DashboardService.java
    • REVIEW_NEEDED_STATUSES 목록에 QNA_SET_DRAFT 상태가 추가되었습니다.
  • backend/src/test/java/com/shyashyashya/refit/core/IntegrationTest.java
    • Industry 및 JobCategory 엔티티를 생성하고 저장하는 헬퍼 메서드가 추가되었습니다.
  • backend/src/test/java/com/shyashyashya/refit/interview/integration/DashboardIntegrationTest.java
    • 대시보드 헤드라인, 캘린더, 곧 있을 면접, 어렵게 느낀 질문, 복기 대기중인 면접 조회에 대한 통합 테스트가 추가되었습니다.
Activity
  • PR 생성 이후 특별한 활동(댓글, 리뷰 등)은 기록되지 않았습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 대시보드 컨트롤러에 대한 통합 테스트를 추가하고, 테스트 과정에서 발견된 버그를 수정합니다. 전반적으로 테스트 케이스가 잘 작성되었고 다양한 시나리오를 포함하고 있습니다. 테스트 코드의 견고성과 유지보수성을 높일 수 있는 몇 가지 제안 사항을 리뷰 코멘트로 남깁니다.

Comment on lines +268 to +271
QnaSet difficultQna = QnaSet.create("Question 1", "Answer 1", true, interview, null);
QnaSet easyQna = QnaSet.create("Question 2", "Answer 2", false, interview, null);
qnaSetRepository.save(difficultQna);
qnaSetRepository.save(easyQna);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

테스트 데이터 생성을 위해 qnaSetRepository를 직접 사용하고 있습니다. IntegrationTest 기본 클래스에 다른 엔티티들을 위한 createAndSave... 헬퍼 메서드가 있는 것처럼, QnaSet을 위한 헬퍼 메서드를 추가하면 테스트 코드의 일관성과 재사용성을 높일 수 있습니다.

IntegrationTest 클래스에 createAndSaveQnaSet과 같은 헬퍼 메서드를 만들고, 이 테스트 클래스에서는 해당 메서드를 호출하는 방식으로 리팩토링하는 것을 고려해보세요. 이렇게 하면 테스트 준비(given) 단계가 더 간결해지고, 다른 테스트에서도 쉽게 QnaSet 테스트 데이터를 생성할 수 있습니다.

Suggested change
QnaSet difficultQna = QnaSet.create("Question 1", "Answer 1", true, interview, null);
QnaSet easyQna = QnaSet.create("Question 2", "Answer 2", false, interview, null);
qnaSetRepository.save(difficultQna);
qnaSetRepository.save(easyQna);
createAndSaveQnaSet("Question 1", "Answer 1", true, interview);
createAndSaveQnaSet("Question 2", "Answer 2", false, interview);

Copy link
Collaborator

@lja3723 lja3723 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@zxc534 zxc534 left a comment

Choose a reason for hiding this comment

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

lgtm

@kckc0608 kckc0608 merged commit f2c32a7 into dev Feb 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEV-178/BE] test: dashboard controller 통합 테스트 작성

3 participants

Comments