Mocking Service Dynamic Behavior Configuration via MSL
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current mocking services for APIs are limited by static behavior simulations that do not fully reflect the dynamic behavior of a full API implementation, requiring redeployment for behavior changes and consuming significant processing resources.
Innovation Solution
A mocking service that utilizes a separate API behavior file defined in Mocking Service Language (MSL) to configure mock API implementations, allowing for dynamic behavior scenarios, such as delays and error rates, without altering the API specification, enabling flexible and efficient testing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If mocking services use static behavior simulations based on API specifications, then the API testing can be performed, but the simulation behavior does not fully reflect the dynamic behavior of full API implementation and requires redeployment for behavior changes
Solution Approach 1:
The patent separates behavior configuration from the API specification by introducing a distinct behavior file format. This segmentation allows behavior to be independently configured and modified without changing the core API specification, thereby improving adaptability while maintaining clear system boundaries and manageable complexity.
Solution Approach 2:
The patent introduces dynamic behavior configuration through behavior files that can be modified at runtime without redeployment. This enables the mocking service to adapt its simulation behavior dynamically based on different testing scenarios, fully reflecting the flexibility of full API implementation while avoiding the complexity of redeployment processes.
2Reliability
If mocking services simulate full API implementation behavior, then more accurate testing can be performed, but significant processing resources are consumed
Solution Approach 1:
The patent creates a simplified copy of the API behavior through behavior files that capture essential simulation characteristics without replicating the entire full API implementation. This copying approach enables accurate testing of behavior patterns while consuming significantly fewer processing resources than simulating the complete implementation.
Solution Approach 2:
The patent implements partial action by simulating only the necessary behavior aspects defined in the behavior file rather than the entire API implementation. This selective simulation provides sufficient testing accuracy for most scenarios while avoiding the excessive resource consumption of complete implementation simulation.
3Adaptability or versatility
If behavior changes are made to mocking services, then updated testing scenarios can be supported, but redeployment of API specification is required
Solution Approach 1:
The patent performs preliminary action by pre-defining behavior configurations in separate behavior files that can be independently modified. This allows behavior updates to be prepared in advance without affecting the core API specification, enabling rapid adaptation to new testing scenarios without the time-consuming redeployment process.
Solution Approach 2:
The patent extracts behavior configuration from the API specification into separate behavior files. This extraction enables behavior changes to be made independently and applied immediately without triggering redeployment, thereby eliminating the time loss associated with reDeploying the entire API specification while maintaining full adaptability for updated testing scenarios.
Data Source
AI summary
A mocking service generates a mock implementation of an API based on a API specification. Request and response behavior of the mock implementation of the API may be controlled by a separate API behavior file. The API behavior file may be parsed by the mocking service to generate behavior logic. When an API request is transmitted to the mock implementation of the API, the behavior logic is invoked and may control execution of the mock implementation of the API and the details of a generated response. Behaviors defined in the API behavior file may be global or resource specific and may include, for example, time delays, error rates, error codes, conditions, response overrides, etc.


