1

在 Win 10 机器上安装Taurus并创建一个新文件以测试我的 API 后:

perf-test-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-api\2018-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-api\2018-03-29_15-32-18.609453
15:32:19 WARNING: Done performing with code: 1
4

2 回答 2

2

如在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
于 2018-04-01T10:38:52.427 回答
1

你只有quick-test在“场景”字典和“执行”块下你试图调用名为的东西helloworld-api-perf-test

所以选项在:

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

更多信息:

  1. Taurus 配置语法
  2. 使用 Taurus 导航您的第一步
于 2018-05-28T05:27:40.057 回答