All Projects → browsertron → Pytest Parallel

browsertron / Pytest Parallel

Licence: mit
A pytest plugin for parallel and concurrent testing

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytest Parallel

YACLib
Yet Another Concurrency Library
Stars: ✭ 193 (+32.19%)
Mutual labels:  parallel, concurrent
java-multithread
Códigos feitos para o curso de Multithreading com Java, no canal RinaldoDev do YouTube.
Stars: ✭ 24 (-83.56%)
Mutual labels:  parallel, concurrent
pareach
a tiny function that "parallelizes" work in NodeJS
Stars: ✭ 19 (-86.99%)
Mutual labels:  parallel, concurrent
Util
A collection of useful utility functions
Stars: ✭ 201 (+37.67%)
Mutual labels:  parallel, concurrent
Ultra Runner
🏃⛰ Ultra fast monorepo script runner and build tool
Stars: ✭ 496 (+239.73%)
Mutual labels:  parallel, concurrent
web-scraping-engine
A simple web scraping engine supporting concurrent and anonymous scraping
Stars: ✭ 27 (-81.51%)
Mutual labels:  parallel, concurrent
python-appium-framework
Complete Python Appium framework in 360 degree
Stars: ✭ 43 (-70.55%)
Mutual labels:  parallel, pytest
Suman
🌇 🌆 🌉 Advanced, user-friendly, language-agnostic, super-high-performance test runner. http://sumanjs.org
Stars: ✭ 57 (-60.96%)
Mutual labels:  parallel, concurrent
Cloe
Cloe programming language
Stars: ✭ 398 (+172.6%)
Mutual labels:  parallel, concurrent
node-bogota
🚀 Run tape tests concurrently with tap-spec output
Stars: ✭ 15 (-89.73%)
Mutual labels:  parallel, concurrent
Hamsters.js
100% Vanilla Javascript Multithreading & Parallel Execution Library
Stars: ✭ 517 (+254.11%)
Mutual labels:  parallel, concurrent
Rubico
[a]synchronous functional programming
Stars: ✭ 133 (-8.9%)
Mutual labels:  parallel, concurrent
Android Download Manager Pro
Android/Java download manager library help you to download files in parallel mechanism in some chunks.
Stars: ✭ 1,568 (+973.97%)
Mutual labels:  parallel
Pytest Check
A pytest plugin that allows multiple failures per test.
Stars: ✭ 131 (-10.27%)
Mutual labels:  pytest
Kubetest
Kubernetes integration testing in Python via pytest
Stars: ✭ 122 (-16.44%)
Mutual labels:  pytest
Nimble
Stars: ✭ 121 (-17.12%)
Mutual labels:  parallel
Toolkit
Collection of useful patterns
Stars: ✭ 137 (-6.16%)
Mutual labels:  concurrent
Pytest Describe
Describe-style plugin for the pytest framework
Stars: ✭ 128 (-12.33%)
Mutual labels:  pytest
Redo
Smaller, easier, more powerful, and more reliable than make. An implementation of djb's redo.
Stars: ✭ 1,589 (+988.36%)
Mutual labels:  parallel
Bach
Compose your async functions with elegance.
Stars: ✭ 117 (-19.86%)
Mutual labels:  parallel

pytest-parallel

a pytest plugin for parallel and concurrent testing

What?

This plugin makes it possible to run tests quickly using multiprocessing (parallelism) and multithreading (concurrency).

Why?

pytest-xdist is great to run tests that:

  1. aren't threadsafe
  2. perform poorly when multithreaded
  3. need state isolation

pytest-parallel is better for some use cases (like Selenium tests) that:

  1. can be threadsafe
  2. can use non-blocking IO for http requests to make it performant
  3. manage little or no state in the Python environment

Put simply, pytest-xdist does parallelism while pytest-parallel does parallelism and concurrency.

Requirements

  • Python3 version [3.6+]
  • Unix or Mac for --workers
  • Unix, Mac, or Windows for --tests-per-worker

Installation

pip install pytest-parallel

Options

  • workers (optional) - max workers (aka processes) to start. Can be a positive integer or auto which uses one worker per core. Defaults to 1.
  • tests-per-worker (optional) - max concurrent tests per worker. Can be a positive integer or auto which evenly divides tests among the workers up to 50 concurrent tests. Defaults to 1.

Examples

# runs 2 workers with 1 test per worker at a time
pytest --workers 2

# runs 4 workers (assuming a quad-core machine) with 1 test per worker
pytest --workers auto

# runs 1 worker with 4 tests at a time
pytest --tests-per-worker 4

# runs 1 worker with up to 50 tests at a time
pytest --tests-per-worker auto

# runs 2 workers with up to 50 tests per worker
pytest --workers 2 --tests-per-worker auto

Notice

Beginning with Python 3.8, forking behavior is forced on macOS at the expense of safety.

Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See bpo-33725.

Source

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].