As per the title, I have an upcoming project at my company to use Cypress.io for API testing. I'm working on a proof of concept & I'm looking for Open Source APIs in Swagger to test.
I was able to find Swagger Petstore, but I wonder if you guys have other recommendations. What do you usually use for practicing/POC API testing?
I also know about JSONPlaceholder, but I would rather use one API in Swagger. Tks in advance!
EDIT: I found FakeRESTApi & it seems to be exactly what I need. However, I'm still interested in your suggestions.
rest - RESTful API Testbed with Swagger - Stack Overflow
Any good Open Source - Swagger API for practicing API testing?
Better workflow for API Testing with Swagger/Postman
What’s your API Testing/Design tool of choice?
Can Workik AI automate API testing with Swagger OpenAPI specs?
What is Swagger OpenAPI?
Can Workik improve API security with Swagger/OpenAPI specs?
Videos
As the other answers have mentioned, Swagger provides a way to define and document your API endpoints, methods, responses, errors, and more. It does not do any sort of automated testing out of the box.
There are a few tools that can read a Swagger definition to created automated tests, though:
- Assertible is a tool where you can import your Swagger spec to automatically create tests and assertions for every endpoint and method. You can then set up monitoring, post deployment testing, and alerts. (Read the blog Testing an API using Swagger). It has a free plan with options to upgrade for more tests.
- swagger-test is an NPM package, if you're looking for something to integrate with your code. I haven't personally used it, but it does look active and useful.
- Dredd is another really cool open-source tool that will automate testing your Swagger spec against a live backend. This is also a CLI too, and it works with API Blueprint in addition to Swagger.
There's others as well, because Swagger provides a good common language for API developers there's some great tools that are written on top of it.
Another answer mentioned to check out the Commercial Tools page on swagger.io, which has some more hosted services (free and paid).
Full disclosure - I'm one of the co-founders of Assertible and would love to hear your feedback if you get a chance to use it.
Swagger will let you nicely document your API, and will help you do manual, live tests with swagger-ui in that you can easily fill in arguments and see the responses through a web ui. Try the Swagger demo as an example of what I am referring to. http://petstore.swagger.io/
I have not tried this, but this might be of interest for more automated testing against Swagger definitions. https://github.com/Maks3w/SwaggerAssertions