1、 General 设置
2、设置工作空间
存放自动化测试项目路径目录:/home/weblogic/AutoBuild/AutoTest/Oceanpayment
3、svn 源码管理
# Repository URL: svn 拉取自动化测试地址
svn://192.168.xxx.1/repos/CCPS/documents/document/python自动化测试/Oceanpayment@HEAD
4、设置定时构建
Build periodically: 定时构建任务(H 1 * * * 每日凌晨1点)
5、运行自动化测试
# 运行自动化测试用例
python /home/weblogic/AutoBuild/AutoTest/Oceanpayment/run_main.py
# 备份测试报告
python /home/weblogic/AutoBuild/PyScript/copy_report.py
6、设置邮件内容
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>自动化测试报告</title>
</head>
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4"
offset="0">
<div>
<table width="95%" cellpadding="0" cellspacing="0"
style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
<tr>
<th align="center" colspan="2"><br/>
<h2>项目信息</h2>
</th>
</tr>
<tr>
<td>
<ul>
<li>项目名称 : ${PROJECT_NAME}</li><br/>
<li>触发原因: ${CAUSE}</li><br/>
<li>项目链接: <a href="${PROJECT_URL}">${PROJECT_URL}</a></li><br/>
<li>日志链接: <a href="${BUILD_URL}console">${BUILD_URL}console</a></li><br/>
</ul>
</td>
</tr>
<tr>
<td colspan="2" align="center"><br/>
<h2>测试报告 (见附件)</h2>
</td>
</tr>
<tr>
<td colspan="2" align="left">
<div>${FILE ,path="/home/weblogic/AutoBuild/AutoTest/Oceanpayment/report/TestResult.html"}</div>
</td>
</tr>
</table>
</div>
</body>
</html>
网友评论