Behat/Behat — Issue #95: Don't parse feature files that do not contain tag filter
Author: msaspence
Created: 2012-02-15 09:45:35+00:00
State: open

I'm using tags to only run the scenario I'm currently working on, this is great because it means its quicker
However behat is still parsing everything, with a big test suite this is really adding up
Running just the file with the scenario I'm working on is both a decent workaround and demonstrates the problem

- Running one scenario (via tag filter) from the entire suite = 4s
- Running one scenario (via tag filter) from just the feature file it is in = 0.309s

It would be really nice if I didn't have to specify the file that it is was in
If behat did a regex on each feature file to see if it at least contained the tag(s) I'm filtering by before parsing it
There would still be a performance hit with opening all the files and performing a regular expression but I imagine this would be a fraction compared to parsing the file