• Linux + Jenkins + Jmeter


    在Linux下部署Jmeter:

    在Jenkins下创建任务:

    General
    ======
    丢弃旧的构建
    策略: Log Rotation
    保持构建的天数:1
    保持构建的最大个数:5

    构建触发器
    =======
    定时构建
    日程表:0 7 * * *

    构建
    ===
    执行Windows 批处理命令
    命令:del "F:ToolsJenkinsworkspacejtl"TestReport$.jtl

    Invoke Ant
    Ant Version: Default
    Targets: run

    构建后操作
    =======
    Publish HTML reports
    Reports
    HTML directory to archive: F:ToolsJenkinsworkspacehtml
    Index page[s]: *.html
    Index page title[s](Optional)
    Report title: HTML Report

    Publish Performance test result report
    Source data files(autodetects format): F:ToolsJenkinsworkspacejtl*.jtl
    Performance display: Performance Per Test Case Mode 打钩
    Show Throught Chart
    Exclude response time of errored samples
    Fail build when result files are not present 打钩

    Select graphed metric: Average Response Time
    Select evaluation mode: Standard Mode
    Editable Email Notification
    Project Recipient List:
    多个邮件接收者用逗号隔开

    Project Reply-To List: $DEFAULT_REPLYTO
    Content Type: HTML (text/html)
    Default Subject: 接口自动化测试邮件
    Default Content:
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</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>详细测试报告 : <a href="${PROJECT_URL}HTML_Report">${PROJECT_URL}HTML_Report</a></li><br />
    <li>触发原因: ${CAUSE}</li><br />
    <li>项目 Url : <a href="${PROJECT_URL}">${PROJECT_URL}</a></li><br />
    </ul>
    </td>
    <td>${JELLY_SCRIPT,template="html"}<br/>
    </tr>

    <tr>
    <td colspan="2" align="center"><br />
    <!--h2>HTML_Report</h2-->
    </td>
    </tr>

    <tr>
    <td colspan="2" align="center">
    <div>${FILE ,path="F:/Tools/Jenkins/workspace/html/TestReport.html"}</div>
    </td>
    </tr>

    </table>
    </div>

    </body>
    </html>

  • 相关阅读:
    系统集群安装
    用ASP.net判断上传文件类型的三种方法
    C#中利用JQuery实现视频网站
    云计算和大数据
    c# Dictionary 中Keys.ToArray<>方法的细节测试
    DateTime compare
    Dictionary的遍历和修改
    C# 键值对数据排序
    ant使用小结
    给我们的7句话
  • 原文地址:https://www.cnblogs.com/beiyue/p/11937939.html
Copyright © 2020-2023  润新知