如何将.jtl文件上传到blazemeter感应 [英] How to upload .jtl file to blazemeter sense

查看:209
本文介绍了如何将.jtl文件上传到blazemeter感应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Jenkins作业,在其中运行一些JMeter脚本并返回.jtl文件.现在,我想将此文件上传到Blazemeter Sense以查看性能测试,下载pdf报告等. 我搜索了很多信息,在其中发现可以上传一些文件,我可以使用从Windows CMD运行的命令:

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"

参考: https://sense.blazemeter.com/wiki/help:uploads/

我唯一更改的值是

  • cat ~/.loadosophia.token,我在那里替换了我的上传令牌(在Blazemeter Sense->选项->设置->您的上传令牌中找到)
  • projectKey,我用我的项目名称(test_taurus)替换了
  • jtl_file,其中我替换为Jmeter测试(.jtl)生成的文件目录
  • 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)

最终命令是:

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?

谢谢大家

通用:

我按照德米特里(Dmitri T)的话做了.多数民众赞成在工作.但是当我运行命令时,输出如下:

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

可能是什么问题?

推荐答案

  1. 您需要删除令牌周围的引号
  2. 您需要在.jtl文件路径之前添加一个"at"符号

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

固定的命令类似于:

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

更多信息:使用CURL上传文件

您可能会找到 BM.Sense Uploader 插件使用起来更方便,可以使用安装该插件JMeter插件管理器:

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

这篇关于如何将.jtl文件上传到blazemeter感应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆