ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - serpro69/kotlin-faker: Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.
Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymiz...
Visit Site

GitHub - serpro69/kotlin-faker: Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.

GitHub - serpro69/kotlin-faker: Port of a popular ruby faker gem written in kotlin. Generate realistically looking fake data such as names, addresses, banking details, and many more, that can be used for testing and data anonymization purposes.

Stand With Ukraine

[!IMPORTANT] Are you considering supporting the project by donating to me? Please DO NOT!!!

Please visit the above banner link and make a small donation to help the people in Ukraine. A small donation goes a long way. 💙💛

<img src=./logo/name.png alt="kotlin-faker"/>

Generate realistically-looking fake data for Kotlin, Android, Java and JVM
Use kotlin-faker during development and testing to ensure your application data looks as if it was real, just like this really fake logo, but not quite so.

<img src=./logo/kotlin_faker.png height="144" alt="fake-logo"/>

Kotlin-faker is a kotlin port of a popular ruby faker gem.

Build Status Maven Central Sonatype Nexus (Snapshots) Issues GitHub Top Lang Awesome Kotlin Licence

ToC

About

kotlin-faker: the ultimate fake data generation library for development and testing

Kotlin-faker is a comprehensive data-generation library for the JVM. It is most suitable for development, testing, and data anonymization purposes, and can be used with Kotlin, Java, Android, Scala, and other JVM-based projects. Kotlin-faker provides realistic-looking, fake data generation capabilities in various domains like names 📇, addresses 🏡, internet 🌐, banking 💸, books 📖, games 🎮, and many more.

In fact, kotlin-faker is so good at generating fake data, it almost fooled us into thinking it was real! 😱 From names that sound like they belong to secret agents 🕴️, to addresses where superheroes 🦸 might live.


⚠️ P.S. All names, addresses, bank accounts, and other data generated by this library - even those based on real strings - are entirely fictional. 🦹 All produced data is fake and generated... poorly 💩 The data is completely made up, but the problems that it tries to solve are real 👽 We take no responsibility for any existential crises caused by the eerily convincing fake data. Use with caution! ⚠️

Prerequisites

  • Faker libraries depend on java 8 and kotlin 1.9.x for runtime
  • Building faker from source requires 3 jdk distributions: jdk 8 (temurin is recommended, but any vendor should work), jdk 11 (for docs module) and jdk 17 (graalvm-ce distribution, for cli-bot module). See CONTRIBUTING for more details.

Installation

Latest releases are always available on maven central.

Install with Gradle

dependencies {
    implementation 'io.github.serpro69:kotlin-faker:$version'
}

Install with Maven

<dependencies>
    <dependency>
        <groupId>io.github.serpro69</groupId>
        <artifactId>kotlin-faker</artifactId>
        <version>${version}</version>
    </dependency>
</dependencies>

Snapshots are also available using the following repository: https://oss.sonatype.org/content/repositories/snapshots/

With gradle

repositories {
    maven {
        url = 'https://oss.sonatype.org/content/repositories/snapshots/'
    }
}

With maven

<repositories>
    <repository>
        <id>sonatype-snapshot</id>
        <name>Sonatype Snapshot</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

BOM

Kotlin-faker provides a Bill-of-Materials that simplifies dependency management.

See bom/README.md for more details.

Additional Fakers

Extra fakers covering a wide range of domains are available as separate dependencies. See faker submodules in this repo for more details about each faker.

Third-Party Extensions

Faker provides extensions for some third-party testing libraries. See extension submodules in this repo for more details about each extension.

Usage

Full usage documentation for kotlin-faker is available at serpro69.github.io/kotlin-faker/.

NB! The documentation website is currently not versioned and always reflects master rather than the last stable version.

[!WARNING] kotlin-faker 2.0 is coming, which, apart from new features, also means breaking changes.

More details on currently added breaking changes and migration can be found in #220

Generating data

val faker = faker { }

faker.name.firstName() // => Ana
faker.address.city() // => New York

CLI

Command line application can be used for a quick lookup of faker functions. See faker-bot README for installation and usage details.

Test

To run unit tests: ./gradlew clean test

To run integration tests: ./gradlew clean integrationTest

Build and Deploy

To deploy to OSS Sonatype repo:

  • set the following properties in ~/.gradle/gradle.properties
    • signing.keyId=<key_id>
    • signing.password=<key_passphrase>
    • signing.secretKeyRingFile=/home/user/.gnupg/secring.gpg
    • sonatypeUsername=<oss_user_token>
    • sonatypePassword=<oss_password_token>
    • stagingProfileId=<oss_staging_profile_id>
  • running publishFakerCorePublicationToSonatypeRepository will publish the artifacts to either staging release repo or to snapshots repo, depending on the current version

Bumping versions

Versions need to be bumped manually through a tag with the next release version that has to follow the semver rules, and the tag has to be pushed to origin.

Creating the tag can be either done manually with git tag or by using gradlew tag task.

Pre-releases

To create a new pre-release version (new release candidate) the following can be used: ./gradlew clean tag -Prelease -PnewPreRelease -PbumpComponent={comp}, where comp can be one of the following values: major, minor, or patch.

To bump an existing pre-release to the next version (next release candidate for the same release version) the following can be used: ./gradlew clean tag -Prelease -PpreRelease.

Releases

To promote a pre-release to a release version the following can be used: ./gradlew clean tag -Prelease -PpromoteToRelease,

To create a new release version the following can be used: ./gradlew clean tag -Prelease -PbumpComponent={comp}, where comp can be one of the following values: major , minor, or patch.

Make targets

Alternatively to the above targets from Makefile can be used for the same purposes.

Contributing

The CONTRIBUTING guidelines should help in getting you started on how to contribute to this project.

Thanks

Many thanks to these awesome tools that help us in creating open-source software:
Intellij IDEA YourKit Java profiler

License

This code is free to use under the terms of the MIT license. See LICENSE.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory