0

这是我试图通过 cli 覆盖的配置:

execution:
- concurrency: 1
  iterations: 20
  hold-for: 0s
  ramp-up: 0s
  scenario: delete

scenarios:
  delete:
    ...

当我尝试bzt ./myconfig.yml -o execution.iterations=100时,我收到以下错误

14:25:35 ERROR: Failed to apply override execution.iterations=100
14:25:35 ERROR: TypeError: '<' not supported between instances of 'str' and 'int'

我也试过引用它,即。"100",添加小数,即100.0,它们都返回相同的错误。覆盖整数的正确方法是什么?

4

1 回答 1

1

您可能需要指定特定的(第一个?)执行。这就是我们对类似参数所做的:

...
-o execution.0.concurrency=${concurrency} \
-o execution.0.hold-for=${holdfor} \
-o execution.0.ramp-up=${rampup} \
...

您可能需要对迭代执行相同的操作:

-o execution.0.iterations=100
于 2020-01-03T08:32:49.567 回答