You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraphQL is a very declarative query language. It provides a declarative approach to data fetching. From the schema, you already know what kind of data to expect and you can choose to request just what you need.
Postman has something called postman scripts that can be used to write unit-like tests. Its assertion and test suite were built atop mocha and chai making it quite similar in usage to them.
Postman scripts can be written and run in the tests tab in Postman, which is a NodeJS runtime environment for collections.
Because of the declarative nature of GraphQL, it is possible to generate sample test cases for GraphQL APIs on postman collections. It doesn't have to be anything fancy, it could be just very basic data validation checks for s start.
I am not familiar with what Escape provides, but we could also have a few security test cases that are auto-generated and can be run on the fly.
The text was updated successfully, but these errors were encountered:
That's a cool idea, tho apart from just creating the test structure and maybe asserting the data types and testing a few limit cases (like wrong input and so on) I don't believe that we could really generate useful tests. And sadly including Escape like tests (even small ones) would be really hard. I'll let the issue open for now but I don't think is a priority for now, tho any suggestions are welcomed. :)
GraphQL is a very declarative query language. It provides a declarative approach to data fetching. From the schema, you already know what kind of data to expect and you can choose to request just what you need.
Postman has something called postman scripts that can be used to write unit-like tests. Its assertion and test suite were built atop mocha and chai making it quite similar in usage to them.
Postman scripts can be written and run in the tests tab in Postman, which is a NodeJS runtime environment for collections.
Because of the declarative nature of GraphQL, it is possible to generate sample test cases for GraphQL APIs on postman collections. It doesn't have to be anything fancy, it could be just very basic data validation checks for s start.
I am not familiar with what Escape provides, but we could also have a few security test cases that are auto-generated and can be run on the fly.
The text was updated successfully, but these errors were encountered: