api-testing

Mock API responses and intercept HTTP requests in browser automation.

7|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/serkan-ozal/browser-devtools-skills --skill api-testing-serkan-ozal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-testing
Source: https://github.com/serkan-ozal/browser-devtools-skills/tree/main/skills/api-testing
Command: npx skills add https://github.com/serkan-ozal/browser-devtools-skills --skill api-testing-serkan-ozal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Interacting with real APIs during development is slow, flaky, or impractical; this Skill enables you to simulate API behaviors locally to validate frontend and integration logic without relying on live services.

Core Features & Use Cases

  • Mock API responses to test success, error, and edge cases.
  • Intercept and modify outgoing requests to simulate authentication or header changes.
  • Monitor and audit HTTP traffic to verify that requests and responses align with expectations.

Quick Start

Launch a session and begin mocking API endpoints using the stub and intercept-http-request commands.

Frequently Asked Questions about api-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I mock API responses for frontend testing without a live backend?

Mock API responses by using the stub command to simulate endpoints, allowing you to test frontend behavior in isolation. This validates success, error, and edge cases without relying on real services.

Can I intercept outgoing HTTP requests to modify authentication headers during browser automation?

Yes, you can intercept and modify outgoing HTTP requests to simulate authentication or header changes. The intercept-http-request command enables this during browser automation sessions.

What is network traffic monitoring used for in end-to-end test scenarios?

Network traffic monitoring audits HTTP requests and responses to verify they align with test expectations. It uses o11y commands to observe network behavior during offline simulations and authenticated flows.

How do I simulate offline conditions and error handling for API calls in automated tests?

Simulate offline conditions and error handling by mocking API endpoints and intercepting requests to trigger failures. This isolates frontend integration logic from live services during end-to-end scenarios.

Do I need any external dependencies to start mocking API endpoints in my browser?

No external dependencies are required. You launch a session and begin mocking API endpoints immediately using built-in browser-devtools-cli commands like stub and intercept-http-request.

What's the best way to validate frontend behavior when real APIs are slow or flaky?

Validate frontend behavior by mocking API responses and intercepting network traffic locally. This simulates API behaviors to test integration logic without the latency or instability of live services.