How to upload .jtl file to blazemeter sense

雨燕双飞 提交于 2019-12-24 14:05:53

问题


I created a Jenkins job where it run some JMeter scripts and return .jtl files. Now, I want to upload this files to Blazemeter Sense to see the performance test, downloads pdf reports, etc. I've searched a lot of information, where I find that to upload some file, I can use this command thats running from Windows CMD:

curl -v https://sense.blazemeter.com/api/files -H "Authorization: Token 'cat ~/.loadosophia.token'" -F "projectKey=Project_name" -F "jtl_file=@jtl.gz"

REFERENCE: https://sense.blazemeter.com/wiki/help:uploads/

The only values that I change are

  • cat ~/.loadosophia.token, where I replaced for my Upload Token (finded in Blazemeter Sense -> Options -> Settings -> Your Upload Token)
  • projectKey where I replaced by my project name (test_taurus)
  • jtl_file where I replaced by the file directory generated by Jmeter test (.jtl)

The final command is:

curl -v https://sense.blazemeter.com/api/files -H "Authorization: Token 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXYLaa'" -F "projectKey=test_taurus" -F "jtl_file=/path/of/file/file.jtl"

I missed some? What is my wrong? Existe another posibility to make it?

Thanks everyone

U P D A T E:

I did what Dmitri T said. Thats works. But when I run the command, the output is the following:

What could be the issue?


回答1:


  1. You need to remove quotation marks around the token
  2. You need to add an "at" symbol before the .jtl file path

    Fixed command would be something like:

    curl -v https://sense.blazemeter.com/api/files -H "Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXYLaa" -F "projectKey=test_taurus" -F "jtl_file=@/path/of/file/file.jtl"
    

More information: Upload files with CURL


You might find BM.Sense Uploader plugin more convenient to use, the plugin can be installed using JMeter Plugins Manager:



来源:https://stackoverflow.com/questions/51307393/how-to-upload-jtl-file-to-blazemeter-sense

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!