无法 运行 在现有 API 上进行 Taurus 性能测试

Not able to run a Taurus performance test on an existing API

在 Win 10 机器上安装 Taurus 并创建新文件进行性能测试后,我的 API:

性能测试-config.yml

execution:
- concurrency: 100
  ramp-up: 1m
  hold-for: 2m
  scenario: helloworld-api-perf-test

scenarios:
  quick-test:
    requests:
    - https://helloworld-api.cfapps.io

我在日志中收到以下错误:

错误日志:

> bzt perf-test-config.yml
15:32:18 INFO: Taurus CLI Tool v1.11.0
15:32:18 INFO: Starting with configs: ['perf-test-config.yml']
15:32:18 INFO: Configuring...
15:32:18 INFO: Artifacts dir: C:\Users\chandeln\MY-WORK\helloworld-api18-03-29_15-32-18.609453
15:32:18 WARNING: at path 'execution.0.scenario': scenario 'helloworld-api-perf-test' is used but isn't defined
15:32:18 INFO: Preparing...
15:32:19 WARNING: Could not find location at path: helloworld-api-perf-test
15:32:19 ERROR: Config Error: Scenario 'helloworld-api-perf-test' not found in scenarios: dict_keys(['quick-test'])
15:32:19 INFO: Post-processing...
15:32:19 INFO: Artifacts dir: C:\Users\chandeln\MY-WORK\helloworld-api18-03-29_15-32-18.609453
15:32:19 WARNING: Done performing with code: 1

taurus User Manual scenario在执行中也应在scenarios下 例如:

execution:
- concurrency: 100
  ramp-up: 1m
  hold-for: 2m
  scenario: helloworld-api-perf-test

scenarios:
  helloworld-api-perf-test:
    requests:
    - https://helloworld-api.cfapps.io

您在 "scenarios" 字典下只有 quick-test,而在 "execution" 块中您正试图调用名为 helloworld-api-perf-test

的内容

所以选项在:

  1. scenario: helloworld-api-perf-test更改为scenario: quick-test
  2. quick-test:更改为helloworld-api-perf-test:

更多信息:

  1. Taurus Configuration Syntax
  2. Navigating your First Steps Using Taurus