我正试图通过Jmeter(使用Blazemeter)对Jenkins进行负载测试。我安装了:
项目文件夹中最初存在的唯一文件是blazedemo_script。在Jmeter中生成的jmx脚本,在该软件中完美运行。
执行永远不会结束。而且我也不明白为什么如果你在同一目录中输入修改后的文件就找不到它。
非常感谢。
我得到以下日志:
Lanzada por el usuario e73dbef17ee24d5c96bb99b8c598de0c
Ejecutando.en el espacio de trabajo C:\Program Files (x86)\Jenkins\workspace\blazermeter
[WARNING] Performance test: Job workspace contains spaces in path. Virtualenv does not support such path. Creating temporary workspace for virtualenv.
Performance test: Checking global bzt installation...
[blazermeter] $ bzt --help
Performance test: Found global bzt installation.
Performance test: run [bzt, blazedemo_script.jmx, C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml]
[blazermeter] $ bzt blazedemo_script.jmx "C:\Program Files (x86)\Jenkins\workspace\blazermeter\jenkins-report.yml"
13:24:19 INFO: Taurus CLI Tool v1.10.5
13:24:19 INFO: Starting with configs: ['C:\\Program Files (x86)\\Jenkins\\workspace\\blazermeter\\jenkins-report.yml', 'c:\\windows\\temp\\jmx_52sdqz.json']
13:24:19 INFO: Configuring...
13:24:19 INFO: Artifacts dir: C:\Program Files (x86)\Jenkins\workspace\blazermeter\2018-02-20_13-24-19.717000
13:24:19 INFO: Preparing...
13:24:20 WARNING: Failed to detect plugins for C:\Program Files (x86)\Jenkins\workspace\blazermeter\modified_blazedemo_script-1.jmx: [Error 2] El sistema no puede encontrar el archivo especificado
13:24:20 INFO: Starting...
13:24:20 INFO: Waiting for results...
答案 0 :(得分:1)
最后,我使用jenkins中的以下命令和脚本解决了这个问题:
Shell Script -- bzt xxxx.yml -o scenarios.xxxx-webapp.variables.port-number=8080 -o scenarios.xxxx-webapp.variables.server-name=xxxx-es-web-stable-12-app -o scenarios.xxxx-mobile.variables.port-number=8080 -o scenarios.xxxx-mobile.variables.server-name=xxxx-es-web-stable-12-app -o modules.console.disable=true -o settings.artifacts-dir=./results --
附上配置yml文件:
execution:
- scenario: xxxxxx-webapp
- scenario: xxxxxx-mobile
scenarios:
xxxxxx-webapp:
script: ./xxxxxx_WEBAPP/xxxxxx_WEBAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 1
ramp: 10
xxxxxx-mobile:
script: ./xxxxxx_ANDROIDAPP/xxxxxx_ANDROIDAPP.jmx
variables:
server-name: localhost
port-number: 9090
num-users: 3
ramp: 10