Taurus: Attribute Error - 'NoneType' objec

2019-09-11 02:56发布

问题:

I keep getting an error which says:

11:50:51 ERROR: AttributeError: 'NoneType' object has no attribute 'get'

This is the code which i have written:

---
execution:
concurrency: 10
ramp-up: 1m
hold-for: 2m
scenario:
script: PerformanceTestPlan.jmx
concurrency: 10
ramp-up: 1m
hold-for: 2m
scenario:
script: ProcessorTestPlan.jmx

回答1:

I believe you should ask Taurus-related questions at Taurus Support Forum, discussion here is JMeter-oriented.


In regards to your question, the syntax is not very correct, it should look like:

---
execution:
- concurrency: 10
  ramp-up: 1m
  hold-for: 2m
  scenario:
    script: PerformanceTestPlan.jmx
- concurrency: 10
  ramp-up: 1m
  hold-for: 2m
  scenario:
    script: ProcessorTestPlan.jmx

Dashes and indents are very important, any missing or extra whitespace can run your test.

See Taurus - Working with Multiple JMeter Tests for more examples on combining several tests through Taurus.