Faker is a Python package that generates fake data for you
1–10 of 37 posts
Re: Faker is a Python package that generates fake data for you
#2I use it with factory_boy (http://factoryboy.readthedocs.org/en/latest/) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc.
I think it helps with experimentation when you're using the REPL and also makes bugs stand out a bit more easily. Very neat for demoing purposes too.
Perhaps my favourite is faker.bs() which always gets a giggle when doing live demos.
Re: Faker is a Python package that generates fake data for you
#3I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time. I use it with factory_boy ( http://factoryboy.readthedocs.org/en/latest/ ) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc. I think it helps with experimentation when you're using the REPL and also makes bugs stand out a b…
Re: Faker is a Python package that generates fake data for you
#4I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time. I use it with factory_boy ( http://factoryboy.readthedocs.org/en/latest/ ) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc. I think it helps with experimentation when you're using the REPL and also makes bugs stand out a b…
It's a standard gem in the community and it's used for generating various types of seed database data. Don't know if does the exact same things that the Python faker does.
Re: Faker is a Python package that generates fake data for you
#5Re: Faker is a Python package that generates fake data for you
#6Another interesting library that is build on top of Faker is Alice. It allows you to define complex fixtures in .yml: https://github.com/nelmio/alice
Re: Faker is a Python package that generates fake data for you
#7I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time. I use it with factory_boy ( http://factoryboy.readthedocs.org/en/latest/ ) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc. I think it helps with experimentation when you're using the REPL and also makes bugs stand out a b…
It's probably fake-factory to prevent confusion with the Ruby gem that's been around for more than 6 years http://www.rubyinside.com/faker-quick-fake-data-generation-i... It's a standard gem in the community and it's used for generating various types of seed database data. Don't know if does the exact same things that the Python faker does.
Re: Faker is a Python package that generates fake data for you
#8I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time. I use it with factory_boy ( http://factoryboy.readthedocs.org/en/latest/ ) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc. I think it helps with experimentation when you're using the REPL and also makes bugs stand out a b…
Re: Faker is a Python package that generates fake data for you
#9The value of testing with real data is that it doesn't conform to your assumptions.
As far as I can tell, this benefit is impossible to fake with a system that generates fake data algorithmically. Generated data conforms to the assumptions of the system that generated it and therefore can only be used to test that a system conforms to those assumptions.
Fake data is still useful. Volume is often important (does your database slow down or crash when there are 10 billion records?). And if your fake data has very few assumptions, you can use that to reduce the assumptions made by the system you're testing.
Nevertheless, I'd really like to see a system like this which integrates data from some sort of general-purpose real dataset. Ideally it would be configurable so that people can document and choose a 99% use case they want to support (for example, a US company might want to support long names, but might not get a ton of value from supporting names with Chinese characters).
[1] http://jalopnik.com/this-hawaiian-womans-name-is-too-long-fo...
[2] http://www.snopes.com/autos/law/noplate.asp
[3] http://www.joelonsoftware.com/articles/Unicode.html
Re: Faker is a Python package that generates fake data for you
#10I made a tool like this for my company in Ruby (it wasn't nearly as mature as this). The largest challenge I struggled with (and never really solved) is that ultimately, there's no way to generate data as useful as real data. The value of real data comes from the fact that it's messy. Real data is different sizes than you expect[1], collides with your sentinel values[2], and comes in with unexpected encodings[3]. And…
[1] The common use of fuzzers in a security context is to send malformed packets to protocol parsers to see if they fall over or cause buffer overruns, or otherwise do fun things in the context of exploiting a system. Another common one being automatic sql-injection discovery tools.