Active
Project:
Behat integration with Drupal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 May 2012 at 19:31 UTC
Updated:
27 Dec 2012 at 05:24 UTC
Features definitions and steps should be hosted in modules (they test) rather than in a single directory in root.
Each module should be able to declare that it holds some behat features and steps definitions, the same way it declares it holds simpletest tests.
For this, of course, behat needs to be integrated into drush.
Comments
Comment #1
al.ex commentedHi Benoit,
I agree with you, it should be possible to associate features and step definitions with a module if the functionality they're testing confines to this module only.
However, keeping a "global" features directory imho does make a lot of sense too. That's the place to maintain site features, i.e. any sort of high-level functionality which usually integrates more than one module.
I don't understand why behat would need to integrate with drush though to make this happen. Could you explain that?
Cheers,
-Alex
Comment #2
benoit.pointet commentedI agree, a "global" features directory makes definitely sense. However per module step definition make definitely sense.
Don't remember why I thought drush integration was important. Drop this.
Comment #3
mile23I'd go a step further and say that global-scope tests should live outside the root drupal directory.
Most every Drupal site I set up these days has an 'umbrella' directory above Drupal, with lots of non-Drupal stuff in it. Behat tests should live there, for a few different reasons:
1) Feature files are supposed to have information about your processes in them. That kind of documentation doesn't belong under the docroot.
2) Composer will end up making a vendor directory, etc.
3) See #1.