@@ -16,6 +16,8 @@ The plugin allows user to control the level of randomness they want to introduce
16
16
reordering on subsets of tests. Tests can be rerun in a specific order by passing a seed value reported
17
17
in a previous test run.
18
18
19
+ .. image :: ./docs/pytest-random-order-design.png
20
+
19
21
-----------
20
22
Quick Start
21
23
-----------
@@ -85,8 +87,16 @@ that causes problems you can look up the value in the test report and repeat the
85
87
Design
86
88
------
87
89
90
+ .. image :: ./docs/pytest-random-order-design.png
91
+
88
92
The plugin groups tests in buckets, shuffles them within buckets and then shuffles the buckets.
89
93
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
+
90
100
You can choose from a few types of buckets:
91
101
92
102
class
@@ -116,6 +126,7 @@ global
116
126
none
117
127
Disable shuffling.
118
128
129
+
119
130
If you have three buckets of tests ``A ``, ``B ``, and ``C `` with three tests ``1 `` and ``2 ``, and ``3 `` in each of them,
120
131
then one of many potential orderings that non-global randomisation can produce could be:
121
132
@@ -244,3 +255,16 @@ v0.8.0
244
255
++++++
245
256
246
257
* 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