【问题标题】:Not able to run a Taurus performance test on an existing API无法在现有 API 上运行 Taurus 性能测试
【发布时间】:2018-09-08 21:38:15
【问题描述】:

在 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

【问题讨论】:

    标签: testing performance-testing blazemeter taurus


    【解决方案1】:

    taurus User Manualscenario中的执行也应该在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
    

    【讨论】:

      【解决方案2】:

      您在“场景”字典下只有 quick-test,在“执行”块中,您试图调用名为 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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-02-10
        • 1970-01-01
        • 2021-12-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多