Java Faker library to generate fake data.

Maheshwar Ligade
techwasti
Published in
3 min readApr 10, 2021

--

Faker is very much a popular word in politics but in our tech context, this library is quite popular. The name of this library is self-describing, it is providing functionality to generate fake or dummy data.

It is a library that can be used to generate a wide array of real-looking data from a mobile number, addresses, names to popular culture references. This is really helpful when we want to use some placeholder but don't have actual data. Like you want to generate credit card data and want to do validation against that. Faker library will help you to generate that.

In the microservices-based development, we need data to do against validation, and generate the dummy test data is quite a challenging task. In this article, we will be looking at how to resolve this using Faker.

Let us go ahead visit http://start.spring.io/ this one and generate a project with favorite build tool either Gradle or maven and then add below dependency,

Maven:

<dependency><groupId>com.github.javafaker</groupId><artifactId>javafaker</artifactId><version>1.0.2</version></dependency>

Gradle

compile group: 'com.github.javafaker', name…

--

--

Maheshwar Ligade
techwasti

Learner, Full Stack Developer, blogger, amateur #ML,#DL,#AI dev in the quantum moment. I run https://techwasti.com/ to post all my articles.