Last active
August 16, 2021 21:54
-
-
Save jinjagit/1607b817df5dbaa5d443ea1a9a60938c 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
#!/bin/zsh | |
# Zsh script to run rspec full test suite repeatedly (and in random orders). | |
# For overnight testing. Just 'Ctrl-C' repeatedly to terminate. | |
# Logs each full run to a separate log file. | |
# Interpolating date-time in filename avoids overwriting file with same name. | |
# Note: Make sure your computer will not sleep / hibernate in middle of process. | |
repeat 100 { | |
# Sleep gives time to Ctrl-C repeatedly before new file is created. | |
sleep 1 | |
date_time=$(date +%d-%m-%y_%H-%M-%S) | |
# We disable colored output to avoid ANSI code characters in the log file. | |
# Using tee so that terminal output also occurs, but if preferred just use | |
# --out option for rspec to supress terminal output but maintain logging to file. | |
docker-compose run --rm web rspec --no-color --order rand | tee specs_log_${date_time}.txt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To generate a report from the log files this script creates, see: parse_specs_logs.rb