FLUTTER ECOSYSTEM

mock_web_server

Versatile scriptable Web Server for real integration tests in Flutter, server, and Dart CLI applications

Latest version
4.1.1
30-day downloads
58.2K
Likes
25
Pub points
40

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

A versatile, scriptable web server designed for real integration testing in Flutter, server-side Dart, and CLI applications. It enables developers to simulate HTTP endpoints with customizable responses, allowing thorough testing of network interactions without relying on external services. The server supports dynamic request handling, response delays, and status codes, making it ideal for testing edge cases and network conditions. Built specifically for Dart ecosystems, it integrates seamlessly into test workflows.

Use cases
  • Testing HTTP clients in Flutter apps
  • Simulating API behavior during integration tests
  • Validating error handling and retry logic
  • Mocking third-party services in CI/CD pipelines
  • Testing network timeouts and latency
Key features
  • Scriptable request/response handling
  • Support for custom headers and status codes
  • Configurable response delays
  • Easy integration with Dart test frameworks
  • Lightweight and fast startup
  • No external dependencies
Suitable for
  • Flutter developers writing integration tests
  • Dart backend service testers
  • CI/CD pipeline automation
  • Teams needing realistic network simulation
Considerations
  • Not intended for production use
  • Requires manual setup for complex scenarios
  • Limited built-in middleware
  • Best used in test environments only
Supported platformsNot available

Install package

flutter pub add mock_web_server

Categories

Related projects