fixture
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| fixture [2025/09/09 19:22] – created plida | fixture [2025/09/09 19:24] (current) – plida | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| Fixture is a defined and reliable context for the [[software_testing|tests]]. | Fixture is a defined and reliable context for the [[software_testing|tests]]. | ||
| - | It is useful because: | + | It is useful because |
| - | + | * The reuse of the arrangement | |
| - | * Reuse of the provisioning | + | |
| * A single initial state for a group of tests. | * A single initial state for a group of tests. | ||
| * Simplification and reduction of tests. | * Simplification and reduction of tests. | ||
| + | |||
| + | ==== Best practices ==== | ||
| + | - The fixtures should be minimal — just what is needed for the tests. | ||
| + | - Use SetUp/ | ||
| + | - In Python and Go, it is convenient to use yield/defer to free up resources. | ||
fixture.1757445748.txt.gz · Last modified: by plida
