Mink

Behat Mink: 09 - CLI Options Behat v2.5 Guide

 

Gherkin Filters

If you want to run only part of your suite, or some scenarios, you can do it with name or tags filters.

Tag filters supports three logical operators:

  • Tags separated by commas will be combined using the OR operation
  • Tags separated by && will be combined using the AND operation
  • Tags preceded by ~ will be excluded using the NOT operation

For example:

Behat Mink: MinkExtension

https://github.com/Behat/MinkExtension/blob/master/doc/index.rst

 

Mink Extension

You can use Behat to describe anything, that you can describe in business logic. It’s tools, gui applications, web applications. The most interesting part is web applications. First, behavioral testing already exists in the web world - it’s called functional or acceptance testing. Almost all popular frameworks and languages provide functional testing tools. Today we’ll talk about how to use Behat for functional testing of web applications. Mink is a tool exactly for that and this extension provides integration for it.

Basically, MinkExtension is an integration layer between Behat 3.0+ and Mink 1.4+ and it provides:

Tags

Behat Mink: 10 - DrupalExtension Drupal API Driver

 

Drupal API Driver

The Drupal API Driver is the fastest and the most powerful of the three drivers. Its biggest limitation is that the tests must run on the same server as the Drupal site.

Enable the Drupal API Driver

To enable the Drupal API driver, edit the behat.yml file, change the api_driver to drupal and add the path to the local Drupal installation as shown below:

Tags

Behat Mink: 10 - DrupalExtension Drush Driver

DrushComands.com

https://drushcommands.com/drush-8x/user/backdrop-user-login/


Drush Driver

Many tests require that a user logs into the site. With the blackbox driver, all user creation and login would have to take place via the user interface, which quickly becomes tedious and time consuming. You can use the Drush driver to add users, reset passwords, and log in by following the steps below, again, without having to write custom PHP. You can also do this with the Drupal API driver. The main advantage of the Drush driver is that it can work when your tests run on a different server than the site being tested.

Tags

Behat Mink: 10 - Drupal\DrupalExtension BlackBox Driver

 

Blackbox Driver

The blackbox driver assumes no privileged access to the site. You can run the tests on a local or remote server, and all the actions will take place through the site’s user interface. This driver was enabled as part of the installation instructions by lines 13 and 14, highlighted below.

Tags
Subscribe to Mink