Skip to main content

mocks

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

معلومات المصدر

المستودع
woocommerce/woocommerce-ios
آخر نشاط في المصدر
٢ مارس ٢٠٢٦ في ١١:١٣
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
٣٥٧
التفرعات
١٣٠

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
mocks
description
Start or stop the WireMock API mock server for UI testing and E2E verification.
user-invocable
true
allowed-tools
Bash
argument-hint
[start|stop]
# 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 ```bash ./API-Mocks/scripts/start.sh 8282 & sleep 3 ``` Verify it's running: ```bash curl -s http://localhost:8282/__admin/ > /dev/null && echo "WireMock running on port 8282" || echo "WireMock failed to start" ``` If Java is not installed, report the prerequisite and stop. ## Stop ```bash ./API-Mocks/scripts/stop.sh 8282 ``` Uses WireMock's graceful shutdown endpoint. Falls back to kill-by-port if the shutdown endpoint is unreachable: ```bash kill $(lsof -ti:8282) 2>/dev/null ``` ## 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`)
عرض على GitHub