30 comments

[ 2.6 ms ] story [ 50.0 ms ] thread
I always liked this library. Wrote a tutorial around the concept of it on websesign tuts a few years back, though I'm not sure how dated it is in relation to the API now (http://webdesign.tutsplus.com/tutorials/filler-content-tools...). Anyway, it deals with one way the library could be used in the browser, in combination with other filler content services, to aid "designing" in the browser.
+1 for using hook.io for the hosted API. I just love this service and think this is a great use case for it. Will support it on kickstarter.
Hook.io is still a thing? I didn't hear anything about it after the drama back in the days.
Why would I want to use this? Is this for test data or for obfuscation?
Could be used for both. I've used it for generating test data in unit/integration tests and also for obfuscation where production-dumps are needed.

It's useful for having in development as well, when you need to have X number of forms and X number of users but you don't want to have to manually create that every time you re-create the environment.

we use it for writing fixtures for tests
people use it for building dating sites.
Writing mock APIs for front-end dev.
I'm currently using it to mock my API responses for a front-end application.
I used this to generate test data for application benchmarking. That is, when I wanted real-ish data to test scalability.
So our front-end devs can try their interface designs with different data.
This looks interesting and very useful. However my only question is what is the license of those generated avatar?
Faker.js is pretty great. I wrote a simple package to generate fake data for MySQL tables. It's rather basic, but it's been useful to me. It probably wouldn't be hard to stick a DB abstraction layer in front to use with other backends.

https://github.com/michaelmior/mysql-faker

The age and avatar are not at all synced. Just a heads up if you're gonna be using this outside of testing.
I used this at one point when I needed a large synthetic "customer" dataset, and found the sample size to be somewhat limited. I had to munge first/last names with added random characters. But looking at it now, it appears that's improved. For example, there are about 3000x500 first/last name combinations, for a total of about 1.5M possible full names (for en_US). However, if you need, say, as many unique last names as possible, 500 might still be too few. Still, a nice project.
Faker.js now supports something like 30+ locales.

This should expand the amount of name combinations considerably.

It can help a lot when writing UI/Selenium tests with mocked/fake backend (as long as the application data model is well defined). i also wrote a similar library around es6 generators that defines application data structures as plain JS objects and generates data objects out of it using fake random data https://github.com/dmitriiabramov/sharkhorse
(comment deleted)
Good idea. Can anyone comment on this vs traditional QuickCheck like tools? We use property-based testing as our default. It seems like Faker is a less composable version.
(comment deleted)