cap-go avatar

Capacitor Testing

Testing guide for Capacitor apps covering web unit tests, Appium E2E, native plugin tests, and device verification.

CCM score
66 of 100
skills.sh installs
1.4K
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers three test layers: Vitest and Playwright for the web app, native plugin tests in Swift and JUnit, and Appium E2E with WebView context switching
  • Includes device verification steps with xcrun simctl, xcrun devicectl, adb, and npx cap run --url for live reload on Capacitor 9
  • Enforces a layer choice so the cheapest test that can catch the bug runs first, and mocks plugins at the package boundary
  • Designed for teams testing Capacitor mobile apps and plugins that need guidance on mocking, native test migration, and CI setup

Install

$ npx -y skills add cap-go/capgo-skills --skill capacitor-testing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Testing Capacitor Apps and Plugins

A Capacitor app has three layers to test: the web app (most logic), the native bridge and plugins (Swift/Kotlin), and the running app on a device. Pick the cheapest layer that can catch the bug.

When to Use

TRIGGER when:

  • Adding unit, component or E2E tests to a Capacitor app
  • Mocking Capacitor or plugin APIs in Vitest / Jest
  • Writing or modernizing native unit tests for a plugin (Swift Testing, XCTest, JUnit)
  • Verifying a change on a simulator, emulator or device ("test this", "does it work", "check on device")
  • E2E tests that cannot find web elements in the app (WebView context)
  • Setting up test jobs in CI

Do not use:

  • Reading device or crash logs: ios-android-logs
  • Safari Web Inspector / Chrome DevTools debugging: debugging-capacitor
  • Build, signing and release pipelines: capacitor-ci-cd
  • App Intents tests: capacitor-app-intents (AppIntentsTesting)

Choose the layer

Details

Repository
github.com/cap-go/capgo-skills
Categories
Testing & QA, Mobile Apps
First seen
Jun 3, 2026

More from cap-go/capgo-skills

All 41

Similar to Capacitor Testing

More Testing & QA