JustNatural
JustNatural

Reputation: 448

How to use Taurus to run a jmeter script which has a properties file dependency and generate the log file

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 ?

Upvotes: 2

Views: 2441

Answers (2)

Dmitri T
Dmitri T

Reputation: 168147

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:

Upvotes: 1

CarlosG
CarlosG

Reputation: 51

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.

Upvotes: 0

Related Questions