We're getting intermittent failures.
Hope can I run one test 100 times to see how 'stable' it is?
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this communityIf you are using zsh shell:
repeat 10 { command }
On basic shell:
for _ in {1..10} do command; done
If you can run the tests in parallel, you can use the GNU Parallel:
parallel command ::: {1..1000}
Tutorial videos: https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1
Text tutorial: http://www.gnu.org/software/parallel/parallel_tutorial.html
Your test framework probably has some functionality to rerun failed tests. Behat, for instance, has a --rerun option.
Create a script in your home directory, e.g.
$ cat run_spec_100_times.sh
cd ~/eq/lynx
for i in `seq 1 100`;
do
rspec spec/features/survey_spec.rb
done
cd ~
Modify the script to be executable with chmod +x run_spec_100_times.sh
The use it with . run_spec_100_times.sh