Home > database >  Passing Thread Properties in Taurus YAML JMeter
Passing Thread Properties in Taurus YAML JMeter

Time:03-16

I am trying to build a Taurus yaml file for the below Jmeter scenarios, I have 2 threads where I am passing the Number Of Threads and Duration. Now with the regular command line, I use the below command to start the script, I use this same command from Jenkins too. This works fine and generate reports but not blazemeter one, so i am trying Taurus integration...

nohup /ssd/jmeter/apache-jmeter-5.3/bin/jmeter3g -Jquoteoff.threads=20 -Jquote.threads=20 -n -t /ssd/jmeter/scripts/PerformanceTesting/src/PS/OFFLINE_ONLINE.jmx

enter image description here

My below YML give me error, i am not sure if i am missing anything. enter image description here

    execution:
- scenario:
    properties:
      quote.threads: 20
      quoteoff.threads: 20
      onduration: 3600        
    script: /ssd/jmeter/scripts/PerformanceTesting/src/PS/OFFLINE_ONLINE.jmx

Also is there any direct command like shell we can use to invoke this script? I have seen a few places directly calling JMX script in Jenkins but not sure how to pass parameters in that scenarios.

CodePudding user response:

I have no clue what's wrong here but below line is what causing the failure when i am trying to run bzt script.jmx

log.debug( vars.get("QUOTE_ID"));

To fix it when I changed log.debug to log.info it fixed the below problem I was facing. This is the partial answer as i am not sure about the reason for failure, but this should solve an issue where the script runs fine in Jmeter but bzt gives an error for XML parsing.

enter image description here

CodePudding user response:

  1. Wouldn't that be easier to add BlazeMeter Uploader plugin to your JMeter test plan, the plugin can be installed using JMeter Plugins Manager

  2. It's possible to run existing .jmx script without creating any YAML

    bzt /path/to/your/test.jmx
    
  3. The correct syntax to define properties is:

    execution:
    - scenario: simple
    
    scenarios:
      simple:
        script: tests/jmx/dummy.jmx
        properties:
           quote.threads: 20
           #etc
    
  4. Parameters can be passed via -o command-line argumententer link description here

  • Related