Repeatable fake data is very important for testing use cases:
- Integration tests where access to the original object is difficult or impossible. Example: one system creates data to be consumed by another system. The expected output is based on a transformation of the original data, and without hard coding, testing would essentially need to re-implement the system just for the test, defeating the purpose.
- Allowing debugging exact failure cases.
- Better understand of regressions.
- Even if random seeds are used, knowing the seeds to identify and fix flakey tests.
implementation:
At minimum, creating a local FakeIt as such, should be possible:
FakeIt::new(2314907).word();
Ideally you would also be able to set a global seed for ergonomics, so you do not have to create a FakeIt instance.
Repeatable fake data is very important for testing use cases:
implementation:
At minimum, creating a local
FakeItas such, should be possible:Ideally you would also be able to set a global seed for ergonomics, so you do not have to create a
FakeItinstance.