Skip to content

[Test] application 테스트 및 커버리지 실행 Gradle 태스크 추가#63

Merged
toychip merged 2 commits into
mainfrom
test/#62-auto-test-gradle-jacoco
Apr 16, 2026
Merged

[Test] application 테스트 및 커버리지 실행 Gradle 태스크 추가#63
toychip merged 2 commits into
mainfrom
test/#62-auto-test-gradle-jacoco

Conversation

@toychip

@toychip toychip commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

관련 이슈


변경 내용

  • linktrip-domain-test included build를 추가해 IntelliJ Gradle 창에서 별도 테스트 실행 진입점을 만듬
  • TDD-Application 태스크를 추가해 linktrip-application/src/test/kotlin/com/linktrip/application 하위 테스트만 실행하도록 구성
  • linktrip-application 모듈에 applicationTest, applicationTestCoverage 태스크를 추가해 application 테스트와 JaCoCo 커버리지 리포트를 분리 실행할 수 있도록 함
  • TDD-Application 실행 후 커버리지 HTML 메인 리포트를 자동으로 열도록 구성
  • Windows/WSL, macOS, Linux 환경에서 모두 동작할 수 있도록 브라우저 실행 로직을 분기 처리
  • JaCoCo 설정에서 deprecated 된 buildDir 사용을 layout.buildDirectory 기반으로 정리

체크리스트

  • Ktlint
  • 테스트 통과 여부

Summary by CodeRabbit

릴리스 노트

  • Chores
    • 테스트 커버리지 보고 기능이 추가되었습니다.
    • TDD 워크플로우를 위한 편의 작업이 추가되었습니다.
    • 빌드 구성이 업데이트되었습니다.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@toychip has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 843d27d5-74bf-4879-9a19-b4555cc1af70

📥 Commits

Reviewing files that changed from the base of the PR and between d63456a and 94119ec.

📒 Files selected for processing (1)
  • linktrip-domain-test/build.gradle.kts
📝 Walkthrough

Walkthrough

Gradle 빌드 구성에 JaCoCo 코드 커버리지 플러그인 및 기능을 추가했습니다. linktrip-application 모듈에 커스텀 applicationTest 태스크와 applicationTestCoverage JaCoCo 리포트 태스크를 도입하고, linktrip-domain-test 모듈에 WSL 환경 감지 및 커버리지 리포트 자동 실행 기능을 추가했습니다.

Changes

Cohort / File(s) Summary
JaCoCo 플러그인 및 커버리지 태스크
linktrip-application/build.gradle.kts
JaCoCo 플러그인을 추가하고, com/linktrip/application/** 범위의 테스트만 실행하는 커스텀 applicationTest 태스크와 XML/HTML 커버리지 리포트를 생성하는 applicationTestCoverage JaCoCo 리포트 태스크를 정의했습니다.
TDD 자동화 및 커버리지 리포트 열기
linktrip-domain-test/build.gradle.kts
WSL 환경 감지 유틸리티 함수(isWsl)와 시스템 기본 브라우저에서 JaCoCo HTML 리포트를 여는 함수(openCoverageReport)를 추가하고, 두 태스크를 순차 실행한 후 리포트를 자동으로 여는 TDD-Application 태스크를 등록했습니다.
빌드 구성 및 프로젝트 통합
linktrip-domain-test/settings.gradle.kts, settings.gradle.kts
linktrip-domain-test의 루트 프로젝트 이름을 설정하고, 상위 settings.gradle.kts에서 해당 빌드를 포함 빌드로 추가했습니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경 사항의 핵심을 명확하게 요약하고 있습니다. 'application 테스트 및 커버리지 실행 Gradle 태스크 추가'는 새로운 Gradle 태스크들(applicationTest, applicationTestCoverage, TDD-Application)을 추가하여 테스트와 커버리지 리포트 생성 기능을 제공하는 주요 변경 사항을 정확히 반영합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/#62-auto-test-gradle-jacoco

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@toychip toychip linked an issue Apr 16, 2026 that may be closed by this pull request
6 tasks

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@linktrip-domain-test/build.gradle.kts`:
- Around line 57-64: The exec block invoking the Gradle wrapper uses a hardcoded
Unix executable ("./gradlew") which will fail on Windows; update the exec in
build.gradle.kts so the commandLine is chosen based on the OS (e.g., detect
System.getProperty("os.name") or use org.gradle.internal.os.OperatingSystem) and
use "./gradlew" on Unix-like systems and "gradlew.bat" (without "./") on Windows
when building the command for the exec { ... } block that currently calls
commandLine("./gradlew", "--rerun-tasks",
":linktrip-application:applicationTest",
":linktrip-application:applicationTestCoverage"); ensure workingDir remains
file("..") and preserve the same args order.
- Around line 12-49: The current exec blocks hardcode Chrome and let failures
fail the Gradle task; change each exec invocation that launches the report (the
blocks that call "Start-Process chrome", "powershell" with Chrome, "open -a
Google Chrome", and "xdg-open") to launch the system default browser instead and
make the exec non-fatal: use the OS-appropriate default-open command (e.g., on
mac use "open" without "-a Google Chrome", on Windows call
powershell/Start-Process with the report URI but not forcing chrome, and on WSL
convert path then call the Windows default opener) and set the exec to ignore
failures (set isIgnoreExitValue = true inside the exec or wrap the exec call in
try/catch and swallow the exception while logging a warning); update the blocks
that use reportPath and reportFile.toURI() accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ebc0f56c-9604-45e3-82ea-af442e63dae8

📥 Commits

Reviewing files that changed from the base of the PR and between a1fc0bc and d63456a.

📒 Files selected for processing (4)
  • linktrip-application/build.gradle.kts
  • linktrip-domain-test/build.gradle.kts
  • linktrip-domain-test/settings.gradle.kts
  • settings.gradle.kts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: 자동 검증 (ktlint + test)
🔇 Additional comments (4)
linktrip-domain-test/settings.gradle.kts (1)

1-1: 컴포지트 빌드 이름 지정이 명확합니다.

includeBuild("linktrip-domain-test")와 조합될 때 식별성이 좋아서 유지보수에 유리합니다.

settings.gradle.kts (1)

21-21: 컴포지트 빌드 추가 방향이 적절합니다.

Line 21의 includeBuild("linktrip-domain-test")로 테스트 전용 빌드를 분리한 구성이 의도와 잘 맞습니다.

linktrip-application/build.gradle.kts (2)

10-21: applicationTest 태스크 분리가 깔끔합니다.

테스트 범위 제한, JUnit Platform, 로그 이벤트 설정이 모두 목적에 맞게 구성되었습니다.


23-49: 커버리지 태스크 및 기본 테스트 리포트 연계가 잘 구성되었습니다.

applicationTestCoverage 정의와 test/jacocoTestReport 연결이 명확해서 실행 동선이 예측 가능합니다.

Comment thread linktrip-domain-test/build.gradle.kts Outdated
Comment thread linktrip-domain-test/build.gradle.kts
@toychip toychip merged commit 611a836 into main Apr 16, 2026
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.

[Feat] application 테스트 및 커버리지 확인용 Gradle 태스크 추가

1 participant