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

Updated . Posted . Visible to the public.

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
Last edit
Dominik Schöler
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2016-09-19 08:45)