将結果檔案的擴充名改為xml,例:将log.jtl改為log.xml。
在log.xml的檔案頭
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
中添加
<?xml-stylesheet type=“text/xsl” href=“jmeter-results-report.xsl” ?>
使之變成
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="jmeter-results-report.xsl" target="_blank" rel="external nofollow" ?>
<testResults version="1.2">
其中href指定xsl檔案的路徑,如果與xml檔案在同一目錄,則隻寫檔案名即可,否則要寫明詳細路徑。
修改後的報告展示: