Skip to main content

Pytest plugin for randomly selecting a specific number of tests

Project description

pytest-draw

Pytest plugin for randomly selecting a specific number of tests.

Overview

pytest-draw is a pytest plugin that allows you to randomly select a specific number of tests from your test suite. This can be useful for running a smaller subset of your tests during development or as part of your continuous integration (CI) pipeline.

By default, pytest-draw selects 5 tests to run.

Use Cases

Some potential use cases for pytest-draw include:

  • Running a smaller subset of your tests during development to speed up iteration time
  • Running a specific set of tests as part of your CI pipeline to ensure compatibility with certain environments or configurations
  • Running tests randomly to catch flaky tests or race conditions

Installation

You can install pytest-draw using pip:

pip install pytest-draw

Usage

Once installed, you can use the --draw command-line option to specify the number of tests to randomly select. For example, to randomly select 10 tests from your test suite, you can run:

pytest --draw=10

By default, pytest-draw selects 5 tests. You can specify a different number of tests using the --draw option.

Benefits

Some benefits of using pytest-draw include:

  • Faster iteration time during development by running a smaller subset of your tests
  • Improved test coverage by running tests randomly to catch flaky tests or race conditions
  • Improved reliability of your CI pipeline by running a specific set of tests in certain environments or configurations

How to Contribute

If you would like to contribute to pytest-draw, you can do so by opening a pull request on GitHub. We welcome contributions in the form of bug reports, feature requests, and code changes.

To get started, clone the pytest-draw repository and install the development dependencies:

We appreciate your contributions to pytest-draw and thank you for your support!

License

pytest-draw is licensed under the MIT License.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-draw-0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

pytest_draw-0.1-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page