Skip to content

test(desktop): add e2e smoke and wire swift tests into just test - #8

Merged
seungwonme merged 1 commit into
mainfrom
test/desktop-e2e
Jul 4, 2026
Merged

test(desktop): add e2e smoke and wire swift tests into just test#8
seungwonme merged 1 commit into
mainfrom
test/desktop-e2e

Conversation

@seungwonme

Copy link
Copy Markdown
Owner

TL;DR

데스크톱 앱에 e2e 스모크를 추가하고, 방치돼 있던 Swift 유닛 테스트를 루트 품질 게이트(just test)와 CI에 연결합니다.

배경

  • SkimDesktopCoreTests(14개)는 존재했지만 just test가 pytest만 돌려서 게이트에 안 물려 있었음
  • 실제 앱 바이너리를 부팅해보는 테스트는 전무

변경

  • scripts/desktop-e2e.sh 신규 — 3단계 e2e 스모크
    1. 빈 fixture 워크스페이스(SKIM_WORKSPACE_ROOT)에서 SkimDesktopSmoke로 스키마 생성·0건 읽기 검증
    2. sqlite3로 포스트 1건 시드 후 같은 바이너리가 읽어내는지 검증
    3. 실제 SkimDesktop 앱을 fixture로 부팅, 5초 생존 확인 후 종료
  • just testswift test 추가, just e2e 태스크 신규
  • CI(macos-latest)에 Desktop e2e 스텝 추가
  • AGENTS.md / README.md 커맨드 목록 갱신

검증

  • 로컬에서 just e2e 전 단계 통과, just test로 pytest 214개 + Swift 14개 통과

한계

  • UI 상호작용(클릭·내비게이션) 검증은 아님 — SwiftPM executable이라 XCUITest를 붙이려면 xcodeproj 생성이 필요해서 부팅 스모크까지만. crash-on-launch, DB 스키마/읽기 회귀는 잡힘

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces a new desktop end-to-end (e2e) smoke test script (scripts/desktop-e2e.sh) and integrates it into the project's justfile under the just e2e command. It also updates the just test command to run Swift unit tests alongside Python tests, and updates the documentation in README.md and AGENTS.md to reflect these changes. The review feedback highlights a potential issue in the shell script where pipeline execution (specifically using grep -q with tee) could mask execution failures or trigger SIGPIPE errors. It is recommended to capture the command output in a variable first to ensure robust error handling.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread scripts/desktop-e2e.sh
mkdir -p "$FIXTURE/data"

echo "== smoke: empty fixture =="
"$BIN/SkimDesktopSmoke" | tee /dev/stderr | grep -q "recent_posts=0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

현재 파이프라인("$BIN/SkimDesktopSmoke" | tee /dev/stderr | grep -q "recent_posts=0")은 set -o pipefail이 설정되어 있지 않아, SkimDesktopSmoke가 실행 중 에러(non-zero exit code)를 내며 크래시가 발생하더라도 grep이 성공하면 전체 파이프라인이 성공한 것으로 간주됩니다. 또한 grep -q는 매칭되는 즉시 파이프를 닫으므로 teeSkimDesktopSmokeSIGPIPE로 인해 비정상 종료될 위험이 있습니다.

이를 방지하기 위해 출력을 변수에 담아 실행 성공 여부를 set -e로 보장받은 뒤, grep으로 검증하는 방식이 더 안전합니다.

Suggested change
"$BIN/SkimDesktopSmoke" | tee /dev/stderr | grep -q "recent_posts=0"
SMOKE_OUT=$("$BIN/SkimDesktopSmoke")
echo "$SMOKE_OUT"
echo "$SMOKE_OUT" | grep -q "recent_posts=0"

Comment thread scripts/desktop-e2e.sh
VALUES ('hackernews', 'e2e-1', 'e2e', 'E2E fixture post', 'body', '# E2E fixture post', 'https://example.com', datetime('now'));"

echo "== smoke: seeded fixture =="
"$BIN/SkimDesktopSmoke" | tee /dev/stderr | grep -q "recent_posts=1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

이전 단계와 마찬가지로, SkimDesktopSmoke가 실패하더라도 파이프라인이 성공으로 간주되는 것을 방지하고 SIGPIPE 오류를 피하기 위해 출력을 변수에 담아 검증하는 방식을 권장합니다.

Suggested change
"$BIN/SkimDesktopSmoke" | tee /dev/stderr | grep -q "recent_posts=1"
SEEDED_OUT=$("$BIN/SkimDesktopSmoke")
echo "$SEEDED_OUT"
echo "$SEEDED_OUT" | grep -q "recent_posts=1"

@seungwonme
seungwonme marked this pull request as ready for review July 4, 2026 13:34
@seungwonme
seungwonme merged commit eedbff7 into main Jul 4, 2026
3 checks passed
@seungwonme
seungwonme deleted the test/desktop-e2e branch July 4, 2026 13:34
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