mcpField
S
synthetic-monitoring

synthetic-monitoring

github.com/aj-geddesTesting & quality374424 installsUpdated 34w ago
Repository

About synthetic-monitoring

A skill for designing synthetic monitoring that simulates user journeys, API flows, and business transactions to check behavior and performance. It includes Playwright examples and guides for API tests and scheduled checks.

Key features

  1. 01Simulate browser-based user journeys
  2. 02Test API workflows
  3. 03Monitor business transactions
  4. 04Schedule synthetic checks
  5. 05Track response times and failures

Use cases

  1. 01Validate end-to-end user flows
  2. 02Check API paths before release
  3. 03Monitor critical transactions
  4. 04Catch failures in scheduled checks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill synthetic-monitoring

After installing, type/synthetic-monitoringin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
api-synthetic-tests.md
scheduled-synthetic-monitoring.md
synthetic-tests-with-playwright.md
scripts/
scaffold-tests.sh
templates/
test-template.js

Details

From the project README

Synthetic Monitoring

Table of Contents

Overview

Set up synthetic monitoring to automatically simulate real user journeys, API workflows, and critical business transactions to detect issues and validate performance.

When to Use

  • End-to-end workflow validation
  • API flow testing
  • User journey simulation
  • Transaction monitoring
  • Critical path validation

Quick Start

Minimal working example:

// synthetic-tests.js
const { chromium } = require("playwright");

class SyntheticMonitor {
  constructor(config = {}) {
    this.baseUrl = config.baseUrl || "https://app.example.com";
    this.timeout = config.timeout || 30000;
  }

  async testUserFlow() {
    const browser = await chromium.launch();
    const page = await browser.newPage();
    const metrics = { steps: {} };
    const startTime = Date.now();

    try {
      // Step 1: Navigate to login
      let stepStart = Date.now();
      await page.goto(`${this.baseUrl}/login`, { waitUntil: "networkidle" });
      metrics.steps.navigation = Date.now() - stepStart;

      // Step 2: Perform login
      stepStart = Date.now();
      await page.fill('input[name="email"]', "[email protected]");
      await page.fill('input[name="password"]', "password123");
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Synthetic Tests with PlaywrightSynthetic Tests with Playwright
API Synthetic TestsAPI Synthetic Tests
Scheduled Synthetic MonitoringScheduled Synthetic Monitoring

Best Practices

✅ DO
  • Test critical user journeys
  • Simulate real browser conditions
  • Monitor from multiple locations
  • Track response times
  • Alert on test failures
  • Rotate test data
  • Test mobile and desktop
  • Include error scenarios
❌ DON'T
  • Test with production data
  • Reuse test accounts
  • Skip timeout configurations
  • Ignore test maintenance
  • Test too frequently
  • Hard-code credentials
  • Ignore geographic variations
  • Test only happy paths

Comments

Markdown supported