Ad

gripmock: gRPC Mock Server

gripmock generates gRPC server stubs from `.proto` files, enabling testing and development without external services.
Screenshot of tokopedia/gripmock homepage

gripmock generates gRPC server stubs from .proto files, facilitating end-to-end testing and development in environments without live gRPC services. It utilizes a protoc plugin to translate protobuf definitions into Go code, generating a server that can be easily integrated into testing workflows. The primary goal is to provide a simple and reliable way to mock gRPC services for testing and development purposes, simplifying the testing process and reducing dependencies on external services.

gripmock's simplicity and ease of use distinguish it from more complex mocking frameworks. The separation of GRPC server and stub server allows for flexible configurations, and the dynamic stubbing feature enables on-the-fly modification of stub behavior. Support for multiple stub matching rules provides versatility in defining test scenarios, enabling a robust simulation of gRPC service responses. The project emphasizes maintenance and staying up-to-date with the latest Go, gRPC, and protoc versions.

  • gRPC Service Generation: Automatically generates server stubs from .proto files.
  • Dynamic Stubbing: Allows modification of stubs via a REST API for runtime adjustments.
  • Multiple Matching Rules: Supports equals, equals_unordered, contains, and regex for flexible input matching.
  • Lightweight Architecture: Simple and easy to maintain, focusing on core functionality.
  • Extensible Stubbing: Can be configured with static stub files for pre-defined test cases.

gripmock is an actively maintained project with continuous updates to align with the latest versions of Go, gRPC, and protoc. The project has a solid release history, regular commits, and ongoing issue and PR activity. The provided documentation includes examples and usage instructions, indicating a commitment to usability. The community presence is focused, though support primarily comes from the maintainer.

Developers can benefit from gripmock by easily mocking gRPC services to facilitate unit and integration testing. It is particularly useful for scenarios where external gRPC services are unavailable or undesirable during development. It offers a straightforward approach to creating testable environments and streamlining the development workflow by decoupling service interactions from external dependencies.

Summarize:
Share:
Stars
744
Forks
168
Issues
56
Created
8 years ago
Commit
4 months ago
License
APACHE-2.0
Archived
No
Updated 13 days ago

Similar Repositories