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

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

Primary LanguagePHP

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