Created
October 16, 2019 16:28
-
-
Save kpolitowicz/30b75e00507d186bf6cafc6c4194671d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pbpaste | ruby -e 'failed = $stdin.read.split(/\n+/).map{|s| s[/features.*?:\d+/]}.compact ; exit if failed.empty? ; cmd = "CUCUMBER_FORMAT=pretty bundle exec cucumber -r features/ #{failed.join(" ")}" ; $stderr.puts cmd ; puts cmd' | /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just clipboard-copy the whole "Failing Scenarios", e.g.:
and run the one-liner.
In every line it will match the first cuc feature with line number (e.g. features/compliance_obligations/activities/change_activity_status.feature:32) and run them together. It will also output the full cuc command to STDERR for convenience.
Edit: pbpaste works out-of-the-box on Mac OSX, here is how to make it work on Linux: https://www.ostechnix.com/how-to-use-pbcopy-and-pbpaste-commands-on-linux/