@@ -16,6 +16,8 @@ The plugin allows user to control the level of randomness they want to introduce
1616reordering on subsets of tests. Tests can be rerun in a specific order by passing a seed value reported
1717in a previous test run.
1818
19+ .. image :: ./docs/pytest-random-order-design.png
20+
1921-----------
2022Quick Start
2123-----------
@@ -85,8 +87,16 @@ that causes problems you can look up the value in the test report and repeat the
8587Design
8688------
8789
90+ .. image :: ./docs/pytest-random-order-design.png
91+
8892The plugin groups tests in buckets, shuffles them within buckets and then shuffles the buckets.
8993
94+ Given the test suite above, here are two of a few possible generated orders of tests:
95+
96+ .. image :: ./docs/pytest-random-order-example1.png
97+
98+ .. image :: ./docs/pytest-random-order-example2.png
99+
90100You can choose from a few types of buckets:
91101
92102class
@@ -116,6 +126,7 @@ global
116126none
117127 Disable shuffling.
118128
129+
119130If you have three buckets of tests ``A ``, ``B ``, and ``C `` with three tests ``1 `` and ``2 ``, and ``3 `` in each of them,
120131then one of many potential orderings that non-global randomisation can produce could be:
121132
@@ -244,3 +255,16 @@ v0.8.0
244255++++++
245256
246257* pytest cache plugin's ``--failed-first `` works now.
258+
259+ -------
260+ Credits
261+ -------
262+
263+ * The shuffle icon in the diagram is by artist `Daniele De Santis `_ and it was found on
264+ `iconarchive `_.
265+
266+ * The diagram is drawn with `sketchboard.io `_
267+
268+ .. _Daniele De Santis : https://www.danieledesantis.net/
269+ .. _iconarchive : http://www.iconarchive.com/artist/danieledesantis.html
270+ .. _sketchboard.io : https://sketchboard.io/
0 commit comments