英文:
How can I override flags defined in locust.conf?
问题
默认情况下,我想在无头模式下运行我的Locust测试,我在我的locust.conf
中定义了以下内容:
headless = true
然而,我想在CLI中覆盖这个设置。但是像这样的命令
locust --headless false
不起作用。
是否有办法在CLI中覆盖这样的标志?
英文:
Since by default I want to run my Locust tests in headless mode, I defined the following in my locust.conf
:
headless = true
However, I would like to override this in the CLI. But something like
locust --headless false
doesn't work.
Is there any way to override such flags using the CLI?
答案1
得分: 1
对于大多数标志,该方法运行正常。但出于某种原因,configargparse
在命令行中将布尔值覆盖为false时存在问题。
在Locust中有一个特定(隐藏的)参数叫做--headful
,用于解决这个特定的问题。它会覆盖任何其他无头设置。
英文:
For most flags that approach works fine. But for some reason configargparse
has issues with overriding a boolean value to false on command line.
There is a specific (hidden) parameter in Locust called --headful
to work around this particular issue. It overrides any other headless setting.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论