-
Notifications
You must be signed in to change notification settings - Fork 65
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
[OpenAPI CLI] Mock Endpoint and Test Generation #5757
Comments
Explored Swagger Codegen, OpenAPI Generator, Dredd, OpenAPI Testers, and the fancy ones like EvoMaster, Karate, and Tcases. What I Found:
Please refer OpenAPI specification validation for more research into existing solutions. Generating test cases from OpenAPI specs is tricky. Tools are cool but fall short. AI is an option, but it comes with a hefty price tag. My suggestion? Hold off on the test case generation feature for now. Wait until the need outweighs the cost. Keep it practical. |
I will be looking into mock services next. |
I've explored two methods for mocking external endpoints to test our client:
In summary, the second approach leveraging the Bal OpenAPI CLI for generating a mock server appears more flexible, readable, and suitable for diverse testing scenarios. While it requires additional effort for authenticated servers, its advantages in code readability and versatility make it a promising choice. Note: The progress has been delayed as I've encountered issues with Testerina. #41825 #41821 |
After evaluating, we have decided generate the service skeleton from the bal openapi tool and fill it with dummy values for the time being with the other priorities |
Description:
This proposal introduces two new features to the OpenAPI to Ballerina CLI tool:
Currently, the tool's primary function is to generate Ballerina code from OpenAPI specifications.
The proposed features aim to enhance the developer experience by:
Additional Benefits
Scenario Testing: This allows for comprehensive scenario testing, ensuring the application's robustness and resilience.
Reduced Dependencies: These features enable developers to work independently on their components, minimizing dependencies and eliminating bottlenecks in the development process.
Enhanced Test Coverage: Automated test generation based on the OpenAPI contract ensures extensive test coverage, reducing the likelihood of unnoticed bugs.
Efficient API Contract Validation: Developers can validate the API contract early and continuously during development, ensuring that the documentation and implementation are aligned.
The text was updated successfully, but these errors were encountered: