Last Updated: November 23, 2017
· curtis

Execute a subset of tests easily using find and xargs

xargs is a command line tool that can be really useful when combined with the find command. I often use it to execute a subset of tests. Here are a few examples.

Execute all of the administrator cucumber features:

find features -name "admin*" | xargs bundle exec cucumber

Execute all of the course specs:

find spec -name "*course*" | xargs bundle exec rspec