-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Customizable Fake HTTP Responses #47
Labels
Comments
butschster
changed the title
[Feature] Swagger faker
[Feature] Swagger faker for http dump
May 14, 2023
butschster
added
enhancement
New feature or request
for contributors
c: difficult
module [Http-dump]
and removed
help wanted
Extra attention is needed
labels
Aug 7, 2023
butschster
changed the title
[Feature] Swagger faker for http dump
[Feature] Customizable Fake HTTP Responses
Dec 5, 2023
Discussion here https://github.com/orgs/buggregator/discussions/113 |
Possible implementation here https://github.com/mcustiel/phiremock-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This feature request proposes the introduction of a functionality in Buggregator that allows users to respond to HTTP requests with customizable fake responses, based on schemas provided by the user. This would greatly enhance the testing and debugging capabilities of Buggregator.
Current Limitations
While Buggregator currently has the ability to catch HTTP requests and display comprehensive information (method, URI, payload, etc.), it lacks the feature to actively respond to these requests with predefined, user-customized fake responses.
Proposed Feature
Custom Response Creation: Allow users to define custom responses for intercepted HTTP requests. This includes the ability to specify the status code, headers, body, and delay time for the response.
Response Schema Definition: Enable users to create response schemas in json format.
Conditional Response Logic: Implement logic to match requests with appropriate fake responses based on criteria such as request method, URI, payload content, or headers.
Benefits
Enhanced Testing Capabilities: Developers can test client-side handling of various server responses without needing the backend to actually provide these responses.
Improved Debugging: This feature would allow developers to simulate server-side errors or delays to test how the front-end handles these scenarios.
Faster Development Cycle: By simulating backend responses, front-end development can proceed without waiting for backend implementation, leading to a more efficient development cycle.
User Experience Testing: It enables testing of different user experience flows based on various server responses, improving the robustness of the application.
Use cases
Front-end Development: Front-end developers can simulate backend responses to test UI components and error handling mechanisms.
API Testing: Test how your application responds to unexpected or error responses from a server.
Draft JSON schema for response definition
In this schema, each property includes a
provider
field that specifies the FakerPHP method used to generate the mock data for that field. This setup is particularly helpful for automated testing or when populating a database with mock data for development purposes.The
match
object indicates that bothurl
andmethod
are mandatory for the matching process, ensuring that the response is linked to a specific type of request. This setup is useful for mock servers or testing environments where you need to simulate responses based on different request scenarios.The text was updated successfully, but these errors were encountered: