跳到正文
cccskills
免费在 GitHub 公开

mocks

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

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

查看安装方法

包含的文件(1)

  • SKILL.md1.8 KB

SKILL.md(原文)

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

WireMock Mock Server

Manage the WireMock mock server that serves API responses for UI tests and E2E verification.

Requires Java (brew install openjdk if missing).

Start

Check whether the requested port is occupied and which checkout supplies its mappings. Reuse only a server with the required fixtures. Otherwise start on a free port and record its port and PID as task-owned resources. Set <port> to the selected port; use 8282 when it is free.

./API-Mocks/scripts/start.sh <port> &
MOCKS_WRAPPER_PID=$!
echo "WireMock wrapper PID: $MOCKS_WRAPPER_PID"
sleep 3
lsof -nP -iTCP:<port> -sTCP:LISTEN

Record the Java listener PID shown by lsof. Check its parent PID and command with ps -p <listener-pid> -o pid,ppid,command against the wrapper PID and this checkout. Verify it's running:

curl --fail --silent http://localhost:<port>/__admin/mappings > /dev/null

If Java is not installed, report the prerequisite and stop.

Stop

Stop only a server this task started. Recheck its recorded listener PID, parent, command, and port before shutdown; the start wrapper PID is not the Java listener PID.

./API-Mocks/scripts/stop.sh <port>

The stop script requests graceful shutdown. Confirm that the task PID exited and the port is free. If shutdown fails, terminate only the recorded task-owned PID. Preserve servers owned by other tasks.

Details

  • Port: 8282 (default)
  • Mappings: Modules/Sources/APIMocks/Resources/mappings/
  • Response files: Modules/Sources/APIMocks/Resources/__files/
  • Start script: API-Mocks/scripts/start.sh
  • WireMock: auto-downloaded on first run (version configured in start.sh)

评价

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

评论

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

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

提交后会立即公开。请勿填写邮箱、电话等个人信息。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月22日 更新

bootstrap

免费

Install dependencies and build tools for WooCommerce iOS

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

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

debug

免费

Debug a failing test or build error in WooCommerce iOS

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

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

lint

免费

Run SwiftLint on the WooCommerce iOS project

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

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

pr

免费

Create a pull request following WooCommerce iOS conventions

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

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

review

免费

Review code changes against WooCommerce iOS standards

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

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

查看 woocommerce 的全部技能

报告此技能的问题