[erlang-questions] Testing api with jsongen and quickcheck
Fri Aug 21 19:33:33 CEST 2015
On Fri, Aug 21, 2015 at 10:24 AM, Kenneth Lakin <kennethlakin@REDACTED> wrote:
> On 08/21/2015 09:27 AM, Mark Bruch wrote:
>> Unfortunately [jsongen] doesn't compile on any of
>> my machines.
> It fails to compile with rebar3 on my machine, too.
> Stupid question, but do you have QuickCheck installed? The missing
> include files that the build whines about seem to be related to QuickCheck.
> I found an eqcmini GitHub project, but that doesn't seem to provide
> enough to get jsongen to build.
> erlang-questions mailing list
Same problem with eqc.hrl here, once I replace 'make' with 'gmake'
since I'm on FreeBSD.
It's a different approach than jsongen, but I have a similar setup of
a JSON API for an Erlang codebase.
I'm using aeon* to convert JSON <=> Erlang records and sanitize the
json input along the way.
Since QuickCheck (and PropEr) can use the type info in Erlang records,
1) Write Erlang records that correspond to your JSON
2) Use QC/PropEr to generate the Erlang records
3) Use aeon to convert the Erlang to JSON and call your API with it
Yes, aeon is my own project. Hopefully others can use it too.
More information about the erlang-questions