4 ms·
Would someone provide an example on how this tool could be used to test a REST API? I think I'm missing something here. I'm not seeing how a fake response endpo
by memoryfault 13y ago
Would someone provide an example on how this tool could be used to test a REST API? I think I'm missing something here. I'm not seeing how a fake response endpoint lets me test my REST API (shouldn't my test code invoke the API and validate that the real response was correct?)
- xoail 13y agoOne usecase I can think of is when UI developers are working on a set of expected response from an API while the API is currently being developed by backend developers. Once the API is ready, UI devs can swap the uri.
- sanderjd 13y agoIt seems to me that it isn't for testing a REST API but rather for testing something that depends on one without having to deal with real integration issues.
- yotsumi 13y agoYes, you explain better than me ;)
- Millennium 13y agoYour test code should invoke the real API if it's testing the real API. If you're testing a REST client, on the other hand, then it's best to unit test on a controlled set of requests and responses. Testing on the real API comes later, when you're doing integration.