Gopal S Akshintala
07/09/2021, 1:08 PMConnectClient
(written contextually for our services, which internally uses apache commons-httpclient).
6. Unmarshall response programmatically
7. Validate
Now I attempt to simplify this process for 3,4,5,6,7 by outsourcing them to a library I wanna build. The idea is:
3,4 - The developer provides a JSON file with some variables (similar to Postman variables) and I wish to create test data reading them. I am planning to use lens to read and validate this input JSON for type-safety.
5 - I want to reuse our existing ConnectClient
. How can I integrate this with http4k? (like JavaHttpClient
)
6 - I want to use Lens again to validate response for type-safety or unmarshal to a POJO.
7 - The developer wants to assert it against a JSON resource. Is there something like JsonApprovalTest
which doesn’t need a test runner? He also wants to assert individual field values. Is there any tool from the http4k toolkit that can help?
Also if I am missing any awesome http4k tool which can help in this flow, please let me know. Thanks!