我第一次使用Taurus。我在Windows上配置相同。我已经安装了Taurus,并尝试将Selenium转换为Jmeter脚本。我正在关注以下参考书
https://www.blazemeter.com/blog/how-convert-selenium-scripts-jmx-converter/
我已经在blazemeter中设置了代理,并将其放在.bzt.rc文件中,还放置了秘密ID和令牌。
我尝试了多种方法来配置proxy2jmx,经过几处更改之后,我现在能够执行selenium测试,在该浏览器中打开并执行selenium事务。我得到了smartjmx,但是没有交易记录。
下面是我的.bzt-rc文件
# General Settings
settings:
# default-executor: jmeter # if you prefer using other executor by default - change this option
# artifacts-dir: ~/bzt-artifacts/%Y-%m-%d_%H-%M-%S.%f # change the default place to store artifact files
# check-updates: true # check for newer version of Taurus on startup
# check-interval: 1s # interval for Taurus engine to check test status and do other actions
# proxy:
# address: http://xxxxxxxxxxxxxxxxxxx
# username: xxxxxxxxxxxxxxxxxxx
# password: xxxxxxxxxxxxxxxxxxx
---
# CLI aliases - configure your "shortcuts" to apply config pieces
#cli-aliases: # user-defined config pieces to apply from command-line
# debug: # this alias is called as '-debug' from command line
# settings:
# verbose: true
# modules:
# jmeter:
# gui: true
# console:
# disable: true
---
# BlazeMeter reporting settings
modules:
blazemeter:
token: xxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# test: Test Name # name for test to store reports
# project: Project Name # name for project to store test, can be numeric project ID
# public-report: false # set to true to create a public link to the report
#
# browser-open: start # auto-open the report in browser,
# # can be "start", "end", "both", "none"
# send-interval: 30s # send data each n-th second
# timeout: 5s # connect and request timeout for BlazeMeter API
# artifact-upload-size-limit: 10 # limit max size of file (in megabytes)
# # that goes into zip for artifact upload, 10 by default
# check-interval: 5s # interval which Taurus uses to query test status from BlazeMeter
---
# JMeter settings
#modules:
# jmeter:
# properties: # JMeter properties for every JMeter run
# prop_name: prop value
# system-properties: # Java system properties
# sun.net.http.allowRestrictedHeaders: "true"
# memory-xmx: 4G # allow JMeter to use up to 4G of memory
# path: ~/.bzt/jmeter-taurus/{version}/bin/jmeter # path to local jmeter installation
# version: 3.2 # version to use
# plugins: # plugins to install
# - jpgc-json=2.2
# - jmeter-ftp
# - jpgc-casutg
---
# Gatling settings
#modules:
# gatling:
# properties:
# gatling.data.file.bufferSize: 256 # output buffer size, 256 bytes by default
我在日志文件中遇到以下错误
[2019-09-07 16:35:16,014警告Engine.proxy2jmx] proxy2jmx没有记录请求,请检查您的代理配置 [2019-09-07 16:35:16,022警告Engine.proxy2jmx]遇到Chrome调整问题,请查看http://gettaurus.org/docs/Proxy2JMX/以获得帮助
答案 0 :(得分:0)
您需要从行首删除这些#
字符。根据{{3}}文章:
- 注释以数字符号(
#
开头,可以从一行的任何地方开始,一直持续到该行的结尾。注释必须与其他标记用空格字符分隔。[15]如果#个字符出现在字符串中,则它们是数字符号(#)文字。
您还可以尝试通过YAML Syntax论坛与Taurus开发人员联系,或者如果您是BlazeMeter客户,则可以打开codename-taurus
最后但并非最不重要的一点,您可以support ticket并使用JMeter的configure your Selenium tests to use JMeter as the proxy
进行录音答案 1 :(得分:0)
我有完全相同的错误。我在Windows机器上编写同一教程。从 this发布,然后我发现以下语句:
对不起,Windows仅支持Chrome。
因此,我将示例文件更改为包括ChromeDriver而不是FirefoxDriver,它对我有用。