[API-users] Interest for a mock server?

Nicolas Noé n.noe at biodiversity.be
Tue Jan 24 13:40:53 CET 2017

Hi everyone and best wishes!

Over the years, I have several times written code that consumes the GBIF 
API. So far, proper unit testing of this code has been problematic, 
because I had to test it against the "real" GBIF API, with several 
drawbacks (fragility, test needs network connectivity, speed issues, 
...). I think other libraries (pygbif for example) probably face the 
same problems.

I am therefore thinking about creating a GBIF API mock server, that 
could be run locally and mimicks requests/responses cycles of 
api.gbif.org, to make testing our tools in isolation easier. It would 
have the following characteristics:

  * Be a (localhost-runnable) server rather than a mock library, so it
    can be used by code in any language
  * Mock the responses from api.gbif.org (starting with the most common
    stuff: read-only queries on occurrences, registry, ...)
  * Be super easy to install and run locally

I'm thinking of implementing it in Golang, since it seems to fit those 
requirements quite well and I'd like to build real-world experience with 
this technology.

Ideally, I'd like to write that is not only useful for myself, so here 
is my question: would you be interested in using such a mock server for 
your developments? Or isn't that so usefull? Maybe you know existing 
tools that can already be used to solve this problem?

Thanks for your feedback!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gbif.org/pipermail/api-users/attachments/20170124/e80538d4/attachment.html>

More information about the API-users mailing list