Hack of the day: One-liner to run all Cucumber features matching a given string

Updated . Posted . Visible to the public.

The following will search for all .feature files containing a search term and run them using geordi Show archive.org snapshot .

find features/ -name '*.feature' | xargs grep -li 'YOUR SEARCH TERM' | sort -u | tr '\n' ' ' | xargs geordi cucumber

If you do not use Geordi, xargs cucumber or similar might work for you.

For details about each command, see explainshell.com Show archive.org snapshot .


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

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-07-07 14:34)