ui测试后生成测试报告,把报告保存在某一个固定路径
shell脚本把这个报告上传
#!/bin/bash -ile#svn下载文件#svn checkout http://svn.xxx.com/svn/xxxx/trunk/UI/report --username xxx --password dsdfsdf;svn checkout http://svn.xxx.com.cn/svn/xxxx/trunk/UI/report cd reportpwd#是否存在report 文件,如果存在就删除,这样svn上就不会保存很多文件,只保存一个文件files=$(ls report*.html 2> /dev/null | wc -l)if [ $files != "0" ] ;then ???#存在文件就删除 ???echo "文件存在" ???svn delete report*.html ???svn commit -m "delete report"else ????echo "文件不存在"fi#获取报告文件存放idflag=`cat /Users/pub_pawf_autotest/autoconf/flag.txt`echo $flag#生成报告文件的路径reportPath="/Users/pub_pawf_autotest/autoconf/report/report"$flag".html"#生成的报告文件名addReportPath=report"$flag".htmlecho $reportPath#如果生成的报告文件存在,就上传svn 判断文件是否存在if [ -f $reportPath ] ; then ????echo "报告文件存在"$reportPath ???cp $reportPath . ???svn add $addReportPath ???svn commit -m "add ?report"$addFilePathelse ???echo "报告文件不存在"$reportPathficd .. rm -rf report#重新下载下上传报告的svn文件svn checkout http://svn.xxx.com/svn/xxx/trunk/UI/report
UI测试后生成测试报告,利用shell脚本上传svn
原文地址:https://www.cnblogs.com/testway/p/9056627.html