Skip to content
Testing
Command

/ios-test

iOS/SwiftUI uygulamasini derle, simulator'da ac ve test et. "uygulamayi test et", "simulatorde calistir", "UI test", "flow test", "ekranlari kontrol et", "build and test", "crash var mi bak" gibi isteklerde tetiklenir.

From plugin
swiftui-autotest-skill
242 skills2 commands
Install
> /plugin marketplace add yusufkaran/swiftui-autotest-skill
> /plugin install swiftui-autotest-skill@swiftui-autotest-skill

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/ios-test

Context preview

What this command does when you run it.

iOS/SwiftUI uygulamasini derle, simulator'da ac ve test et. "uygulamayi test et", "simulatorde calistir", "UI test", "flow test", "ekranlari kontrol et", "build and test", "crash var mi bak" gibi isteklerde tetiklenir.

Command definition

ios-test.md
argument-hint: [--flow=<name>] [--screen=<ViewName>] [--device=<name>] [--scheme=<name>] [--states] [--screenshot-all] [--performance]
description: iOS/SwiftUI uygulamasini derle, simulator'da ac ve test et. "uygulamayi test et", "simulatorde calistir", "UI test", "flow test", "ekranlari kontrol et", "build and test", "crash var mi bak" gibi isteklerde tetiklenir.

Claude Command: iOS Test

Bu komut iOS/SwiftUI uygulamasini derleyip simulator'da acarak computer use ile gorsel test yapar.

Usage

/ios-test
/ios-test --flow=onboarding
/ios-test --screen=LoginView
/ios-test --device="iPhone 16 Pro"
/ios-test --scheme=MyApp
/ios-test --states
/ios-test --screenshot-all
/ios-test --flow=checkout --states --screenshot-all

Command Options

  • `--flow=<name>`: Belirli bir kullanici akisini test et (ornegin: onboarding, login, checkout)
  • `--screen=<ViewName>`: Sadece belirli bir ekrani test et
  • `--device=<name>`: Simulator cihazi belirt (ornegin: "iPhone 16 Pro", "iPhone SE")
  • `--scheme=<name>`: Xcode scheme belirt
  • `--states`: Empty, error ve loading state'lerini launch argument'lari ile test et
  • `--screenshot-all`: Her adimda screenshot al
  • `--performance`: Her ekranda RAM olcumu ve memory leak kontrolu yap (varsayilan testte YAPILMAZ)

What This Command Does

Phase 1: Project Discovery

1. Calisma dizininde `.xcodeproj` veya `.xcworkspace` dosyasini bul

  • `.xcworkspace` varsa onu tercih et (CocoaPods/SPM workspace)
  • Birden fazla varsa kullaniciya sor
  • Hicbiri yoksa hata ver ve dur

2. Mevcut scheme'leri listele:

   xcodebuild -list -workspace MyApp.xcworkspace
  • `--scheme` verilmisse onu kullan
  • Verilmemisse ve tek scheme varsa onu kullan
  • Birden fazla varsa kullaniciya sor

Phase 2: Simulator Selection

**ONEMLI: Simulator secimi build'den once yapilmalidir. Build komutu secilen cihaz ismini kullanir.**

1. `--device` argumani verildiyse:

  • O cihazi bul: `xcrun simctl list devices --json`
  • Bulamazsa mevcut cihazlari listele ve kullaniciya sor

2. `--device` verilmediyse:

   xcrun simctl list devices booted --json
  • **Hic booted simulator yoksa:**

Mevcut cihazlari listele:

     xcrun simctl list devices available --json

En uygun iPhone'u oner, kullaniciya "Bu cihazda test koşayım mı?" diye sor. Onaylarsa boot et:

     xcrun simctl boot <device-udid>
     open -a Simulator
  • **Tek booted simulator varsa:**

Direkt onu kullan, soru sorma.

  • **Birden fazla booted simulator varsa:**

Listeyi goster, kullaniciya hangisini kullanacagini sor.

Phase 3: Accessibility Check (ZORUNLU — ATLANMAMALI)

**Bu adim ZORUNLUDUR. Build'den ONCE calistirilir. Bu adimi ASLA atlama.**

1. Projedeki SwiftUI dosyalarini tara — `*.swift` dosyalarinda `struct` ... `: View` pattern'i ara 2. Bu dosyalarda su interactive elemanlari say: `Button`, `TextField`, `SecureField`, `Toggle`, `Slider`, `Picker`, `DatePicker`, `NavigationLink`, `Image`, `.onTapGesture` 3. Bu elemanlarin kacinda `.accessibilityIdentifier()` oldugunu kontrol et 4. **KULLANICIYA MUTLAKA SOR (bu soru atlanamaz):**

📋 Accessibility Scan Sonucu:
   Toplam interactive eleman: XX
   Identifier mevcut: XX
   Identifier eksik: XX

⚠️ Identifier'lar test sirasinda elemanlari daha guvenilir bulmami saglar.

Simdi /add-accessibility calistirip identifier'lari ekleyeyim mi?
  → Evet: identifier'lari ekler, sonra build alip teste devam eder
  → Hayir: direkt build alip koordinat bazli test yaparim (daha yavas ve kirilgan olabilir)

5. **Kullanicinin cevabini BEKLE.** Cevap almadan devam etme. 6. Kullanici evet derse → `/add-accessibility` skill'indeki tum adimlari calistir (scan, generate, apply), sonra Phase 4 (Build) ile devam et 7. Kullanici hayir derse → direkt Phase 4 (Build) ile devam et

Phase 4: Build

1. Secilen cihaz ismiyle build et:

   xcodebuild build \
     -workspace MyApp.xcworkspace \
     -scheme MyApp \
     -destination 'platform=iOS Simulator,name=<SECILEN_CIHAZ>' \
     -derivedDataPath ./DerivedData \
     2>&1

**ASLA sabit bir cihaz ismi hardcode etme. Her zaman Phase 2'de secilen cihazi kullan.**

2. Build basarisiz olursa:

  • Hata mesajlarini analiz et
  • Duzeltme onerileri sun
  • DUR — build basarisiz iken test etmeye calisma

3. Build uyarilarini da raporla (ama durma)

Phase 5: Install & Launch

1. Build edilen .app dosyasini bul:

   find ./DerivedData -name "*.app" -path "*/Debug-iphonesimulator/*" | head -1

2. Bundle identifier'i bul:

   plutil -p /path/to/MyApp.app/Info.plist | grep CFBundleIdentifier

3. Simulator'a yukle ve baslat:

   xcrun simctl install booted /path/to/MyApp.app
   xcrun simctl launch booted <BUNDLE_ID>

Phase 6: Computer Use ile Test

**ONEMLI: Bu asamada computer use (MCP server) gereklidir.**

Eger computer use etkin degilse kullaniciya soyle:

Computer use etkin degil. Test icin gerekli.
/mcp yazarak computer-use server'ini etkinlestirin.

Default Test (argumansiz)

Uygulamanin tum ana ekranlarini kesfet ve test et:

1. **TabView varsa** → her tab'a tikla, her ekrani incele 2. **NavigationStack varsa** → her navigasyon linkine tikla, geri don 3. **Her ekranda** kontrol et:

  • Ekran duzenli render ediliyor mu? (bos alan, tasma, ustuste binme)
  • Butonlar tiklanabilir mi?
  • Scroll calisiyorsa icerik gorunuyor mu?
  • Metin okunabilir mi? (cok kucuk, kesilmis)

4. Her ekranin screenshot'ini al

`--flow=<name>` ile

Belirtilen kullanici akisini test et. Akis ismine gore davran:

  • **onboarding**: Onboarding ekranlarini swipe ile ilerle, tum adimlari gecir, son adimda tamamla
  • **login**: Email/sifre alanlarini doldur (test@example.com / Test1234), giris butonuna bas, sonraki ekrani dogrula
  • **signup**: Kayit formunu doldur, tum alanlari gez, kayit butonuna bas
  • **checkout**: Sepet ekranina git, odem
Read more
Ships withswiftui-autotest-skill

Open-source Agent Skills for automated visual testing and accessibility setup of iOS/SwiftUI applications using Claude Code's computer use.

Get the whole plugin
Stats
24
Stars
0
Forks
Maintained
Maintenance
Shell
Language
MIT
License
5mo ago
Last commit
5mo ago
Created

Repo: yusufkaran/swiftui-autotest-skill

Other commands on swiftui-autotest-skill.