Best way to test out a REST API?

A good REST API should be independent of the end client. So testing it in one scenario, it should be assumed it works in all scenarios using the same endpoints, HTTP verbs, and parameters.


As @Martin says, REST implemented properly is independent of the client (assuming it supports your representation types). So for example you can use the Poster add-on for Firefox, or RestClient 2.3.


  • You should already have unit tests for this service (e.g. PHPUnit). This ensures everything works as expected.
  • You may create acceptance tests (e.g. using Selenium)
  • You may test whether the service is accessible using CURL

Postman, an app on the Chrome Webstore is quite good too.

It has a very nice UI. All HTTP methods are supported. It even allows Basic and OAuth autentication and stores your previous requests.

Find the source code on GitHub here.

Tags:

Php

Rest

Json

Api