分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

UI测试后生成测试报告,利用shell脚本上传svn

发布时间:2023-09-06 01:55责任编辑:郭大石关键词:shell

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

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved