Fix image path
This commit is contained in:
parent
d38787806a
commit
bb5b1f7e22
3 changed files with 6 additions and 6 deletions
10
.obsidian/workspace.json
vendored
10
.obsidian/workspace.json
vendored
|
@ -135,12 +135,15 @@
|
|||
},
|
||||
"active": "23b55eaa334e54e2",
|
||||
"lastOpenFiles": [
|
||||
"_site/tils/predictable_seed_data/index.html",
|
||||
"_site/tils/predictable_seed_data",
|
||||
"_site/images/predictable_data.png",
|
||||
"content/tils/kagi_small_web.md",
|
||||
"content/tils/pdf_obsidian_at_page.md",
|
||||
"content/tils/asdf_direnv.md",
|
||||
"content/tils/predictable_seed_data.md",
|
||||
"content/til.md",
|
||||
"content/images/Screenshot 2023-10-25 at 11.38.06 AM.png",
|
||||
"content/images/predictable_data.png",
|
||||
"content/tils/always_generated_ecto_boolean.md",
|
||||
"images/Screenshot.md",
|
||||
"images",
|
||||
|
@ -159,7 +162,6 @@
|
|||
"_site/til.xml",
|
||||
"_site/tils/always_generated_ecto_boolean/index.html",
|
||||
"_site/tils/pdf_obsidian_at_page/index.html",
|
||||
"_site/tils/always_generated_ecto_boolean",
|
||||
"_site/images/til-pdf-page.png",
|
||||
"node_modules/@11ty/eleventy-plugin-syntaxhighlight/README.md",
|
||||
"node_modules/@11ty/eleventy-plugin-syntaxhighlight/test/issue-80/index.md",
|
||||
|
@ -178,8 +180,6 @@
|
|||
"node_modules/async/CHANGELOG.md",
|
||||
"node_modules/minimist/README.md",
|
||||
"node_modules/minimist/CHANGELOG.md",
|
||||
"node_modules/@11ty/lodash-custom/README.md",
|
||||
"_site/images/ultimate-dungeon-terrain-3.jpg",
|
||||
"_site/images/ultimate-dungeon-terrain-2.jpg"
|
||||
"_site/images/ultimate-dungeon-terrain-3.jpg"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
@ -4,7 +4,7 @@ title: creating predictable seed data
|
|||
---
|
||||
A challenge appears when there's a requirement to create a _lot_ of unique seed data. Traditionally the developer community would reach for randomized libraries such as [Chance](https://chancejs.com/index.html) while generating data such as a new user with a random email, name, gender etc. This can lead to hard to automation test code as you cannot guarantee what a user's data will look like other than it's generic shape. One common solution is to write static [test fixtures](https://en.wikipedia.org/wiki/Test_fixture#Software) which come with their own problems such as difficulty scaling, updating, and interdependencies.
|
||||
|
||||

|
||||

|
||||
|
||||
Instead, what if we tied randomness to a static value such as an index within a loop (this can also be done with [static seeds](https://chancejs.com/usage/seed.html)). In the following examples we'll utilize a simple loop to create various types of predictable data.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue