python locust config file for multiple filesclasses - Stack Overflow

I'm using locust to do some load testing on our backend service and I have three classes defined i

I'm using locust to do some load testing on our backend service and I have three classes defined in three different .py files

then I'm trying to run locust using this command line

==> locust -f locustfiles/locustfile.py --headless --config ../loadTestConfig.yml

locustfile.py

from myClass1 import MyClass1 
from myClass2 import MyClass2 
from myClass3 import MyClass3 

loadTestConfig.yml

    user_classes:
      - class: MyClass1
        users: 8
        spawn_rate: 8
      - class: MyClass2
        users: 2
        spawn_rate: 2
      - class: MyClass3
        users: 36
        spawn_rate: 36
    
    run_time: 2m
    host: "https://myhost"

this would give me the error when lunched that it's not recongizing the option class from the yml file.

TestConfig.yml
locust: error: ambiguous option: --=class: MyClass3 could match --locustfile, --config, --help, --version, --worker, --master, --master-host, --master-port

How could I specify per class (file) the number of user and spwan rate?? Trying to buld my load scenario.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745675256a4639647.html

相关推荐

  • python locust config file for multiple filesclasses - Stack Overflow

    I'm using locust to do some load testing on our backend service and I have three classes defined i

    5小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信