Skip to content

Add diagrams for design illustration #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 4, 2018
Merged
Show file tree
Hide file tree
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
24 changes: 24 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The plugin allows user to control the level of randomness they want to introduce
reordering on subsets of tests. Tests can be rerun in a specific order by passing a seed value reported
in a previous test run.

.. image:: ./docs/pytest-random-order-design.png

-----------
Quick Start
-----------
Expand Down Expand Up @@ -85,8 +87,16 @@ that causes problems you can look up the value in the test report and repeat the
Design
------

.. image:: ./docs/pytest-random-order-design.png

The plugin groups tests in buckets, shuffles them within buckets and then shuffles the buckets.

Given the test suite above, here are two of a few possible generated orders of tests:

.. image:: ./docs/pytest-random-order-example1.png

.. image:: ./docs/pytest-random-order-example2.png

You can choose from a few types of buckets:

class
Expand Down Expand Up @@ -116,6 +126,7 @@ global
none
Disable shuffling.


If you have three buckets of tests ``A``, ``B``, and ``C`` with three tests ``1`` and ``2``, and ``3`` in each of them,
then one of many potential orderings that non-global randomisation can produce could be:

Expand Down Expand Up @@ -244,3 +255,16 @@ v0.8.0
++++++

* pytest cache plugin's ``--failed-first`` works now.

-------
Credits
-------

* The shuffle icon in the diagram is by artist `Daniele De Santis`_ and it was found on
`iconarchive`_.

* The diagram is drawn with `sketchboard.io`_

.. _Daniele De Santis: https://www.danieledesantis.net/
.. _iconarchive: http://www.iconarchive.com/artist/danieledesantis.html
.. _sketchboard.io: https://sketchboard.io/
Binary file added docs/pytest-random-order-design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pytest-random-order-example1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pytest-random-order-example2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def read(fname):

setup(
name='pytest-random-order',
version='1.0.0',
version='1.0.1',
author='Jazeps Basko',
author_email='jazeps.basko@gmail.com',
maintainer='Jazeps Basko',
Expand Down