SmartMock.io is a Mock-As-A-Service solution. It provides tools that allow you to set up, manage, and troubleshoot your HTTP protocol API mocks in the cloud. This frees you up to focus on the logic of your mocks , as you don't have to think about boilerplate code, infrastructure, hosting, and hardware maintenance. Changes made in your mocks are immediately available for mock clients; no more waiting for time-consuming deployments of self-hosted mock services. SmartMock.io supports a broad spectrum of use cases that allow for the mocking of not only simple, static services but also complicated, dynamic ones.
The top-level concept of SmartMock.io is a workspace. Every workspace is identified by a unique URL you'll use to send requests to your mocks. We encourage you to treat a workspace as a contained environment for a single service/API/application you'd like to simulate. This approach simplifies the management of workspaces and mocks. You may, however, merge many services/APIs into individual Workspace if required.
The workspace contains one or more mocks, which basically match HTTP requests, render the response, and return that response to the client. Generally, a mock is the equivalent of an HTTP endpoint for an API you'd like to simulate and is usually identified by the HTTP method and path. In some use cases, for the same HTTP method / path pair, you may need more than one mock, which may return different responses based on other matching criteria.
Matching of requests is performed using a rich set of matchers that you may use for any HTTP field (method, path, header, query parameter, body).
See HTTP Request Matching section for more information.
Depending on the complexity of your use case, a mock may render a static, template or dynamic response
The simplest type of mock is a static mock. It returns a static string value (JSON, XML, plain text, etc.) any time an HTTP request fits certain mock matching rules. Static mocks cover the majority of our clients' use cases and do not need any coding skills. See Static Mock section for more information.
Proxy mocks allow for selective forwarding of the original HTTP requests to other services (for instance, real ones). Use proxy HTTP service mocks in conjunction with other types of mocks or response delay feature within the single workspace to simulate the behaviors that are impossible or difficult to generate on-demand with real services like long response times, specific error codes, malformed or incorrect responses, connection errors. See Proxy Mock section for more information.
Template and dynamic mocks may utilize state, which is essentially a workspace-scoped container for data. Adopting state in your template or dynamic mock enables you to simulate data persistence or a user session. In other words, you may share some data between mocks in the same workspace. See the Stateful responses section for more information about state and how to use it.
SmartMock.io supports collaboration in your team. Workspaces may be shared with other team members or your business partners. This increases productivity since anyone in your team may create, modify, or troubleshoot mocks.