跳到正文
cccskills
免费在 GitHub 公开

debug

Debug a failing test or build error in WooCommerce iOS

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Debug a build failure or test failure in the WooCommerce iOS project.

For Build Failures

  1. Run the build and capture errors:
bundle exec fastlane build_for_testing 2>&1 \
  | grep -E "error:|fatal|cannot find|undefined|ambiguous" | head -30
  1. Identify the failing file and error type
  2. Read the failing file and surrounding context
  3. Common root causes in this codebase:
    • Missing module: Check Modules/Package.swift target dependencies
    • Type mismatch: A Networking model changed — check if Yosemite/Storage need updates
    • Cannot find type: May need bundle exec rake generate after adding GeneratedCopiable/Fakeable
    • Ambiguous reference: Duplicate type names across Networking vs Storage
    • CoreData model errors: Check Storage/CoreData/ model versions
  4. Propose or apply the fix

For Test Failures

  1. Run the specific failing test (targeted tests require xcodebuild directly):
xcodebuild -workspace WooCommerce.xcworkspace -scheme WooCommerce \
  -destination 'platform=iOS Simulator,name=iPhone 16' \
  test \
  -only-testing:"<target>/<class>/<method>" 2>&1 | tail -50
  1. Read the test file and understand what it expects
  2. Read the implementation file being tested
  3. Check the mock class setup
  4. Common test failure patterns:
    • Assertion mismatch: Verify expected vs actual, check mock stub values
    • Async timeout: Check if mock callbacks are being invoked, verify continuation setup
    • Nil unwrap: Check if mock return values are configured
    • Wrong mock state: Verify spy properties are set correctly
    • CoreData errors: Ensure InMemoryStorage is used, not persistent storage
    • Missing @MainActor: Some tests need MainActor annotation
  5. Propose or apply the fix

If the simulator destination fails, run xcrun simctl list devices available to discover available simulators, then re-run with a matching device name.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Log in to a test store on an iOS simulator. Use live-store DEBUG login by default, WireMock when mocks are requested, and the specified store for "my site".

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

bootstrap

免费

Install dependencies and build tools for WooCommerce iOS

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

lint

免费

Run SwiftLint on the WooCommerce iOS project

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

mocks

免费

Start or stop the WireMock API mock server for UI testing and E2E verification.

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

pr

免费

Create a pull request following WooCommerce iOS conventions

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

review

免费

Review code changes against WooCommerce iOS standards

中文简介正在准备中。当前显示原文说明。

woocommerce/woocommerce-ios3582026年10月17日 更新

查看 woocommerce 的全部技能

报告此技能的问题