Skip to content

ml-opensource/rest-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel REST-tester Build Status

A suite of helper methods to test REST APIs.

Setup

  1. Require-dev the composer package
  2. Extend your base API test case from Fuzz\RestTests\BaseRestTestCase
  3. Adjust setUp and tearDown as needed. The tests for this package are a good example of how to use it.
    1. This package extends orchestra/testbench so all available functionality is present in rest-tester

Helper Traits

Base

  1. Fuzz\RestTests\BaseRestTestCase provides some helper methods to configure tests for a RESTful API

Resources

  1. Fuzz\RestTests\Resources\RestfulResource provides helper methods to test endpoints for restful resources
  2. Add Fuzz\RestTests\Resources\TestResourceX (where X is the resource action) traits depending on which actions need to be tested

OAuth

  1. Fuzz\RestTests\AuthTraits\OAuthTrait provides methods to authenticate, refresh tokens, retrieve tokens from request objects, create users/clients with scopes, etc.

Who tests the testers?

Run phpunit after composer install.

About

A suite of helper methods to test REST APIs.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages