2

I want to try out the Taurus framework to run my existing jmeter scripts. I usually run my scripts from the CLI like this:

jmeter -n -p .\config.properties -t .\HTTPS-REST\Done\load-scenario.jmx -l .\HTTPS-REST\TestResults\load-scenario-log.jtl

With the above command, I am loading a properties file which is necessary to populate some constant values in the jmeter script and I am logging all requests in a .jtl file as the test runs.

How can I achieve the same result with Taurus ?

JustNatural
  • 375
  • 7
  • 19

2 Answers2

1

With regards to .properties file there are several ways to handle it:

  1. In your home directory there is a Taurus' special folder where it keeps downloaded tools called .bzt so you can rename your config.properties file to ~/.bzt/jmeter-taurus/x.x.x./bin/user.properties file and it will be picked up on next execution

  2. If you switch to YAML test plan definition to run existing .jmx script you will be able to convert .properties to YAML format like:

    modules:
      jmeter:
        properties:
          property1: value1
          property2: value2
          #etc.
    

    and then specify it via included-configs section

  3. Individual properties or location of the included-configs or both can be set/overriden via -o command-line argument like:

    bzt -o modules.jmeter.properties.property1=value1 -o modules.jmeter.properties.property2=value2 test.jmx
    

Results file is available in the artifacts directory, it is called kpi.jtl

More information:

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I tried option 1 first, but the CLI log info just remains hung at a "INFO: Preparing..." and nothing is happening. I can't even use CTRL+C to close the execution - I have to close the command prompt window. The bzt.log file which is created in my custom project root, show these last lines: [2021-10-22 12:49:27,704 DEBUG JMX] Saving JMX to: C:\Users\xxxx\....\xxxxx\modified_scriptName-2.jmx [2021-10-22 12:49:27,706 DEBUG root] Executing shell: ['C:\\Users\\xxxx\\.bzt\\jmeter-taurus\\5.2.1\\bin\\PluginsManagerCMD.bat', 'install-for-jmx', 'C:\\xxxx\\xxxx\\...\\modified_scriptName-2.jmx'] at . – JustNatural Oct 22 '21 at 10:04
0

The following link Adding-JMeter-Properties shows how add properties while executing the script using Taurus.

The JTL file will be available for download after the execution is done.

CarlosG
  • 51
  • 4
  • Ok, properties are added in yaml files. So if I want to use Taurus, I have to change my scripts' execution logic. How do I reference this yaml file in the CLI command? – JustNatural Oct 21 '21 at 21:24
  • No. Nothing to change on the JMeter script. Execute the script using bzt. See this link: https://gettaurus.org/ – CarlosG Oct 21 '21 at 23:59
  • Blazemeter offers a free course on Taurus. See Blazemeter University (https://www.blazemeter.com/university/) for more information. – CarlosG Oct 22 '21 at 00:06