News for hackers. Stuff that matters.
Re:Mock your HTTP responses to test your REST API by memoryfault on Friday May 03, 2013 @02:24PM (#5651701)
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?)
Re:Mock your HTTP responses to test your REST API by xoail on Friday May 03, 2013 @03:30PM (#5652141)
One 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.
Re:Mock your HTTP responses to test your REST API by sanderjd on Friday May 03, 2013 @04:53PM (#5652588)
It 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.
Re:Mock your HTTP responses to test your REST API by yotsumi on Friday May 03, 2013 @05:49PM (#5652846)
Yes, you explain better than me ;)
Re:Mock your HTTP responses to test your REST API by Millennium on Friday May 03, 2013 @05:11PM (#5652671)
Your 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.