spotify / ratatool

A tool for data sampling, data generation, and data diffing
Apache License 2.0
342 stars 55 forks source link

Provide configurable defaults for scalacheck generated fields #328

Open idreeskhan opened 4 years ago

idreeskhan commented 4 years ago

The most common issue is the strings that are generated are completely random and usually weird/non-ascii characters. While this is useful for testing it is not always the desired behaviour. Users can override this by implementing their own implicit generators but we should also provide a quick and easy way to get some common defaults (for example an ASCII string or a string with a max size)

patrickwmcgee commented 4 years ago

I think also providing some arbitrary instances uuid values, date values might also be valuable for folks who are interested in making sure their generated test data looks like what the real data should as well. Perhaps they could be packaged into a trait to allow for something like MyJobTest extends SafeArbitraryInstances?