• 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>

  • 相关阅读:
    Ext.Ajax.request 传值问题
    类型反射与晚期绑定
    .net使用外部程序集拓展功能
    C#求解哈夫曼树
    几种获取操作系统语言的方法及其相似点与不同点
    C#调用非托管代码(C++方法)的2种方式
    构建可终结类型和可处置类型
    dockercompose 安装配置neo4j
    Windows 7 SDK Fails to Install with Return Code 5100 (GRMSDK_EN_DVD.iso)
    mysql密码修改方法
  • 原文地址:https://www.cnblogs.com/beiyue/p/11937939.html
Copyright © 2020-2023  润新知