Created
August 28, 2016 23:08
-
-
Save qinyu/995dd37ae75571efada326c0deb90b8e to your computer and use it in GitHub Desktop.
RF失败测试用例重试三次
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/sh | |
retry_count=3 | |
rm out/*.xml out/*.html | |
robot --log none --report none --outputdir out --output output.xml . | |
result=$? | |
if [ $result -lt 251 -a $result -gt 0 ] | |
then | |
output="output.xml" | |
while [ $retry_count -gt 0 ] | |
do | |
robot --log none --report none --rerunfailed out/$output --output out/rerun_${retry_count}.xml . | |
result=$? | |
echo "retry_count:${retry_count}:result:${result}" | |
if [ $result -eq 0 -o $result -gt 250 ] | |
then | |
break | |
fi | |
output="rerun_${retry_count}.xml" | |
retry_count=`expr $retry_count - 1` | |
done | |
fi | |
rebot --outputdir out --output output.xml --merge out/*.xml | |
rm out/rerun_*.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment