-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
I have given this library a test run in our current project. I'm using the 0.4.0 stable version, but I am aware that you are working on a 1.0.0 release.
After some initial hurdles, I have been able to fully automate the implementation of API smoke tests, and I think this library fits quite well in our overall testing setup. At the very least, it makes for an excellent way to test that the published API docs do not contain bugs.
However, I'd like to point out three areas where the library could be improved:
- Allow the use of documented example objects
The OpenAPI spec allows to specify examples of schema objects (as JSON). It would be handy if the library would be able to take advantage of the example objects when generating payloads rather than relying on autogenerated data. (Naturally, there should be a mechanism for adjusting for dynamic properties like timestamp fields)
- More ergonomic API for testing individual endpoints
Often we are focusing on a single OpenAPI operation when developing. The exclude/include API of the 0.4.0 version a bit difficult to use to filter out everything except one particular endpoint.
- Prefer operationId to path/method pairs
IMO, the OpenAPI operationId is a more natural way of thinking about OpenAPI specs. We also use operationIds when we talk about the API rather than the path/method pairs. The way I would go about writing the test suite is one robot file per operation and one test per documented API response.