If I want to test the REST API endpoint, I will use Frisby

If I want to test the REST API endpoint, I will use Frisby, since they claim by using Frisby makes testing API endpoints easy, fast, and fun. For the record, its built on top of Node.JS and Jasmine.

It’s quite easy for now, since the test suite are still simple. Here are one of my test suite that using Frisby to test API endpoint:

/**
* API base path test suite
*/

var frisby = require('frisby');

var app = require('./../../src/app/app');

frisby.create('Test API base path')
  .get('http://localhost:3000')
  .expectStatus(200)
  .toss();

Are you guys using other testing framework to test API endpoint, let me know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s