Node-based JSON RESTFul API testing tool

89 views
Skip to first unread message

Mayank Gupta

unread,
May 4, 2016, 8:17:27 AM5/4/16
to API Craft

Hi,


We have a node-based JSON REST API and we use mocha for unit testing.


I’m looking for a node-based functional api testing framework (preferably one that uses mocha as a runner). Do you have any recommendations? Does anyone have experience with 'chakram' for this purpose?


-Thanks

Mayank Gupta

Simon Renoult

unread,
May 4, 2016, 2:12:39 PM5/4/16
to API Craft
Hello,

We have been using cucumber.js for the last 16 months. Though it does not use mocha as a runner, it does the job quite well. Its easy to learn syntax allowed our product owner and business analyst to write the functional tests themselves.

Carl Sutherland

unread,
May 5, 2016, 10:52:25 AM5/5/16
to API Craft
Hey Mayank,

I've used mocha with a number of different libraries for testing APIs.  Starting with request-promise and your favorite assertion library eg. chai works well!  Many assertion libraries have extensions for HTTP-specific assertions, which can be useful.

I've tried higher-level HTTP testing abstractions for mocha in the past (eg. supertest) and ended up going back to something lower-level like request.

Best,
-Carl

Marsh Gardiner

unread,
May 6, 2016, 6:53:10 PM5/6/16
to API Craft
I work with the people behind http://apigee.com/about/blog/developer/swagger-test-templates-test-your-apis . If you're already working with Swagger/OpenAPI descriptions, it might be worth exploring.


On Wednesday, May 4, 2016 at 5:17:27 AM UTC-7, Mayank Gupta wrote:
Reply all
Reply to author
Forward
0 new messages