drupalextension icon indicating copy to clipboard operation
drupalextension copied to clipboard

Correct --init & -dl command

Open kentr opened this issue 8 years ago • 3 comments

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.

kentr avatar Feb 07 '17 01:02 kentr

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

kentr avatar Feb 07 '17 18:02 kentr

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

pfrenssen avatar Jun 08 '17 17:06 pfrenssen

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.

jhedstrom avatar Dec 05 '17 18:12 jhedstrom