Generating dummy data for my web application - looking for dictionaries [closed]

强颜欢笑 提交于 2019-12-10 19:09:29

问题


Sorry if this is off topic - but it is certainly programming related.

I need to test my web application at scale (concurrent users and amount of data in system). For the latter, I need some way of generating dummy data for a variety of types (name, address, email and some other data types)

Are there any open source (free), or commercial providers of dummy data dictionaries (in any format but preferably mySQL) (I don't really need a whole application - just the data).

How have others solved this problem?

edit: Sorry if I wasn't clear. I don't need a way to code this - I just need the dummy data(base) files to provide the raw information. I don't want nonsense data (like randomly generated characters) because this won't allow us to perform usability tests or demonstrations. If this isn't available in open source - does anyone know why not?

edit 2: I've seen generatedata.comm, but the database that backs the application is too small. I need to test around 100,000 users (and I have needs for data types that are not supported by that application. Even just a dictionary (english), in database form would be useful.


回答1:


This website offers you a lot of free data for tests purpose : www.fakenamegenerator.com




回答2:


Could you just write a simple script to programmatically randomly generate the required data? I would use python, but you could do it in practically anything.

Something along the lines of this pseudo code should do the trick:

for i in range(0, 100000):
    name = randomName()
    email = randomEmail()
    insertIntoSomeTable(name, email)

Where randomName generates a random name, randomEmail generates a random email and insertIntoSomeTable takes the randomly generated data and inserts it into one of your tables. These functions should be trivial to implement.

Repeat for all of the tables you need random data for.



来源:https://stackoverflow.com/questions/7187931/generating-dummy-data-for-my-web-application-looking-for-dictionaries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!