A workshop on Behat with Mink and Drupal extension

shwetaneelsharma
prateekjain

Get started with automated browser testing, the codeless way using Behat. Behat is an open source BDD PHP framework. It has a rich library of extensions which will help you test user workflow, Drupal backend scenarios, test your APIs and also develop a Page Object Automation framework. By enabling these ready-to-use extensions, one can automate most parts of the website by using predefined step definitions, without any coding experience,

Please install the following before attending the session:

  1. MAMP / XAMPP / LAMP

  2. Composer (System-wide installation preferred)

  3. Local Drupal 8 site

  4. Download latest Selenium Standalone Server

  5. Java
     

In this practical session, you would learn the following:

  1. Behat installation

    1. Composer

    2. YAML configuration
       

  2. The Gherkin language
     

  3. Structure of Behat

    1. Features

    2. BDD
       

  4. Mink extension

    1. Installation using the Composer

    2. YAML Config changes

    3. Ready to use steps

      1. Filling forms

      2. Assertions

    4. Drivers

      1. Goutte

      2. Selenium2
         

  5. Custom function

    1. FeatureContext file
       

  6. Drupal extension

    1. Installation using the composer

    2. YAML config changes

    3. Ready to use steps

      1. Login with certain roles

      2. Create Content

    4. Drivers

      1. Blackbox

      2. Drush

      3. Drupal API
         

  7. Execution on local Drupal 8 installation

    1. Browser based

    2. Headless browser

    3. Tagged scenarios

    4. Skip scenarios

Program tags

automation, php, testing

Experience Level

Beginner

Drupal Version