Skip to content

Commit c5f7d16

Browse files
committed
Docs: Move design principles to README
The key design principles does not matter any more when you have the buy-in and already have read the entire documentation. The key design principles are now presented early, in README, when reader is hopefully scanning and making an assesment of library usability and quality.
1 parent 49e5c2f commit c5f7d16

File tree

2 files changed

+31
-32
lines changed

2 files changed

+31
-32
lines changed

DOCUMENTATION.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ tool like QuickCheck
2525
* [Oracle](#oracle)
2626
* [Induction](#induction)
2727
* [Stateful testing](#stateful-testing)
28-
* [Library key design principles](#library-key-design-principles)
2928

3029
## Property based testing core concepts
3130

@@ -400,34 +399,3 @@ monkey_test()
400399
Another example on stateful testing can be to poke at a stateful
401400
API with a random sequence of legal commands and verify that the API does not
402401
panic.
403-
404-
## Library key design principles
405-
406-
The key design principles of the Monkey Test library are the following:
407-
408-
* *configurability and flexibility* - Leave a high degree of configurability
409-
and flexibility to the user by letting most details to be specified
410-
programatically. The aim is to have an declarative builder-style API like
411-
the Java library
412-
QuickTheories [(github)](https://github.com/quicktheories/QuickTheories).
413-
414-
* *powerful shrinking* - Good shrinkers is a really important aspect of a
415-
property based testing tool. Let say that the failing example is a vector
416-
of 1000 elements and only 3 of the elements in combination is the actual
417-
failure cause. You are then unlikely to find the 3-element combination,
418-
if the shrinking is not powerful enough.
419-
420-
* *composability for complex test examples* - Basic type generators and
421-
shrinkers are provided out of the box.
422-
User should also be able to generate and shrink more complex types, by
423-
composing together more primitive generators and shrinkers into more
424-
complex ones.
425-
The main inspiration here is the Scala library ScalaCheck
426-
[(homepage)](https://scalacheck.org/),
427-
which is phenomenal in this aspect, having the power to for example easily
428-
generate and shrink recursive data structures, by using composition.
429-
430-
* *minimize macro magic* - In order to keep the tool simple, just avoid macros
431-
if same developer experience can be provided using normal Rust code.
432-
Macro-use is a complex escape hatch only to be used when normal syntax
433-
is insufficient.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,37 @@ Other known limitations:
7474

7575
For details on recent changes, see the [CHANGELOG](CHANGELOG.md).
7676

77+
## Key design principles
78+
79+
The key design principles of the Monkey Test library are the following:
80+
81+
* *configurability and flexibility* - Leave a high degree of configurability
82+
and flexibility to the user by letting most details to be specified
83+
programatically. The aim is to have an declarative builder-style API like
84+
the Java library
85+
QuickTheories [(github)](https://github.com/quicktheories/QuickTheories).
86+
87+
* *powerful shrinking* - Good shrinkers is a really important aspect of a
88+
property based testing tool. Let say that the failing example is a vector
89+
of 1000 elements and only 3 of the elements in combination is the actual
90+
failure cause. You are then unlikely to find the 3-element combination,
91+
if the shrinking is not powerful enough.
92+
93+
* *composability for complex test examples* - Basic type generators and
94+
shrinkers are provided out of the box.
95+
User should also be able to generate and shrink more complex types, by
96+
composing together more primitive generators and shrinkers into more
97+
complex ones.
98+
The main inspiration here is the Scala library ScalaCheck
99+
[(homepage)](https://scalacheck.org/),
100+
which is phenomenal in this aspect, having the power to for example easily
101+
generate and shrink recursive data structures, by using composition.
102+
103+
* *minimize macro magic* - In order to keep the tool simple, just avoid macros
104+
if same developer experience can be provided using normal Rust code.
105+
Macro-use is a complex escape hatch only to be used when normal syntax
106+
is insufficient.
107+
77108
## Alternative libraries
78109

79110
There are other alternatives for property based testing in Rust.

0 commit comments

Comments
 (0)