[rspec-users] cucumber and autotest - running all features?
peter.a.jaros at gmail.com
Sun Nov 30 21:45:27 EST 2008
On Thu, Nov 27, 2008 at 4:12 PM, James Byrne <lists at ruby-forum.com> wrote:
> James Byrne wrote:
>> I understood that the purpose of autotest was that it ONLY ran a test
>> for the changed file. However, with this setup, if I touch any file
>> anywhere in the project then the full suite of feature tests apparently
>> gets run. for UnitTest autotest only run the tests associated with the
>> modified files.
> Except if I update a step_definitions file. Then only scenarios that
> use that step definitions file are run. However, if I change anything
> else, including the .feature file that contains the scenario, then the
> COMPLETE feature test is run.
The Autotest support in Cucumber doesn't currently associate any files
with specific scenarios. It only keeps track of failed scenarios. If
any are failing, changing any file will run those scenarios. If
everything has been passing, changing any file will run the whole
Features should be orthogonal to your classes, so there's no good way
to associate a scenario with the classes it tests. They can't be
associated with steps files because they can use steps from any steps
file. The only file they *can* be associated with in theory is the
feature file itself. That might be worthwhile, but since scenarios
are run by name, the Autotest plugin would have to find the names of
the scenarios in the file, which is non-trivial.
Are you saying that modifying a steps file runs the scenarios which
use those steps? I didn't write it to do that. If it does, that's
quite magical! :)
More information about the rspec-users