【发布时间】:2018-03-28 19:05:25
【问题描述】:
我有一个有 3 个 tests 的类,我正在使用 pytest 运行我的测试,使用 Selenium-Webdriver 执行 UI 操作。
class abc:
def test_1(self):
print("I am test_1 open browser and perform operations")
def test_2(self):
print("I am test_2 open browser and perform operations")
def test_3(self):
print("I am test_3 open browser and perform operations")
每个测试都会打开 Chrome 浏览器实例以执行一组 UI 操作。现在我想一次性运行上述所有测试。所以理想情况下pytest 应该同时打开三个Chrome 浏览器实例。 (我读过 xdist 插件,但我认为它用于在不同平台上运行测试)
请提供您的意见。
【问题讨论】:
标签: python-3.x selenium-webdriver parallel-processing pytest parallel-testing