Data generators in software testing play a critical role in creating realistic and diverse datasets for testing scenarios. However, they present challenges, such as ensuring data diversity, maintaining quality, facilitating validation, and ensuring long-term maintainability.
While many engineers are familiar with these challenges, they often resort to non-specialized tools like the RandomStringUtils class from Apache Commons or the Random class, concatenating fixed data with it. This approach lacks scalability and may not yield a valid dataset.
Thankfully we have DataFaker, a library for Java and Kotlin to generate fake data, based on generators, that can be very helpful when generating test data to fill a database, to generate data for a stress test, or to anonymize data from production services.
With practical examples, you will learn how to generate data based on:
While many engineers are familiar with these challenges, they often resort to non-specialized tools like the RandomStringUtils class from Apache Commons or the Random class, concatenating fixed data with it. This approach lacks scalability and may not yield a valid dataset.
Thankfully we have DataFaker, a library for Java and Kotlin to generate fake data, based on generators, that can be very helpful when generating test data to fill a database, to generate data for a stress test, or to anonymize data from production services.
With practical examples, you will learn how to generate data based on:
- different or multiple locales
- random enum values
- different generators like address, code (books), currency, date and time, finance, internet, measurement, money, name, time, and others
- custom (data) providers
- sequences (collections and stream)
- date formats
- expressions
- transformations
- unique values
Elias Nogueira
Backbase
Elias is a Senior Principal Engineer at Backbase with a background in software engineering, consulting, agile coaching, and tech lead. He helps software engineers to develop their quality mindset and deliver bug-free software. He specializes in Quality Engineering for backend, frontend, and mobile technologies. He's a writer, blogger, and loves to help the community by running meetups and sharing knowledge by giving presentations worldwide.
He's also a Java Champion, Oracle ACE for Java, Java Magazine NL editor, TDC Rockstar, and Browserstack Champion.
He's also a Java Champion, Oracle ACE for Java, Java Magazine NL editor, TDC Rockstar, and Browserstack Champion.