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
It would be possible to create automated tests that verify if JSON-RPC APIs are compliant to the JSON-RPC specs.
Most (all?) specs are written in / using open-rpc and one way to do this could be:
Pick a call
grab the schema from the open-rpc.json for the specific call
validate this schema against the resulting json of the call with for example https://ajv.js.org
There is much more tooling around so perhaps there is something more obvious / commonly used available here.
Of course, the result of calls will depend on the state of the node. But I don't think the goal here is testing all possible outcomes of results but rather quick check if the defaults at least match the specification.
For Fluffy/Portal, it should be noted that there are already quite a bit of tests testing the most often used JSON-RPC calls. However, not in some autogenerated way.
The text was updated successfully, but these errors were encountered:
It would be possible to create automated tests that verify if JSON-RPC APIs are compliant to the JSON-RPC specs.
Most (all?) specs are written in / using open-rpc and one way to do this could be:
There is much more tooling around so perhaps there is something more obvious / commonly used available here.
Of course, the result of calls will depend on the state of the node. But I don't think the goal here is testing all possible outcomes of results but rather quick check if the defaults at least match the specification.
For Fluffy/Portal, it should be noted that there are already quite a bit of tests testing the most often used JSON-RPC calls. However, not in some autogenerated way.
The text was updated successfully, but these errors were encountered: