Skip to content

Conversation

@kentr
Copy link

@kentr kentr commented Feb 7, 2017

For me, the instructions didn't work as-is.

Expected results:

Running bin/behat --init & bin/behat -dl would display the list of tests as the instructions say.

Actual results:

bin/behat -dl returned nothing.

For me, the instructions didn't work as-is.

**Expected results:**

Running `bin/behat --init` & `behat -dl` would display the list of tests as the instructions say.

**Actual results:**

`bin/behat -dl` returning nothing.
Copy link
Contributor

@jonathanjfshaw jonathanjfshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've got various example paths going on here:
sites/default/behat-tests
path/to/behat.yml
test-directory/features/FeatureContext.php

Can we standardise them all in line with the recommendation above:
sites/default/behat-tests
sites/default/behat-tests/behat.yml
sites/default/behat-tests/features/FeatureContext.php

Consistency would be really helpful

How's this?  

Behat is new to me, so I have only knowledge of what I encountered when I attempted to follow the installation instructions.  Wasn't sure what to do about the file path in this text: _"The `features/FeatureContext.php` file must be in the same directory as your `behat.yml`"_
@kentr
Copy link
Author

kentr commented Feb 7, 2017

How's this?

Behat is new to me, so I have only knowledge of what I encountered when I attempted to follow the installation instructions. Wasn't sure what to do about the file path in this text: "The features/FeatureContext.php file must be in the same directory as your behat.yml"

Maybe the underlying issue is that the instructions probably assume that behat would be run inside the directory with behat.yml. Is that the assumption?

If so, my changes probably aren't the best path to take -- would probably be better to add a step like

cd sites/default/behat-tests

@pfrenssen
Copy link
Collaborator

Maybe the underlying issue is that the instructions probably assume that behat would be run inside the directory with behat.yml. Is that the assumption?

If so, my changes probably aren't the best path to take -- would probably be better to add a step like

cd sites/default/behat-tests

Yes that is the assumption, it would be a good idea to update the documentation with this suggestion.

It is not a good practice to put the tests inside the web root though, so maybe just use a generic example like:

$ cd /path/to/behat/tests

@jhedstrom
Copy link
Owner

For most sites in Drupal 8, the webroot will be a subdirectory of the project root (eg, web or build/html, etc), and behat will be located in a sibling subdirectory (eg, test), so let's make that assumption for the docs fix. Also, the binary is now in vendor/bin/behat since we removed bin from our composer.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants