如何使用 CLI 在 Testcafe 中使用 userVariables

how to use the userVariables in Testcafe using the CLI

我正在尝试使用新的 userVariables 选项,这是在 Testcafe 的最新版本中新引入的。

我想知道是否可以通过 CLI 使用 userVariables。

我知道可以将变量添加到 testcaferc.json,如文档中所述:

https://testcafe.io/documentation/402638/reference/configuration-file#uservariables

我想不出通过命令行添加或修改变量和值的方法。

提前感谢任何help/hints。

您只能在配置文件中设置自定义用户变量。请参阅以下主题以获取更多信息:https://testcafe.io/403403/release-notes/framework/2021-9-8-testcafe-v1-16-0-released#support-for-custom-user-variables-in-the-configuration-file

此外,您可能希望在 TestCafe GitHub 存储库中跟踪以下问题:https://github.com/DevExpress/testcafe/issues/6621