Easy Random is a library that generates random Java objects. You can think of it as an ObjectMother for the JVM. The java.util.Random API provides 7 methods to generate random data: nextInt(), nextLong(), nextDouble(), nextFloat(), nextBytes(), nextBoolean() and nextGaussian(). What if you need to generate a random String? Or say a random instance of your domain object? Easy Random provides the EasyRandom API that extends java.util.Random with a method called nextObject(Class type). This method is able to generate a random instance of any arbitrary Java bean. Populating a Java object with random data can look easy at first glance, unless your domain model involves many related classes.

Features

  • Easy Random allows you to control how to generate random data through the org.jeasy.random.api.Randomizer interface
  • Makes it easy to exclude some fields from the object graph
  • The library will recursively populate all the object graph
  • The java.util.Random API provides 7 methods to generate random data
  • Easy Random provides the EasyRandom API that extends java.util.Random with a method called nextObject(Class type)
  • Generate a random instance of any arbitrary Java bean

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Easy Random

Easy Random Web Site

Other Useful Business Software
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Easy Random!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Java

Related Categories

Java Libraries

Registered

2023-08-22