Skip to content

Learning Experiment: Testing an API using Behat (WebApiExtension). Using Laravel 4.2

Notifications You must be signed in to change notification settings

edgarsandi/le-testing-api-with-behat-laravel

 
 

Repository files navigation

A Learning Experiment by Erik Aybar

  • Using Behat in the context of testing a RESTful JSON API
    • Using Behat's WebApiContext
    • Using Factories for test/seed data via Factory Muffin (Thinks Rail's factory_girl, but for PHP)
    • Enabling test/seed data to be dynamically generated from within Behat features and available for HTTP requests.
      • Boot tests
      • Declare some data
      • Issue HTTP Request
      • Seeded Data is Available, Processed, etc...
      • Keep this relatively fast...
  • Building said RESTful JSON API with Laravel 4.x
  • and so on....

Example Behat Test Output

Sample Behat Test Output

About

Learning Experiment: Testing an API using Behat (WebApiExtension). Using Laravel 4.2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 95.4%
  • Gherkin 4.1%
  • ApacheConf 0.5%