bzt passing to jmx HTTP Request Defaults ${__P(protocol)} ${__P(host)} ${__P(port)}

234 views
Skip to first unread message

Troy Best

unread,
Jan 10, 2016, 9:19:50 AM1/10/16
to codename-taurus
Hello 

Presently in our jmx script files we have variables in HTTP Request Defaults: Protocol: ${__P(protocol)}, Server Name or IP: ${__P(host)}, Port Number: ${__P(port)} and on execution are passed to jmeter command line using -Jprotocol= -Jhost= and -Jport or using -p properties.file. No User Defined Variables config element is used.

How do I use bzt (v1.0) to execute jmx script and pass ${__P(protocol)} ${__P(host)} ${__P(port)} values to bzt in yml or bzt command line?

I have tried the following without success:

execution:
  scenario:
    script: fileName.jmx
    properties:
      protocol: http
      host: ourServerName
      port: 8080

and

modules:
  jmeter:
    properties:
      protocol: http
      host: ourServerName
      port: 8080

and

modifications:
  set-prop:
    "HTTP Request Defaults>HTTP Request Defaults.protocol": "http"
    "HTTP Request Defaults>HTTP Request Defaults.host": "ourServerName"
    "HTTP Request Defaults>HTTP Request Defaults.port": "8080"

and

modifications:
  set-prop:
    "HTTP Request Defaults>HTTP Request Defaults.protocol": "http"
    "HTTP Request Defaults>HTTP Request Defaults.server": "ourServerName"
    "HTTP Request Defaults>HTTP Request Defaults.port": "8080"

Thank you,
Troy

Troy Best

unread,
Jan 15, 2016, 6:28:56 AM1/15/16
to codename-taurus
I was able to figure out what was happening and as it turns out it had nothing to do with the jmeter:properties syntax. Rather, it is bzt changing my existing jmeter installation causing my jmeter scripts to fail. Specifically in my case, upon executing bzt for the first time bzt adds a number of files and removes commons-jexl-1.1.jar. Without commons-jexl-1.1.jar the "If Controllers" in my jmeter scripts do not execute. After adding back commons-jexl-1.1.jar to the jmeter/lib directory I am able to successfully execute my jmeter scripts using taurus.
Reply all
Reply to author
Forward
0 new messages