Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang YAWS: How to test a simple REST web service?

In a simple Erlang YAWS-based RESTful application I would like to have a set of tests that send HTTP requests to a RESTful API, get responses from the server and then test those responses.

It would be nice if each "send-request-get-request-test" test could be run from within EUnit (making possible to use test generators).

I would also like to be able to run this set of tests with rebar (make test).

Recently I used ibrowse in another application (Mochiweb), but I found it quiet cumbersome to use.

Are there any other options to write Erlang/OTP tests that can send HTTP requests to a YAWS RESTful application? What is the most common way to do that?

like image 703
skanatek Avatar asked Aug 21 '12 17:08

skanatek


1 Answers

Did you try etest and especially etest_http?

like image 119
Tilman Avatar answered Oct 03 '22 18:10

Tilman