Automating testing process
Behat and Lando
Behat
php framework for autotesting your business expectations
Behat: BDD
Behat is a behavior-driven development tool
What is BDD?
Development, based on examples of how the application should work
BDD: example
Feature: Real business example of application use
- Title
- Benefit
- Role
- Feature itself
BDD: example
Feature: Real business example of application use
- Additional information
BDD: example
Scenario: Context - Action - Outcome
BDD: example
Scenario: Context - Action - Outcome
BDD: Real life
Transformation: words to code
- use existing extensions
- drupal/drupal-extension
Example:
behat --config=/app/tests/behat-pantheon.yml --definitions i
BDD: Real life
Transformation: words to code
- write your own contexts with Behat
Example:
behat --config=/app/tests/behat-pantheon.yml --dry-run --snippets-for FeatureContext
behat --config=/app/tests/behat-pantheon.yml --dry-run --append-snippets
Behat and Lando
Example: nvz-jump
- remove local drush (will be fixed)
- use global drush
- add BEHAT environment variable
- you are good to go!
lando behat --config=/app/tests/behat-pantheon.yml
Questions, ideas, suggestions?
Automating testing process: Behat and Lando (English)
By Yauhen Zenko
Automating testing process: Behat and Lando (English)
- 1,326