Skip to content

Instantly share code, notes, and snippets.

@cordoval
Forked from jakzal/behat-runner.sh
Created October 26, 2013 06:15
Show Gist options
  • Save cordoval/7165870 to your computer and use it in GitHub Desktop.
Save cordoval/7165870 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# finds all sprint tags (like @sprint:42) and runs them in a reversed order (won't run not tagged scenarios)
PARALLEL_COMMAND='parallel --gnu --keep-order'
#PARALLEL_COMMAND='xargs -r -I{}'
BEHAT_COMMAND='./bin/behat --ansi --tags={}'
grep -m 1 '@sprint:' features/*.feature | sed -e 's/.*\(@sprint:[0-9]\+\).*/\1/' | sort -ur | $PARALLEL_COMMAND $BEHAT_COMMAND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment