接口测试 Jenkins 生成 jmeter 报告,报告内容为啥是空的

kasijia · 2018年03月08日 · 最后由 kasijia 回复于 2018年03月09日 · 810 次阅读

如题。生成在本地的报告是可以正常查看的,但在 Jenkins 中查看内容白花花一片,有人知道为什吗,求教。
【Jenkins 查看】

【本地报告】

【配置信息如下】

93250855c4cc4323997fbe795ee6617c5fb574079e5944ebbe3a27896eddd1c6
curl -H "Authorization: Bearer 93250855c4cc4323997fbe795ee6617c5fb574079e5944ebbe3a27896eddd1c6" http://192.168.201.37:7100/api/v1/devices

{"success":true,"devices":[{"abi":"arm64-v8a","airplaneMode":false,"battery":{"health":"good","level":83,"scale":100,"source":"usb","status":"charging","temp":34.7,"voltage":4.162},"browser":{"apps":[{"id":"com.android.browser/.BrowserActivity","name":"Browser","selected":false,"system":true,"type":"android-browser","developer":"Google Inc."}],"selected":false},"channel":"ifHjSc1spCJ/HBvCHPkxICWoTUY=","cpuPlatform":"msm8996","createdAt":"2019-07-11T05:52:20.018Z","display":{"density":3,"fps":60.000003814697266,"height":1920,"id":0,"rotation":0,"secure":true,"size":5.147105693817139,"url":"ws://localhost:7408","width":1080,"xdpi":428.625,"ydpi":427.78900146484375},"manufacturer":"XIAOMI","model":"MI 5","network":{"connected":true,"failover":false,"roaming":false,"subtype":"","type":"WIFI"},"openGLESVersion":"3.1","operator":",","owner":null,"phone":{"iccid":null,"imei":"862033032250027","imsi":null,"network":"UNKNOWN","phoneNumber":null},"platform":"Android","presenceChangedAt":"2019-07-15T11:22:50.453Z","present":true,"product":"gemini","provider":{"channel":"S1r3jhGpQ5uLdWGoTAMfnA==","name":"boyuedeMacBook-Pro.local"},"ready":true,"remoteConnect":false,"remoteConnectUrl":null,"reverseForwards":[],"sdk":"23","serial":"edd06f8e","status":3,"statusChangedAt":"2019-07-15T11:22:50.458Z","usage":null,"usageChangedAt":"2019-07-15T11:22:07.439Z","version":"6.0","using":false},{"abi":"arm64-v8a","airplaneMode":false,"battery":{"health":"good","level":54,"scale":100,"source":"usb","status":"charging","temp":26.2,"voltage":3.917},"browser":{"apps":[{"id":"com.android.browser/.BrowserActivity","name":"Browser","selected":true,"system":true,"type":"android-browser","developer":"Google Inc."}],"selected":true},"channel":"iTprhZ8qSm0wysEnm64Cu/FveQU=","cpuPlatform":"msmnile","createdAt":"2019-07-11T05:45:14.685Z","display":{"density":2.75,"fps":60.000003814697266,"height":2340,"id":0,"rotation":0,"secure":true,"size":6.376625061035156,"url":"ws://localhost:7412","width":1080,"xdpi":403.4110107421875,"ydpi":404.32598876953125},"manufacturer":"XIAOMI","model":"MI 9","network":{"connected":true,"failover":false,"roaming":false,"subtype":"","type":"WIFI"},"openGLESVersion":"3.2","operator":",中国移动","owner":null,"phone":{"iccid":"898600790916F4008071","imei":"860682040008850","imsi":"460005462978710","network":"LTE","phoneNumber":null},"platform":"Android","presenceChangedAt":"2019-07-15T11:24:04.340Z","present":true,"product":"cepheus","provider":{"channel":"S1r3jhGpQ5uLdWGoTAMfnA==","name":"boyuedeMacBook-Pro.local"},"ready":true,"remoteConnect":false,"remoteConnectUrl":null,"reverseForwards":[],"sdk":"28","serial":"6d4a5e0d","status":3,"statusChangedAt":"2019-07-15T11:24:04.356Z","usage":null,"usageChangedAt":"2019-07-11T07:16:09.233Z","version":"9","using":false}]}

共收到 12 条回复 时间 点赞

用了 ant?还是其他构建工具

膨化先生 回复

没有用到 ant,ant 不太了解一直运行不通过,所以索性先只用 Jenkins😂

kasijia 回复

Publish HTML reports 本身不生成 html 报告,需要你自己先生成一个 html,这个插件再用来展示

膨化先生 回复

rmdir /s /q E:\apache-jmeter-3.0\report\ & rmdir /s /q E:\apache-jmeter-3.0\result & jmeter -n -t E:\apache-jmeter-3.0\bin\TestHome 首页校验.jmx -l E:\apache-jmeter-3.0\result\result.jtl -e -o E:\apache-jmeter-3.0\report\

构建的时候生成了的,Publish HTML reports 指向的就是已生成报告所在路径,请问这样设置对吗?
而且您看我的截图中生成的本地报告(下图)以及 Jenkins 报告(上图)的时间信息都是一致的,除了这部分信息其他信息都没有显示。

niu 回复

这个方法试过的但是么有用,还是谢谢你😃

kasijia 回复

设置应该没错,看下你的控制台详细信息

膨化先生 回复

解决了,3 楼的方法。很奇怪,这个方法我之前试过好几次都没成功,现在却有可以了😓 谢谢你的热心答疑

niu 回复

刚又试了一次成功了,很奇怪为啥之前试了那么多次这个方法都不行 谢谢你😀

kasijia 回复

😀 正常,偶现问题常遇到嘛

kasijia 回复

我之前也是好几次之后成功的不知道为什么😅

膨化先生 回复

严重怀疑复制脚本的时候忽略了标点符号的正确性,总之总算解决了😂

kasijia 关闭了讨论 07月15日 19:31
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册