Skip to content
Pau F. Grau edited this page Jan 10, 2021 · 1 revision

🔦 Integration / Functional Test with Behat

We use the follow open source for do integration / functional test:

Behat is configured in behat.yml

All test done by Behat are in:

All features are written by Gherkin sintax

Example:

  Scenario: A valid author without indicate limit of items
    Given I send a GET request to "/shout/steve-jobs"
    Then the response content should be:
    """
    [
          "THE ONLY WAY TO DO GREAT WORK IS TO LOVE WHAT YOU DO!",
          "YOUR TIME IS LIMITED, SO DON\u2019T WASTE IT LIVING SOMEONE ELSE\u2019S LIFE!"
    ]
    """
    Then the response status code should be 200

You can execute all features with the follow command: vendor/bin/behat

Clone this wiki locally