All Projects → thiagokimo → Faker

thiagokimo / Faker

Licence: apache-2.0
Provides fake data to your Android apps :)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Faker

Mockaco
🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting
Stars: ✭ 213 (-8.97%)
Mutual labels:  mock, faker, mocking
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (+8.12%)
Mutual labels:  data, mock, mocking
Mimesis
Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.
Stars: ✭ 3,439 (+1369.66%)
Mutual labels:  faker, data, mock
mockingbird
🐦 Decorator Powered TypeScript Library for Creating Mocks
Stars: ✭ 70 (-70.09%)
Mutual labels:  mock, faker, mocking
Generator Http Fake Backend
Yeoman generator for building a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 49 (-79.06%)
Mutual labels:  data, mock, mocking
Fake Xrm Easy
The testing framework for Dynamics CRM and Dynamics 365 which runs on an In-Memory context and deals with mocks or fakes for you
Stars: ✭ 216 (-7.69%)
Mutual labels:  mock, mocking
Mocktail
A mock library for Dart inspired by mockito
Stars: ✭ 172 (-26.5%)
Mutual labels:  mock, mocking
Axios Mock Adapter
Axios adapter that allows to easily mock requests
Stars: ✭ 2,832 (+1110.26%)
Mutual labels:  mock, mocking
Mockiato
A strict, yet friendly mocking library for Rust 2018
Stars: ✭ 229 (-2.14%)
Mutual labels:  mock, mocking
Duckrails
Development tool to mock API endpoints quickly and easily (docker image available)
Stars: ✭ 1,690 (+622.22%)
Mutual labels:  mock, mocking
Mocktopus
Mocking framework for Rust
Stars: ✭ 179 (-23.5%)
Mutual labels:  mock, mocking
Pester
Pester is the ubiquitous test and mock framework for PowerShell.
Stars: ✭ 2,620 (+1019.66%)
Mutual labels:  mock, mocking
Mockito
Most popular Mocking framework for unit tests written in Java
Stars: ✭ 12,453 (+5221.79%)
Mutual labels:  mock, mocking
Httpretty
Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Stars: ✭ 1,930 (+724.79%)
Mutual labels:  mock, mocking
Fake2db
Generate fake but valid data filled databases for test purposes using most popular patterns(AFAIK). Current support is sqlite, mysql, postgresql, mongodb, redis, couchdb.
Stars: ✭ 2,113 (+802.99%)
Mutual labels:  faker, data
Morphlingjs
A CLI to mock with meaningful data a REST API from a Swagger file
Stars: ✭ 148 (-36.75%)
Mutual labels:  faker, mock
Graphql Faker
🎲 Mock or extend your GraphQL API with faked data. No coding required.
Stars: ✭ 2,361 (+908.97%)
Mutual labels:  faker, mock
Sinon Jest Cheatsheet
Some examples on how to achieve the same goal with either of both libraries: sinon and jest. Also some of those goals achievable only by one of these tools.
Stars: ✭ 226 (-3.42%)
Mutual labels:  mock, mocking
Python Mocket
a socket mock framework - for all kinds of socket animals, web-clients included
Stars: ✭ 209 (-10.68%)
Mutual labels:  mock, mocking
Charlatan
Create fake data in R
Stars: ✭ 209 (-10.68%)
Mutual labels:  faker, data

Faker

Android Arsenal Build Status

Faker provides fake data to your Android MPVs. Now it's very handy to make screenshots of your apps without worrying with Google Play copyright infringments, e.g this app. Faker helps you to populate your views with random data quickly and painlessly.

Screenshots

Demo

The sample application (the source is in the app folder) has been published on Google Play to facilitate the access:

Get it on Google Play

The demo app has a very clean MVP architecture based in the idea of this post. Feel free to give me suggestions.

Setup

Gradle:

Add the JitPack repository to your build file:

repositories {
    maven {
	    url "https://jitpack.io"
	}
}

Add the dependency in the form:

dependencies {
    compile 'com.github.thiagokimo:faker:VERSION'
}

Maven:

If you use Maven, add this into your build file:

<repository>
    <id>jitpack.io</id>
	<url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.thiagokimo</groupId>
    <artifactId>faker</artifactId>
    <version>VERSION</version>
</dependency>

Usage

The "lazy" way

Faker.with(context)
      .fill(rootView);

Faker will figure out all views inside the one you passed to it and fill it with proper data. Just like that!

By default faker will fill TextViews with lorem ipsum, ImageViews with a random color, CompoundButtons with a random state (check or uncheck) and ProgressBars with a random progress value.

The specific way

Faker.with(context)
      .NameOfTheComponent
      .componentMethod();

Targeting views

If you want Faker to fill specific views inside your ViewGroup you can pass your target views like the example below

Faker.with(context)
      .targetViews(collection-of-ids)
      .fill(rootView);

Check out all examples here.

Components

Faker is organized in components that provides you specific types of data. Here is a list of the current components:

  • Lorem - The old good lorem ispum words, sentences and paragraphs.
  • Name - Firsts, lasts, full and complete names and profession/titles.
  • Number - It gives you numbers ¬¬
  • Phone - Phone masks \o/
  • Internet - It provides you random emails and domains.
  • Url - Gives you (valid) urls that you might use somewhere.
  • Color - Generates attractive colors thanks to lzyzsd!
  • Address - Gives random cities, countries, zipcodes, states and so on.

Contribuiting

  1. Fork it
  2. Create your feature/bug-fix branch(git checkout -b my-new-feature-or-fix)
  3. Commit your changes (git commit -am 'Add some feature/fix')
  4. Do your pull-request

Make sure you write tests for your code. Only code with passing tests will be accepted.

Components

You can add more components or improve the existing ones. For new components, make sure you also add an example in the demo app.

Localization

You can help providing localized data to Faker components.

License

Copyright 2011, 2012 Thiago Rocha

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].