Skip to content
cccskills
FreePublished on GitHub

mocks

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

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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)

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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".

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

Install dependencies and build tools for WooCommerce iOS

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

debug

Free

Debug a failing test or build error in WooCommerce iOS

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

lint

Free

Run SwiftLint on the WooCommerce iOS project

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

pr

Free

Create a pull request following WooCommerce iOS conventions

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

review

Free

Review code changes against WooCommerce iOS standards

The English summary is being prepared. Showing the original description.

woocommerce/woocommerce-ios358Updated Oct 22, 2026

See all skills by woocommerce

Report a problem with this skill