4 ms·
Show HN: Declarative Testing Framework for REST, GraphQL APIs
- thosakwe 8y agoI wouldn’t really say this is any more “codeless” than HTML, SQL, or Prolog, because you’re stilling writing unit tests, but in YAML instead of an imperative language like JavaScript. I think the word you’re _really_ looking for is “declarative.”
- johns 8y agoWe attempted to come up with a similar format for Runscope tests (YAML and all) but quickly abandoned it once we tried anything remotely complex (chained requests, control flow, limits of declarative assertions, etc.). YAML quickly becomes far less expressive than code. I still prefer using a UI like Runscope personally, but I’d use code if it weren’t available. Also, any proper GraphQL support would abstract away the payload format. It should simulate a GraphQL client, not an HTTP client.
- Edmond 8y agoI would think what is needed is a true object graph environment: https://youtu.be/4yepPOznakk https://youtu.be/4yepPOznakk it is a mix of declarative presentation with the ability to tap into code at any node.
- kiranz 8y agoNot sure if you had a chance to go through documentation, but complex stuff like chained requests, dynamic parameter construction etc are supported. You can also provide custom validator functions in YAML to verify responses and a lot more. Please checkout the documentation.
- pintxo 8y agoSo it is not actually codeless.
- dbwest 8y agoThis looks like pyresttest.
- deleted 8y ago[deleted]
- tmpz22 8y agoThis is cool but I'd rather not add node and npm as dependencies to my application unless its already there. I think this would be better as a static binary or rolled into a CI platform.
- kiranz 8y agoMay be dockerize it?
- caleblloyd 8y agoNeat library, I can see how this could be beneficial for black-box and end-to-end API tests. Node seems powerful here due to the event loop being able to run many parallel HTTP requests with one thread. Were there any libraries you considered first before creating this? Or parts of an existing library you took influence from?
- kiranz 8y agoI didn't find any open source frameworks that support testing advanced API flows like multipart forms and uploading files etc. Many companies are actually charging customers for API testing, so I wanted to build a robust open source alternative.