SAXParseException - 竹子服务器日志中的prolog中不允许使用内容。
我已经运行了Jmeter脚本并在本地工作正常。当使用竹子服务器运行时,给出异常。
注意:xml验证成功
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748")
<hashTree>
-------------------
-------------------
<name>SAXParseExceQtion</name>
<failure>true</failure>
<error>false</error)
<failureMessage>Content is not allowed in prolog.
See log file for further details.</failureMessage>
full bamboo server log1 attached click here
full bamboo server log2 attached click here
Bamboo配置如下,
export PATH=/usr/lib/jvm/java-1.8.0/bin:$PATH
echo "========================= Part 1 ================"
sh apache-jmeter-3.2/bin/jmeter \
-Jjmeter.save.saveservice.output_format=xml \
-n -t SWISSUniversalAPI.jmx \
-l ${bamboo.build.working.directory}/SWISSUniversalAPI.jtl
echo -e "/////////////////////////////TEST LOG DETAILS////////////////////////"
cat SWISSUniversalAPI.jtl
/usr/lib/jvm/java-1.8.0/bin/java -jar m2u.jar --input ${bamboo.build.working.directory}/SWISSUniversalAPI.jtl --output ${bamboo.build.working.directory}/SWISSUniversalAPI.xml
答案 0 :(得分:0)
您的问题并未包含足够的详细信息来猜测原因,很可能是因为它与错误的.jtl result file configuration相关联。默认情况下,JMeter将其结果存储为.jtl格式,而Bamboo似乎期待XML。因此,请尝试将下一行添加到 user.properties 文件中:
jmeter.save.saveservice.output_format=xml
查看How to Run JMeter in a Continuous Integration Environment With Bamboo文章,了解有关向Bamboo版本添加JMeter负载测试的更多信息。