Hack of the day: One-liner to run all changed Cucumber features

Similar to our snippet that runs all Cucumber features matching a given string, the following will run all modified or new Cucumber features by looking at your git status:

git status --short | grep -v '^ D ' | grep '.feature' | sed 's/.. //' | tr '\n' ' ' | xargs geordi cucumber

If you want to know what each of the above commands does, see explainshell Show archive.org snapshot .

Note that we use geordi cucumber Show archive.org snapshot to run our tests. If you don't, xargs cucumber or similar might work for you.


Part of Geordi 1.6.0 Show archive.org snapshot : geordi cucumber --modified.

Arne Hartherz