

Durable Service Mocks
Mock Implementations for Complex External Services
Overview
Modern software development often involves integrating with external services. A common challenge is conducting thorough testing and efficient development without the overhead, cost, or complexity of managing live service instances. While general-purpose tools like Testcontainers (which allow you to run popular databases, message brokers, and web browsers in Docker containers) effectively manage common service dependencies, they often fall short when dealing with proprietary or highly complex external services — those that are difficult, expensive, or even impossible to replicate faithfully in development and test environments. Durable Service Mocks address this challenge.
One may wonder: how do Durable Service Mocks achieve this fidelity and efficiency? The answer lies in their Rust-based architecture and minimal SQLite backing.
These mocks offer executable implementations that accurately replicate the behavior of original services. Built with Rust, which offers strong performance and reliability — and backed by a minimal SQLite database — these mocks provide a lightweight, self-contained solution for testing. This approach enables developers to test and iterate against realistic service responses, supporting accuracy and efficiency in the development lifecycle, and fostering more sustainable and cost-effective testing strategies.
It is important to note, however, that while these mocks offer high fidelity, they are not substitutes for full production services. They excel in unit and integration testing, enabling rapid, isolated validation of application logic against external service behaviors. However, for comprehensive end-to-end testing, performance benchmarking, or scenarios involving complex cross-service interactions, direct engagement with actual service instances remains essential. This distinction is a key trade-off: mocks provide speed and isolation, while real services offer ultimate fidelity and performance insights.
Supported Services
Durable Service Mocks focus on supporting services that often present challenges in testing and development environments, particularly due to their proprietary nature, complex configurations, or high operational costs. This collection currently includes high-fidelity mock implementations for a range of services, such as:
- AWS S3 – Mock S3-compatible object storage
- Proxmox – Virtual environment management API
- OpenNebula – Cloud computing platform API
- Salesforce – CRM and business automation
- Jira – Project management and issue tracking
- Discord – Communication platform API
- Asana – Work management platform
- Box – Cloud content management
- Heroku – Platform-as-a-service API
- YouTube – Video platform API
Design Principles
The effectiveness of Durable Service Mocks in solving complex testing and development challenges hinges on a set of foundational design principles. These principles are not merely guidelines; they are the core tenets that ensure our mocks deliver the reliability, accuracy, and efficiency necessary for simulating external services. By adhering to these, we empower developers with tools that genuinely enhance their workflow:
- Reliability: Mocks are engineered for consistent and predictable behavior, which is essential for reproducible testing and stable development cycles.
- Simplicity: We prioritize straightforward setup and use, minimizing complex configurations to allow developers to integrate mocks quickly and efficiently.
- Accuracy: A faithful reproduction of original service behavior and responses is a core aspect of our approach, ensuring that tests reflect real-world interactions as closely as possible.
- Efficiency: Designed for minimal resource consumption, these mocks are well-suited for integration into CI/CD pipelines and local development environments where resource overhead must be kept low.
Durable Service Mocks are designed to empower developers, enabling you to build and test robust applications with confidence. We encourage you to not only experiment with the existing mock services in your projects but also to consider how you might extend or even create new mocks to suit your specific needs. The ability to simulate complex external services locally democratizes development, making it accessible to a wider range of projects and teams, whether for public open-source initiatives or private internal tools. This fosters a more inclusive and efficient development ecosystem.
We invite you to explore the various mock services available and integrate them into your testing workflows. For more detailed documentation, advanced configurations, and to contribute to the project, please visit the Durable Service Mocks GitHub repository. There, you’ll find comprehensive guides and examples to help you leverage the full potential of these tools, and we warmly welcome your contributions to expand this valuable resource.
Troubleshooting
If you encounter issues, ensure that the mock service is running on the correct port and that your client is configured to connect to http://localhost:<port> (or the specified host). Check the console output of the mock service for any error messages, which often provide clues for common configuration problems. For persistent issues, consult the project’s GitHub repository for known issues or to open a new discussion.