Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,28 @@ while to complete. This can be a major headache when trying to
run tests quickly. pytest-test-groups allows you to easily say
"split my tests into groups of 10 tests and run the second group".
This is primarily useful in the context of CI builds.


Command-line Arguments
----------------------

.. option:: --test-group-count <N>

Total number of groups to split the tests into. There must be at least this many tests.

.. option:: --test-group <I>

The ``[1, N]`` test group to run, where ``N`` is the ``--test-group-count`` argument.
Use ``0`` to run all tests.

.. option:: --test-group-random-seed <SEED>

If provided, assigns tests to groups pseudo-randomly using the given seed.
The default is a consisten order based on test node id hash.

.. option:: --test-group-by <method>

Method for assigning tests to groups. Valid options are:

- ``item`` (default): Split by individual test items (default behavior).
- ``filename``: Split by test files, all tests from a single file remain in the same group.