-
Notifications
You must be signed in to change notification settings - Fork 4
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
Set up API testing infrastructure #199
Comments
If you need a quick, out-of-the-box solution to start validating your API against its documentation, Dredd might be the way to go. On the other hand, if you require more control over your testing process, detailed customization, or integration with specific JavaScript testing frameworks, Swagger Test Templates might be more suitable. In any case, both tools bring powerful capabilities for ensuring your API behaves as documented, which is crucial for API reliability and contract adherence. |
Ok, I'm thinking about using Swagger Test Template + Jest. |
Setting Up Testing for API with Swagger Test Template and JestFollow these detailed instructions to set up testing for your API using Swagger Test Template and Jest: Step 1: Setting Up Jest
Step 2: Setting Up Swagger Test Template
Step 3: Writing Test TemplatesBefore generating test cases, consider defining or customizing test templates according to your requirements. Swagger Test Template uses Handlebars syntax for templates. Modify templates to accommodate specifics of your API testing, like adding authentication headers or setting up mock data. Step 4: Customizing Generated Test CasesAfter generating the test cases:
Step 5: Running Tests
Additional Considerations:
By following these steps, you'll have set up a robust testing suite for your API using Swagger Test Template and Jest, ensuring that your application works as expected and is resilient to changes over time. Adjust and expand your tests as your API evolves to maintain reliability and quality. |
Here is also an article about the contract testing |
Dredd cannot work with OpenAPI 3.1... |
Also, see tools mentioned here |
Here is a new tool to be checked: https://www.usebruno.com/ |
Description
To ensure the reliability and robustness of our API, we need to set up a comprehensive API testing infrastructure. This infrastructure will facilitate generating, maintaining, and executing tests based on our Swagger (OpenAPI) documentation.
Requirements
Additional Information
Related Issues
The text was updated successfully, but these errors were encountered: