Mucker CDP Mock Engine
Target:
⏱ Waterfall 0 requests
1.0x

Select a request from the list to inspect details or fulfill live breakpoints.

Configured Mock Rules
Active Method URL Pattern Status Delay Actions
Chrome DevTools Protocol (CDP) Status

Mucker implements the core semantic Fetch Domain of CDP. Any automated test tool (Puppeteer, Playwright, Python, or curl) can connect via WebSocket to mock or inspect network requests.

Discovery Version http://localhost:8080/json/version Target List http://localhost:8080/json/list WebSocket Target ws://localhost:8080/devtools/page
Automated Test Snippet (Puppeteer / Playwright / Node)
import WebSocket from 'ws';

const ws = new WebSocket('ws://localhost:8080/devtools/page');

ws.on('open', () => {
  // Enable CDP Fetch domain interception
  ws.send(JSON.stringify({
    id: 1,
    method: 'Fetch.enable',
    params: { patterns: [{ urlPattern: '*' }] }
  }));
});

ws.on('message', (raw) => {
  const msg = JSON.parse(raw);
  if (msg.method === 'Fetch.requestPaused') {
    const { requestId, request } = msg.params;
    console.log('Paused request:', request.url);

    // Mock API response via Fetch.fulfillRequest
    ws.send(JSON.stringify({
      id: 2,
      method: 'Fetch.fulfillRequest',
      params: {
        requestId,
        responseCode: 200,
        responseHeaders: [{ name: 'Content-Type', value: 'application/json' }],
        body: Buffer.from(JSON.stringify({ user: 'Injected Hero' })).toString('base64')
      }
    }));
  }
});