Here is my behat.yml

default:
  suites:
    default:
      contexts:
        - FeatureContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
  extensions:
    Behat\MinkExtension:
      goutte: ~
      selenium2: ~
      base_url: http://d8blog.dev
    Drupal\DrupalExtension:
      blackbox: ~
      api_driver: 'drupal'
      drush:
        alias: 'local'
      drupal:
        drupal_root: '/var/www/sites/d8blog.dev'
      region_map:
        header: "#header"
        messages: "#messages"
        content: "#content"
        footer: "#footer"
        firts sidebar: "#sidebar-first"
        second sidebar: "#sidebar-second"

And here is my feature

@api
Feature: DrupalContext
  In order to prove the Drupal context is working properly for Drupal 8
  As a developer
  I need to use the step definitions of this context

  Scenario: Create and log in as a user
    Given I am logged in as a user with the "authenticated user" role
    When I click "My account"
    Then I should see the text "Member for"

  Scenario: Target links within table rows
    Given I am logged in as a user with the "administrator" role
    When I am at "admin/structure/types"
    And I click "Manage fields" in the "Article" row
    Then I should be on "admin/structure/types/manage/article/fields"
    And I should see text matching "Add new field"

  Scenario: Create users with roles
    Given users:
      | name     | mail            | roles         |
      | Joe User | joe@example.com | Administrator  |
    And I am logged in as a user with the "Administrator" role
    When I visit "admin/people"
    Then I should see the text "Administrator" in the "Joe User" row

I got a segmentation fault when i exec behat

$ behat
@api
Feature: DrupalContext
  In order to prove the Drupal context is working properly for Drupal 8
  As a developer
  I need to use the step definitions of this context

  Scenario: Create and log in as a user                               # features/d8.feature:7
Segmentation fault

With xdebug activated i get this error

Fatal error: Maximum function nesting level of '100' reached, aborting! in /var/www/sites/d8blog.dev/core/vendor/guzzlehttp/streams/src/Stream.php on line 42

Comments

frankcarey’s picture

Assigned: Unassigned » frankcarey
Status: Active » Closed (works as designed)

This is an xdebug/behat "issue", you just need to update your php.ini file to up the limit to 200-256 and you should be fine. See https://github.com/Behat/Behat/issues/666

Note that your tests will probably run faster with xdebug disabled, but I usually keep it on myself as well.

; in your php.ini
; Xdebug settings
[xdebug]
...
 xdebug.max_nesting_level=200