Using real domains (like yahoo.com) for "fake" e-mail address is not a good practice. There are domains like example.com, example.net or example.org for such purposes (RFC 2606, RFC 6761).
That depends on what you’re trying to do. If you want it to be an obvious example, @example.com is great. If you want it to look like real data, such as in a demo or a screenshot, it’s not so great.
It’s a bit like saying that every demo user should be called John Doe or Jane Doe if they aren’t actual people.
A friend and I had started a project similar to this some 6-7 years ago. We wanted to make all the generated data consistent so if, for example, you need data about German person it would return real city name, real (or at least plausible) street name, postal number, phone numbers both mobile and fixed with the proper country and operators code, email address using national domain, personal name was chosen out of plausible names for each country etc. etc. In the end it was so much work that we abandoned it :(
Yeah.. name, username, and 2 email addresses being different to one another is also irritating.. probably it's taxing for the brain if say testing with the user "brian.duncan" shows an exception in the UI, and then when scrolling through the logs one has to remember his email is "donna.tella@versace.it"...
This is nice, but trivial to accomplish with the “faker” library available for most major programming languages - almost all reasonable web test frameworks will allow you to just make this json locally with the generated values, often with almost the exact same/extremely similar template syntax shown here.
Is there a similar tool to generate API responses once you have an OpenAPI spec? Sort of a mock server, that can give out responses as per spec and occasionally induce errors. This will be helpful in decoupling frontend and backend during initial development.
I've been using ChatGPT for this and it produces really good results, though of course the back-and-forth is a bit clunky. Would be great to build it into a more streamlined experience.
Is there an API for this? Much more useful to have a script that generates 10k mock objects and inserts into a database than generating in this web UI and copy/pasting :~)
smalu|2 years ago
tobr|2 years ago
It’s a bit like saying that every demo user should be called John Doe or Jane Doe if they aren’t actual people.
tangoalpha|2 years ago
Could be a useful tool if this location data is coherent. State, City, Zip, Country and Lat/Lon are each of different places.
ivanche|2 years ago
netsharc|2 years ago
giobox|2 years ago
monkpit|2 years ago
https://github.com/json-schema-faker/json-schema-faker
osullip|2 years ago
https://json-generator.com/ https://www.objgen.com/json/local/design https://www.atatus.com/tools/json-generator https://www.site24x7.com/tools/json-generator.html
Not discounting the effort it takes to build a tool like this. It has, however, been done to death.
harry_1989|2 years ago
m13z|2 years ago
terpimost|2 years ago
Nickba|2 years ago
danielvaughn|2 years ago
awesomehry|2 years ago
It's very consistent at generating templated data.
btwillard|2 years ago
unknown|2 years ago
[deleted]
LauraMedia|2 years ago
* IP's (V4, V6) * Enums (maybe something like enum('active', 'inactive', 'removed').) * Texts (like blog titles or description fields)
Nickba|2 years ago
darnfish|2 years ago
Nickba|2 years ago
HappyMedium326|2 years ago