【问题标题】:How to do ordering the test cases using @pytest如何使用@pytest 对测试用例进行排序
【发布时间】:2018-10-16 23:41:06
【问题描述】:

各位帮我解决这个问题..我想使用注释订购测试用例

import pytest
@pytest.mark.run(order=2)

但它不起作用,我使用命令 pip install pytest 安装 告诉我如何解决这个问题,或者给我一些替代解决方案

【问题讨论】:

  • 请更新您的测试的相关源代码,您预计会发生什么以及实际发生了什么

标签: python python-2.7 unit-testing selenium selenium-webdriver


【解决方案1】:

您使用的语法不是来自pytest,而是来自插件pytest-ordering,您可以使用pip install pytest-ordering 安装它

【讨论】:

  • 嗨..我已经安装了“pip install pytest-ordering”——在“mark”之后——运行(order =1)它没有占用
  • 什么意思--在"mark"之后--run(order =1)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-08
  • 1970-01-01
  • 1970-01-01
  • 2022-12-15
  • 2019-12-17
相关资源
最近更新 更多