Faker
A Java library for generating fake data such as names, addresses, and phone numbers.
Install / Use
/learn @arakelian/FakerREADME
faker
Faker is library for generating high-quality fake data, such as names, addresses and phone numbers. Faker is still under development, and will evolved in the coming months.
Using Faker is very easy.
Requirements
- Versions < 4.0.0 require Java 8+
- Version 4+ require Java 11+
Generating People
Let's generate a random person.
Person person = RandomPerson.get().next()
If we want a list of 20 random people, we would call:
List<Person> people = RandomPerson.get().listOf(20);
If you use Jackson to serialize a person, you'll see something like this:
{
"firstName" : "PAM",
"lastName" : "GALLINGER",
"title" : "Carpet, Floor, and Tile Installer",
"gender" : "FEMALE",
"birthdate" : "1987-07-13T22:49:34.743000000Z",
"age" : 30
}
Generating Addresses
Let's generate a random address.
Address address = RandomAddress.get().next()
If we want a list of 20 random addresses, we would call:
List<Address> addresses = RandomAddress.get().listOf(20);
If you use Jackson to serialize an address, you'll see something like this:
{
"street" : "60 ENGLISH ST",
"city" : "SAN FRANCISCO",
"state" : "CA",
"postalCode" : "94105"
}
Installation
The library is available on Maven Central.
Maven
Add the following to your pom.xml:
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
...
<dependency>
<groupId>com.arakelian</groupId>
<artifactId>faker</artifactId>
<version>4.0.1</version>
<scope>test</scope>
</dependency>
Gradle
Add the following to your build.gradle:
repositories {
mavenCentral()
}
dependencies {
testCompile 'com.arakelian:faker:4.0.1'
}
Licence
Apache Version 2.0
Related Skills
qqbot-channel
347.6kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
347.6kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
cursor-agent-tracking
134A repository that provides a structured system for maintaining context and tracking changes in Cursor's AGENT mode conversations through template files, enabling better continuity and organization of AI interactions.
