Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by thosakwe on Saturday June 23, 2018 @08:54AM
(#17381038)
I 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.”
Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by johns on Saturday June 23, 2018 @09:47AM
(#17381245)
We 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.
Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by kiranz on Saturday June 23, 2018 @10:18AM
(#17381368)
Not 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.
Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by caleblloyd on Saturday June 23, 2018 @11:29AM
(#17381698)
Neat 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?
Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by kiranz on Saturday June 23, 2018 @12:02PM
(#17381841)
I 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.
Re:Show HN: Declarative Testing Framework for REST, GraphQL ...
by tmpz22 on Saturday June 23, 2018 @11:18AM
(#17381649)
This 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.
I think the word you’re _really_ looking for is “declarative.”
Also, any proper GraphQL support would abstract away the payload format. It should simulate a GraphQL client, not an HTTP client.
Please checkout the documentation.
https://youtu.be/4yepPOznakk
it is a mix of declarative presentation with the ability to tap into code at any node.
Were there any libraries you considered first before creating this? Or parts of an existing library you took influence from?