There's an app that's in iOS, Android and Windows and that has plenty of web services and each web service has different response templates based on the input.
So basically we'd like to run different mock scenarios for testing in mobile app so we can easily catch regression issues and we can use mock system when server is down
So the URLs have absolute and relative URL for example.
https://www.test.com/myapp/getartcollection
So here https://www.test.com is an absolute URL /myapp/getartcollection is a relative URL.
I can change the absolute URL to my own custom web server URL/IP or localhost by using conditional flags while building the URL.
The server system can have one of the web server languages like Java or Ruby or PHP or Dot net etc..
What would be the right place to store the Mock response templates?
as a part of mobile app and add a parameter in the request which has the contents of expected response and the requesting URL server language can read the parameter and respond to the client with that.
or I can have certain folder structure in server and each folder has related API response templates stored in it so anyone with right permission can FTP it and change the response (JSON or XML) according to the expectation.
So what's the best way to keep different response templates organised is it by following different directories as in the URL or can we have everything in one directory and just send the
responseTemplateNameas header-field in request URL and use the filename to search the response template in one single directory.
Is there any industry standard or recommendations?
Any suggestion related anything to do with this is very welcome.
Mobile end points:
iOS, Android and Windows.





