• Stars
    star
    4,313
  • Rank 9,524 (Top 0.2 %)
  • Language
    Java
  • License
    Other
  • Created almost 13 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Brings the popular ruby faker gem to Java

Java Faker

Maven Status Build Status Coverage Status License

This library is a port of Ruby's faker gem (as well as Perl's Data::Faker library) that generates fake data. It's useful when you're developing a new project and need some pretty data for showcase.

Usage

In pom.xml, add the following xml stanza between <dependencies> ... </dependencies>

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

For gradle users, add the following to your build.gradle file.

dependencies {
    implementation 'com.github.javafaker:javafaker:1.0.2'
}

In your Java code

Faker faker = new Faker();

String name = faker.name().fullName(); // Miss Samanta Schmidt
String firstName = faker.name().firstName(); // Emory
String lastName = faker.name().lastName(); // Barton

String streetAddress = faker.address().streetAddress(); // 60018 Sawayn Brooks Suite 449

This is a demo web application that uses the library.

Javadoc

http://dius.github.io/java-faker/apidocs/index.html

Contributions

See CONTRIBUTING.md

Fakers

  • Address
  • Ancient
  • Animal
  • App
  • Aqua Teen Hunger Force
  • Artist
  • Avatar
  • Back To The Future
  • Aviation
  • Basketball
  • Beer
  • Bojack Horseman
  • Book
  • Bool
  • Business
  • ChuckNorris
  • Cat
  • Code
  • Coin
  • Color
  • Commerce
  • Company
  • Crypto
  • DateAndTime
  • Demographic
  • Disease
  • Dog
  • DragonBall
  • Dune
  • Educator
  • Esports
  • EnglandFootBall
  • File
  • Finance
  • Food
  • Friends
  • FunnyName
  • GameOfThrones
  • Gender
  • Hacker
  • HarryPotter
  • Hipster
  • HitchhikersGuideToTheGalaxy
  • Hobbit
  • HowIMetYourMother
  • IdNumber
  • Internet
  • Job
  • Kaamelott
  • LeagueOfLegends
  • Lebowski
  • LordOfTheRings
  • Lorem
  • Matz
  • Music
  • Name
  • Nation
  • Number
  • Options
  • Overwatch
  • PhoneNumber
  • Photography
  • Pokemon
  • Princess Bride
  • Relationship Terms
  • RickAndMorty
  • Robin
  • RockBand
  • Shakespeare
  • Sip
  • SlackEmoji
  • Space
  • StarCraft
  • StarTrek
  • Stock
  • Superhero
  • Team
  • TwinPeaks
  • University
  • Weather
  • Witcher
  • Yoda
  • Zelda

Usage with Locales

Faker faker = new Faker(new Locale("YOUR_LOCALE"));

Supported Locales

  • bg
  • ca
  • ca-CAT
  • da-DK
  • de
  • de-AT
  • de-CH
  • en
  • en-AU
  • en-au-ocker
  • en-BORK
  • en-CA
  • en-GB
  • en-IND
  • en-MS
  • en-NEP
  • en-NG
  • en-NZ
  • en-PAK
  • en-SG
  • en-UG
  • en-US
  • en-ZA
  • es
  • es-MX
  • fa
  • fi-FI
  • fr
  • he
  • hu
  • in-ID
  • it
  • ja
  • ko
  • nb-NO
  • nl
  • pl
  • pt
  • pt-BR
  • ru
  • sk
  • sv
  • sv-SE
  • tr
  • uk
  • vi
  • zh-CN
  • zh-TW

TODO

  • Port more classes over as there are more entries in the yml file that we don't have classes for

LICENSE

Copyright (c) 2019 DiUS Computing Pty Ltd. See the LICENSE file for license rights and limitations.

More Repositories

1

pact-workshop-jvm

Example JVM project for the Pact workshop
Java
108
star
2

pact-consumer-swift

A Swift / ObjeciveC DSL for creating pacts.
Swift
97
star
3

pact-workshop-js-v1

Original Example JS project for the Pact workshop
JavaScript
95
star
4

cp210x-cfg

CLI utility for programming CP210x USB<->UART bridges
C
84
star
5

pact_broker-docker

'Dockerised' pact broker
Shell
75
star
6

pact-consumer-js-dsl

*DEPRECATED* A Javascript DSL for creating pacts, superceded by Pact JS
JavaScript
56
star
7

pact-workshop-dotnet-core-v3

C#
19
star
8

cser

Code generator for C struct serialization
C
18
star
9

pact-workshop-android

Android Pact Workshop
Java
14
star
10

MaskRCNN-utils

Utilities for working with Mask R-CNN, a neural network for object instance segmentation.
Jupyter Notebook
14
star
11

rpi-stereo-cam-stream

Raspberry Pi Stereo Camera Live Stream
C
13
star
12

xmega-pdi-pi2

Programmer for flashing a directly connected AVR XMEGA from a Raspberry Pi 2, using the PDI protocol
C
12
star
13

gameday-resources

Resources to accompany the GameDay talk at Agile Australia (agileaustralia.com.au/2017/sessions/#pete-and-matt)
Shell
11
star
14

cloudformation-templates

CloudFormation template examples from DiUS
10
star
15

pact-provider-verifier-docker

Docker container to validate Pacts in a language-agnostic manner
Ruby
10
star
16

spiffsimg

Manipulate SPI Flash File System disk images
C
9
star
17

Physiognomy

Facial sentiment detection and classification
Python
8
star
18

pact-workshop-ruby-v2

Version 2 of the Pact Ruby Workshop
Ruby
8
star
19

qlprint

Command-line utility for printing to Brother QL label printers
C
8
star
20

build-lights

DiUS Build Lights
JavaScript
7
star
21

angular-confirm-click

An AngularJS directive which will display a confirmation message when a user clicks on a button, all inline.
JavaScript
7
star
22

coding-tests

coding tests for DiUS
5
star
23

emr-examples

Java
5
star
24

example-spring-saml-app

Java
5
star
25

sierra-gobi-drivers

Sierra Linux QMI "Gobi" drivers for CI use
C
5
star
26

deeplab-utils

Utilities for working with DeepLab
Jupyter Notebook
4
star
27

pact-workshop-ruby

Example project for Pact Ruby workshop
Ruby
4
star
28

spring-boot-template

Sample springboot application
Java
4
star
29

pactjs0

Spike code for Javascript implementation of Pact
JavaScript
4
star
30

resilience-ios

This is the iOS client for Resilience, a system designed to help communities recover from a natural or human-made disaster by crowd-sourcing issue identification and resolution.
Objective-C
3
star
31

pact-provider-js-dsl

Verify pacts against a provider using javascript.
3
star
32

DiUXit

Dixit digitised
HTML
3
star
33

pact-jvm-examples

Example projects making use of https://github.com/DiUS/pact-jvm
Scala
3
star
34

fatboy

Java
3
star
35

profiles

A short article giving a description of a person
JavaScript
2
star
36

wiki-index

Use SpringSense to index the full wikipedia from the monthly content dump
Java
2
star
37

pact-js-provider

Node Provider for Pact
Ruby
2
star
38

rhok-iphone

JavaScript
2
star
39

aws-examples

Ruby
2
star
40

rpilogic

Turn a Rasperry Pi into a simple offline logic analyser
C
2
star
41

ruby-api-bindings

SpringSense API Ruby Bindings
Ruby
2
star
42

jessbot

Helping buddies become better buddies
JavaScript
2
star
43

dev_abms

Agent Based Modelling System of software development process
JavaScript
2
star
44

aws-amplify-flutter

Dart
2
star
45

java-api-bindings

Java bindings for the SpringSense Meaning Recognition API
Java
2
star
46

resilience-android

This is the Android client for Resilience, a system designed to help communities recover from a natural or human-made disaster by crowd-sourcing issue identification and resolution.
Java
2
star
47

angular-leanengage

LeanEngage integration for your AngularJS app
JavaScript
1
star
48

pact-playframework

play framework interaction for pact-jvm library https://github.com/DiUS/pact-runner-jvm
Scala
1
star
49

lsrequire-core

JavaScript
1
star
50

arm-cs2011.03-42-toolchain

Code Sourcery's 2011.03-42 ARM toolchain
C
1
star
51

python-api-bindings

SpringSense API Python Bindings
Python
1
star
52

rhok-australia

Random Hacks of Kindness - Australia
JavaScript
1
star
53

rhok-sydney

Random Hacks of Kindness Sydney Community Site
Ruby
1
star
54

ios-spikeday-websockets

Objective-C
1
star
55

pimp-my-retro

Java
1
star
56

lambdastorm

Storm on AWS Lambda
JavaScript
1
star
57

future-me

JavaScript
1
star
58

FencingRanger

Arduino based point practise board
Arduino
1
star
59

nutch-index-filter

Nutch indexing filter for SpringSense integration
Java
1
star
60

3DiUS-ReactVRUXTools

UX tools for rapid VR prototyping via webVR
JavaScript
1
star
61

remote-worker

Collaboration tool to enable communication between remote team members
JavaScript
1
star
62

whitepages

Shell
1
star
63

serverless-demo

Files from Mario's serverless demo during Cloud Engineering SIG 17/11/16
JavaScript
1
star
64

logo_sphero

use logo commands to control sphero
JavaScript
1
star
65

ArduinoTableTennisRadar

Arduino based table tennis radar
CSS
1
star
66

rhok-iphone-objc

DiUS's entry for RHoK 2012 for iPhone Objective-C
Objective-C
1
star
67

angular-image-uploader

Upload images in an elegant way with this AngularJS directive
CoffeeScript
1
star
68

agile-resources

A collection of useful resources related to agile methodology, development, QA and others
1
star
69

rhok-server

DiUS's entry for RHoK 2012
1
star
70

cloud-cannon-s3

Integrate an S3 bucket with CloudCannon
JavaScript
1
star
71

dius-mentor_pedro_coffee-chat

API.AI Coffee Ordering Chatbot
JavaScript
1
star
72

project-health

Ruby
1
star
73

pactflow_nest_react_workshop

WIP workshop with Pactflow + React + NestJs
TypeScript
1
star
74

mongo-spike

Application code to drive Mongo DB for spike day
1
star
75

chatbot-builder

A smooth way to manage and maintain your chatbot definition.
JavaScript
1
star
76

vivid-sound-generator

JavaScript
1
star
77

diy-contract-example

A codebase demonstrating how to set up a simple non-HTTP consumer driven contract between two applications without using a contract testing library
Ruby
1
star
78

comfort-o-meter

The IoT SIG project to monitor office environmental data.
Arduino
1
star