For a given REST endpoint, we can have multiple input JSON strings depending on the scenarios, and then the corresponding response JSON. How do you maintain all these input and output JSON? Harcoding them in the test code seems like, they will be difficult to maintain.
Ramiro Berrelleza
Co-founder & CEO at Okteto
It's hard to maintain, but in my experience, it is the best option. This type of tests serves two very important purposes:
The second one to me is crucial. Requiring someone to change the code and then the test when changing the input or output of an API test is a good way to ensure that everyone thinks this through, and doesn't end up breaking services that depend on your API.