Let’s get started.
Tell us what you’re working on, we’ll answer right away.
Ranger is a contextual data generator used to make sensible data for integration tests or to play with it in the database.
Ranger is a Java open-source library that allows developers to quickly and in a simple manner define and create a large number of objects whose attributes have randomly selected values from the configured set.
Two main purposes of Ranger are:
Ranger can be also used as a data source for a custom tool of your choice.
Ranger builds a tree of dependent value generators based on user configuration (either Java API or YAML configuration). Then it uses that tree to construct a map with generated values. If the type is not specified by the builder or configuration parser,
Map<String, Object> is the return type. If the type is specified, the Jackson library is used to convert the map to the specified type. All rules and limitations of Jackson apply here also.
Totally random test data is not so useful:
What we can do is use a contextual data generator and create users whose attribute values make sense in the domain context. We can also say, for example, that 70% of created users should be females. The table will then look like this: