python - 如何一次并行执行多个pytest套件(文件)

标签 python testing pytest parallel-execution

我正在尝试一次执行多个 pytest 套件,即并行执行,但我找不到解决方案,有人可以帮我解决这个问题吗。

例如,我有两个测试套件

1. test_one.py
2. test_two.py

如果我使用以下命令,执行将是顺序的,即一个接一个。但是我想同时并行执行两个测试套件

pytest test_one.py test_two.py -vvs

提前致谢

最佳答案

您可以使用 pytest 插件:xdistpytest-parallel

关于python - 如何一次并行执行多个pytest套件(文件),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58499847/

相关文章:

python - 如何在 pytest hooks 中捕获打印语句

python - 带有 github/bitbucket 私有(private) repos 的 pyinstaller 更新程序

python-3.x - 将属性添加到 junit xml pytest

python - 为什么没有 keras.engine 的文档?

testing - 使用 testify mock 进行表驱动测试

java - FEST:在执行任何操作之前等待 GUI 加载

delphi - 如何为表单测试伪造输入?

python-3.x - 如何对结果基于 while 循环中包含的条件语句的函数进行单元测试

python - 错误 : unhashable type: 'list' . 使用 df.groupby.apply 时

c++ - 子进程的异步双向 IO 重定向