【问题标题】:How to pass argument to pytest test in eclipse如何在eclipse中将参数传递给pytest测试
【发布时间】:2018-02-26 13:13:37
【问题描述】:

我正在将 Eclipse IDE 用于使用 pytest 编写测试用例的项目。我已将 pyunit 环境配置为使用“py.test runner”而不是“PyDev test runner”,但是,我无法为 pytest 传递任何参数。

这是我在终端中运行的示例命令 -

pytest --server-version=5.0.0-3516 --sync-gateway-version=1.5.0-557 --sync-gateway-config-file resources/sync_gateway_configs/sync_gateway_default_cc.json --mode=cc testsuites/syncgateway/functional/tests/

感谢您的帮助

【问题讨论】:

  • 您应该删除 pycharm 标签,因为您的问题涉及 eclipse。

标签: python eclipse ide pytest


【解决方案1】:

所以我想出了传递参数的方法并选择一个想要运行的测试用例。所以这里是如何传递参数的快照。

要运行特定案例,请使用 ctl + f9,然后选择该文件的案例。现在调试它使用 shift 键选择案例。

希望这对其他人有所帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-10-26
    • 2020-07-02
    • 2020-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多