jenkins下通过ant执行jmeter脚本
先下个ant 解压开来
- 在到jenkins中设置:系统管理-全局工具配置-ant安装-新增ant,填上name和ant-home
- 将jmeter的ant-jmeter***.jar复制到ant-home/lib目录
附上build.xml
1 <?xml version="1.0"?> 2 <!-- 3 ant -v -d -Dtest=crm_mobile_api_uat -Djmeter.home=D: oolsapache-jmeter-3.3 4 Licensed to the Apache Software Foundation (ASF) under one or more 5 contributor license agreements. See the NOTICE file distributed with 6 this work for additional information regarding copyright ownership. 7 The ASF licenses this file to You under the Apache License, Version 2.0 8 (the "License"); you may not use this file except in compliance with 9 the License. You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 --> 19 <project name="ant-jmeter" default="all"> 20 <description> 21 22 Sample build file for use with ant-jmeter.jar 23 See http://www.programmerplanet.org/pages/projects/jmeter-ant-task.php 24 25 To run a test and create the output report: 26 ant -Dtest=script 27 28 To run a test only: 29 ant -Dtest=script run 30 31 To run report on existing test output 32 ant -Dtest=script report 33 34 The "script" parameter is the name of the script without the .jmx suffix. 35 36 Additional options: 37 -Dshow-data=y - include response data in Failure Details 38 -Dtestpath=xyz - path to test file(s) (default user.dir). 39 N.B. Ant interprets relative paths against the build file 40 -Djmeter.home=.. - path to JMeter home directory (defaults to parent of this build file) 41 -Dreport.title="My Report" - title for html report (default is 'Load Test Results') 42 </description> 43 44 <property name="testpath" value="${user.dir}"/> 45 <property name="jmeter.home" value="${basedir}/.."/> 46 <property name="report.title" value="Load Test Results"/> 47 48 <!-- Name of test (without .jmx) --> 49 <property name="test" value="Test"/> 50 51 <!-- Should report include response data for failures? --> 52 <property name="show-data" value="n"/> 53 54 <property name="format" value="2.1"/> 55 56 <condition property="style_version" value="_21"> 57 <equals arg1="${format}" arg2="2.1"/> 58 </condition> 59 60 <condition property="funcMode"> 61 <equals arg1="${show-data}" arg2="y"/> 62 </condition> 63 64 <condition property="funcMode" value="false"> 65 <not> 66 <equals arg1="${show-data}" arg2="y"/> 67 </not> 68 </condition> 69 70 <!-- Allow jar to be picked up locally --> 71 <path id="jmeter.classpath"> 72 <fileset dir="${basedir}"> 73 <include name="ant-jmeter*.jar"/> 74 </fileset> 75 </path> 76 <path id="derek.classpath"> 77 <fileset dir="${jmeter.home}/lib/"> 78 <include name="*.jar"/> 79 </fileset> 80 </path> 81 82 83 <taskdef 84 name="jmeter" 85 classpathref="jmeter.classpath" 86 classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/> 87 88 <target name="all" depends="run,report"/> 89 90 <target name="run"> 91 <echo>funcMode = ${funcMode}</echo> 92 <delete file="${testpath}/${test}.html"/> 93 <delete file="${testpath}/${test}.jtl"/> 94 <jmeter 95 jmeterhome="${jmeter.home}" 96 testplan ="${testpath}/${test}.jmx" 97 resultlog="${testpath}/${test}.jtl"> 98 <jvmarg value="-Xmx1024m"/> 99 <jvmarg value="-Djmeter.save.saveservice.output_format=xml"/> 100 <jvmarg value="-Dsampleresult.default.encoding=utf-8"/> 101 <jvmarg value="-Djmeter.save.saveservice.data_type=true"/> 102 <jvmarg value="-Djmeter.save.saveservice.label=true"/> 103 <jvmarg value="-Djmeter.save.saveservice.response_code=true"/> 104 <jvmarg value="-Djmeter.save.saveservice.response_data=true"/> 105 <jvmarg value="-Djmeter.save.saveservice.response_data.on_error=false"/> 106 <jvmarg value="-Djmeter.save.saveservice.response_message=true"/> 107 <jvmarg value="-Djmeter.save.saveservice.successful=true"/> 108 <jvmarg value="-Djmeter.save.saveservice.thread_name=true"/> 109 <jvmarg value="-Djmeter.save.saveservice.time=true"/> 110 <jvmarg value="-Djmeter.save.saveservice.subresults=true"/> 111 <jvmarg value="-Djmeter.save.saveservice.assertions=true"/> 112 <jvmarg value="-Djmeter.save.saveservice.latency=true"/> 113 <jvmarg value="-Djmeter.save.saveservice.connect_time=true"/> 114 <jvmarg value="-Djmeter.save.saveservice.samplerData=true"/> 115 <jvmarg value="-Djmeter.save.saveservice.responseHeaders=true"/> 116 <jvmarg value="-Djmeter.save.saveservice.requestHeaders=true"/> 117 <jvmarg value="-Djmeter.save.saveservice.encoding=true"/> 118 <jvmarg value="-Djmeter.save.saveservice.bytes=true"/> 119 <jvmarg value="-Djmeter.save.saveservice.url=true"/> 120 <jvmarg value="-Djmeter.save.saveservice.filename=true"/> 121 <jvmarg value="-Djmeter.save.saveservice.hostname=true"/> 122 <jvmarg value="-Djmeter.save.saveservice.thread_counts=true"/> 123 <jvmarg value="-Djmeter.save.saveservice.sample_count=true"/> 124 <jvmarg value="-Djmeter.save.saveservice.idle_time=true"/> 125 126 <!-- 127 <jvmarg value="-Xincgc"/> 128 <jvmarg value="-Xmx128m"/> 129 <jvmarg value="-Dproperty=value"/> 130 <jmeterarg value="-qextra.properties"/> 131 --> 132 <!-- Force suitable defaults --> 133 <property name="jmeter.save.saveservice.output_format" value="xml"/> 134 <property name="jmeter.save.saveservice.assertion_results" value="all"/> 135 <property name="jmeter.save.saveservice.bytes" value="true"/> 136 <!--property name="file_format.testlog" value="${format}"/--> 137 <property name="jmeter.save.saveservice.response_data.on_error" value="${funcMode}"/> 138 </jmeter> 139 </target> 140 141 <property name="lib.dir" value="${jmeter.home}/lib"/> 142 143 <!-- Use xalan copy from JMeter lib directory to ensure consistent processing with Java 1.4+ --> 144 <path id="xslt.classpath"> 145 <fileset dir="${lib.dir}" includes="xalan*.jar"/> 146 <fileset dir="${lib.dir}" includes="serializer*.jar"/> 147 </path> 148 149 <target name="report" depends="xslt-report,copy-images"> 150 <echo>Report generated at ${report.datestamp}</echo> 151 </target> 152 153 <target name="xslt-report" depends="_message_xalan"> 154 <tstamp><format property="report.datestamp" pattern="yyyy/MM/dd HH:mm"/></tstamp> 155 <xslt 156 classpathref="xslt.classpath" 157 force="true" 158 in="${testpath}/${test}.jtl" 159 out="${testpath}/${test}.html" 160 style="${jmeter.home}/extras/jmeter.results.shanhe.me.xsl"> 161 <param name="showData" expression="${show-data}"/> 162 <param name="titleReport" expression="${report.title}"/> 163 <param name="dateReport" expression="${report.datestamp}"/> 164 </xslt> 165 </target> 166 167 <!-- Copy report images if needed --> 168 <target name="copy-images" depends="verify-images" unless="samepath"> 169 <copy file="${jmeter.home}/extras/expand.png" tofile="${testpath}/expand.png"/> 170 <copy file="${jmeter.home}/extras/collapse.png" tofile="${testpath}/collapse.png"/> 171 </target> 172 173 <target name="verify-images"> 174 <condition property="samepath"> 175 <equals arg1="${testpath}" arg2="${basedir}" /> 176 </condition> 177 </target> 178 179 <!-- Check that the xalan libraries are present --> 180 <condition property="xalan.present"> 181 <and> 182 <!-- No need to check all jars; just check a few --> 183 <available classpathref="xslt.classpath" classname="org.apache.xalan.processor.TransformerFactoryImpl"/> 184 <available classpathref="xslt.classpath" classname="org.apache.xml.serializer.ExtendedContentHandler"/> 185 </and> 186 </condition> 187 188 <target name="_message_xalan" unless="xalan.present"> 189 <echo>Cannot find all xalan and/or serialiser jars</echo> 190 <echo>The XSLT formatting may not work correctly.</echo> 191 <echo>Check you have xalan and serializer jars in ${lib.dir}</echo> 192 </target> 193 194 195 </project>
另外要注意吧jmeter.results.shanhe.me.xsl文件放到jmeter的extras目录
1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 3 <xsl:output method="html" indent="no" encoding="UTF-8" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/> 4 <xsl:strip-space elements="*"/> 5 <xsl:template match="/testResults"> 6 <html lang="en"> 7 <head> 8 <meta name="Author" content="shanhe.me"/> 9 <title>JMeter Test Results</title> 10 <style type="text/css"><![CDATA[ 11 12 * { margin: 0; padding: 0 } 13 html, body { 100%; height: 100%; background: #b4b4b4; font-size: 12px } 14 table { border: none; border-collapse: collapse; table-layout: fixed } 15 td { vertical-align: baseline; font-size: 12px } 16 #left-panel { position: absolute; left: 0; top: 0; bottom: 0; 300px; overflow: auto; background: #dee4ea } 17 #left-panel li.navigation { font-weight: bold; cursor: default; color: #9da8b2; line-height: 18px; background-position: 12px 5px; background-repeat: no-repeat; padding: 0 0 0 25px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAICAYAAAArzdW1AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBQqGbO7BEcAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAKRJREFUGNN1zM0KgkAYheF3RvtXSsGyWhRNaILS7bdt11W0KgJvoPwZp0UlBPUtz3nOJw7Hk7necv5dOA2Qaazo2vZP0LEt9olCVtqQROufKNmuqBuBNAYW4QzXGX6B0bDPcjGnMQYJ8Cg12U59oSzaUJQa4IUAXMclDHwAAn/MxPMw765FZd2QRgopBWmsKCrdfhXnS/4ZYElBXdyxewN008Y8AephLAkqz613AAAAAElFTkSuQmCC) } 18 #left-panel li.success { color: #565b60 } 19 #left-panel li.failure { color: red } 20 #left-panel li { list-style: none; color: black; cursor: pointer } 21 #left-panel li.selected { background-repeat: repeat-x; color: white; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAUCAYAAABMDlehAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBQxLTs5O2gAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAEdJREFUCNc1y7ERgEAMA0GNUhIyGqM2uqKgtyWZhE9v53A/7/A6D7BkMDNgy2AroB2wHTCZv5UMOgFLG1bvd7XBckBlwCXjA5wMOF5iOX/MAAAAAElFTkSuQmCC) } 22 #left-panel div { line-height: 20px; background-position: 25px 3px; background-repeat: no-repeat; padding: 0 0 0 45px } 23 #left-panel div.success { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAOCAYAAADwikbvAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBULEEc6wzcAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAiNJREFUKM99kktIVGEYhp/jzJl08lI6logp2Y2EFkbtaqlFROsWrlq4ioJWQRs37VoUVItWkYEVRGSBlhleCpywDEWxTEuxcURTZ6YzxzP/5WshCOHUt36f93kXnyMi5Lsnb4clI4s4fhkXzp5w8mWcfHBvfEpUxVdCUUU6lUPNHuD86cYtBQX5GhPrM7hRg7GaSDRg2vuUd90WuOPVsOyqy6FFo2yOQHlU1S9z9dZT+S/8I7GCLlkAN4eyAf56mnT6Fy1HLnGuuYa++MS/4e74qMRqfXLaJ9BpfnsrLC0m2BYuoqwUbj/+274JD43OEqmexwvW8NUKXnaZtVSS1pNtAAyOvyC6v48HnUNb4Z7PH8UtTlIQWA5tb2RhYY7kz3l2FleytJYg/qWb8t2KZ/0PN+1hgI6uEUr2jpHKpGlquExVaS0VbjUZL7WxaqIXK6ADQ0n9GNfv9XCttWnD/O57t0TKFklnF3g5fJ/seoaa2D4O1x0F4PlgO9oIftbgFgYMfLgjACGqj0vlsddoUnj+Kt/mxunq72RP+UGqYjWMTA7R+b6dUCSEGEF5hoJQip6BaFs4HJtCyRrKs6wHCovDip/kys0WWpovMpOYBCtoT2N9B5uzWG0Zid8gnFrVFEQDtBaUrxEgXBimaEeER2/uIiK4roPOaMRYjBKsFly3fOO3G06dETGCWIsYjckprMphtEKMAQtgsMYi1mJMQHJ6xvkDKQoyphCzkl0AAAAASUVORK5CYII=) } 24 #left-panel div.failure { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAOCAYAAADwikbvAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBUJOEC5CU8AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAeVJREFUKM+NkDtok2EUhp8vl9ZLo/EyKI6KFgqCKC4OClrBWUQEcRRx1cGpk3WyInWrgoMZKkW8thYaEYQ0i7WC2ngrNDTERHJvkv/L/3//dxwc7F8jeOAsh/c973OOEhG61aPnaen7maXYt4MLZ4+pbppQt+F06jNH3QWOb8pxUs+SmJzjv83hxY8SVy3wNdtVneiHqe54IhLoB4/TUkyMyOrKj5yXoVtPZK02kLyYK7OnlqFWzgcCGtUC/YUJ3n5a/jd28tU7ORTN0myUA6Jms8bpWIa798elqzn1fokjThrpVBC3ETzNbYAuca59j/Hp+b/N869Tsk8tgVMCXQk+RlfQuk1/tMLMwzsSMCcm5zjhvoR2AdpF0GuwO4aqttS05ZSbZHhsBoAIwI83Cdkd/460XDAOG02d24MxvlR8dsUUh3f2UHaEtgdbWCHz4oZwcVCp66PP5FLhKjEc8DXaCMsNy8DYn/SnZ+L0hhWOb/F8yLs9fDtwk8j+VpqwrlC34PrgGEu2bhlYhZ1b8dncq3AMeBaUr/k6NUyk4ChKzu+N2hc6Bqody+WDG8g2fLatD7F3axjPgmvAtYJvIbouhhIRrl0ZktnkBGIt1gqeMXQ8D2MMiCIUCqFEsFhEQMSykCuqX0MzLAUJTzRsAAAAAElFTkSuQmCC) } 25 #left-panel div.detail { display: none } 26 #right-panel { position: absolute; right: 0; top: 0; bottom: 0; left: 301px; overflow: auto; background: white } 27 #right-panel .group { font-size: 12px; font-weight: bold; line-height: 16px; padding: 0 0 0 18px; counter-reset: assertion; background-repeat: repeat-x; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAQCAYAAADXnxW3AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBUkDq8pxjkAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAADdJREFUCNdVxrERwDAMAzGK0v47eS6Z927SpMFBAAbkvSvnRk5+7K5cVfLMyN39bWakJAjA5xw9R94jN3tVhVEAAAAASUVORK5CYII=) } 28 #right-panel .zebra { background-repeat: repeat; padding: 0 0 0 18px; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAmCAYAAAAFvPEHAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sDEBYWFlNztEcAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAABdJREFUCNdjYKAtePv5338mBgYGBpoQAGy1BAJlb/y6AAAAAElFTkSuQmCC) } 29 #right-panel .data { line-height: 19px; white-space: nowrap } 30 #right-panel pre.data { white-space: pre } 31 #right-panel tbody.failure { color: red } 32 #right-panel td.key { min- 108px } 33 #right-panel td.delimiter { min- 18px } 34 #right-panel td.assertion:before { counter-increment: assertion; content: counter(assertion) ". " } 35 #right-panel td.assertion { color: black } 36 #right-panel .trail { border-top: 1px solid #b4b4b4 } 37 38 ]]></style> 39 <script type="text/javascript"><![CDATA[ 40 41 var onclick_li = (function() { 42 var last_selected = null; 43 return function(li) { 44 if( last_selected == li ) 45 return; 46 if( last_selected ) 47 last_selected.className = ""; 48 last_selected = li; 49 last_selected.className = "selected"; 50 document.getElementById("right-panel").innerHTML = last_selected.firstChild.nextSibling.innerHTML; 51 return false; 52 }; 53 })(); 54 55 var patch_timestamp = function() { 56 var spans = document.getElementsByTagName("span"); 57 var len = spans.length; 58 for( var i = 0; i < len; ++i ) { 59 var span = spans[i]; 60 if( "patch_timestamp" == span.className ) 61 span.innerHTML = new Date( parseInt( span.innerHTML ) ); 62 } 63 }; 64 65 var patch_navigation_class = (function() { 66 67 var set_class = function(el, flag) { 68 if(el) { 69 el.className += flag ? " success" : " failure"; 70 } 71 }; 72 73 var traverse = function(el, group_el, flag) { 74 while(1) { 75 if(el) { 76 if(el.className == 'navigation') { 77 set_class(group_el, flag); 78 group_el = el; 79 flag = true; 80 } else { 81 var o = el.firstChild; 82 o = o ? o.className : null; 83 flag = flag ? (o == 'success') : false; 84 } 85 el = el.nextSibling; 86 } else { 87 set_class(group_el, flag); 88 break; 89 } 90 } 91 }; 92 93 return function() { 94 var o = document.getElementById("result-list"); 95 o = o ? o.firstChild : null; 96 if(o) 97 traverse(o, null, true); 98 }; 99 })(); 100 101 window.onload = function() { 102 patch_timestamp(); 103 patch_navigation_class(); 104 var o = document.getElementById("result-list"); 105 o = o ? o.firstChild : null; 106 o = o ? o.nextSibling : null; 107 if(o) 108 onclick_li(o); 109 }; 110 111 ]]></script> 112 </head> 113 <body> 114 <div id="left-panel"> 115 <ol id="result-list"> 116 <xsl:for-each select="*"> 117 <!-- group with the previous sibling --> 118 <xsl:if test="position() = 1 or @tn != preceding-sibling::*[1]/@tn"> 119 <li class="navigation">Thread: <xsl:value-of select="@tn"/></li> 120 </xsl:if> 121 <li onclick="return onclick_li(this);"> 122 <div> 123 <xsl:attribute name="class"> 124 <xsl:choose> 125 <xsl:when test="@s = 'true'">success</xsl:when> 126 <xsl:otherwise>failure</xsl:otherwise> 127 </xsl:choose> 128 </xsl:attribute> 129 <xsl:value-of select="@lb"/> 130 </div><div class="detail"> 131 <div class="group">Sampler</div> 132 <div class="zebra"> 133 <table> 134 <tr><td class="data key">Thread Name</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@tn"/></td></tr> 135 <tr><td class="data key">Timestamp</td><td class="data delimiter">:</td><td class="data"><span class="patch_timestamp"><xsl:value-of select="@ts"/></span></td></tr> 136 <tr><td class="data key">Time</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@t"/> ms</td></tr> 137 <tr><td class="data key">Latency</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@lt"/> ms</td></tr> 138 <tr><td class="data key">Bytes</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@by"/></td></tr> 139 <tr><td class="data key">Sample Count</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@sc"/></td></tr> 140 <tr><td class="data key">Error Count</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@ec"/></td></tr> 141 <tr><td class="data key">Response Code</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@rc"/></td></tr> 142 <tr><td class="data key">Response Message</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="@rm"/></td></tr> 143 </table> 144 </div> 145 <div class="trail"></div> 146 <xsl:if test="count(assertionResult) > 0"> 147 <div class="group">Assertion</div> 148 <div class="zebra"> 149 <table> 150 <xsl:for-each select="assertionResult"> 151 <tbody> 152 <xsl:attribute name="class"> 153 <xsl:choose> 154 <xsl:when test="failure = 'true'">failure</xsl:when> 155 <xsl:when test="error = 'true'">failure</xsl:when> 156 </xsl:choose> 157 </xsl:attribute> 158 <tr><td class="data assertion" colspan="3"><xsl:value-of select="name"/></td></tr> 159 <tr><td class="data key">Failure</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="failure"/></td></tr> 160 <tr><td class="data key">Error</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="error"/></td></tr> 161 <tr><td class="data key">Failure Message</td><td class="data delimiter">:</td><td class="data"><xsl:value-of select="failureMessage"/></td></tr> 162 </tbody> 163 </xsl:for-each> 164 </table> 165 </div> 166 <div class="trail"></div> 167 </xsl:if> 168 <div class="group">Request</div> 169 <div class="zebra"> 170 <table> 171 <tr><td class="data key">Method/Url</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="method"/><xsl:text> </xsl:text><xsl:value-of select="java.net.URL"/></pre></td></tr> 172 <tr><td class="data key">Query String</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="queryString"/></pre></td></tr> 173 <tr><td class="data key">Cookies</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="cookies"/></pre></td></tr> 174 <tr><td class="data key">Request Headers</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="requestHeader"/></pre></td></tr> 175 </table> 176 </div> 177 <div class="trail"></div> 178 <div class="group">Response</div> 179 <div class="zebra"> 180 <table> 181 <tr><td class="data key">Response Headers</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="responseHeader"/></pre></td></tr> 182 <tr><td class="data key">Response Data</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="responseData"/></pre></td></tr> 183 <tr><td class="data key">Response File</td><td class="data delimiter">:</td><td class="data"><pre class="data"><xsl:value-of select="responseFile"/></pre></td></tr> 184 </table> 185 </div> 186 <div class="trail"></div> 187 </div> 188 </li> 189 </xsl:for-each> 190 </ol> 191 </div> 192 <div id="right-panel"></div> 193 </body> 194 </html> 195 </xsl:template> 196 </xsl:stylesheet>
构建步骤中 ant的javaoptions:-Dtest=register_task -Dtestpath=/root/.jenkins/workspace/kyh_register/ -Djmeter.home=/home/userapp/apache-jmeter-4.0/ -Dreport.title="My Report"
jenkins启动命令java -jar -Dhudson.model.DirectoryBrowserSupport.CSP= jenkins.war --httpPort=80 >jenkins.log 2>&1 &