Which is the best open source tool to populate my database with test data for my load test?
-
I am working on an application that is not into production yet. I am so curious to run some load test against my application but i dont have enough data. Which tool should I use to populate data into my DB, that takes care of the relationship existing between tables?
-
Answer:
I've seen tools that do this, but to be honest it's very simple to write your own script for this (especially if you're using an ORM). The other benefit to writing your own script for this is that you'll have a much better chance of accurately representing your expected data, sizes etc. A couple of techniques that are pretty useful: Build up lists of common first names and last names, then generate user names by picking a random first name and a random last name. Build a utility function that generates 6 letter random strings, then generate email addresses as random-6-letter-string@random-domain. For relationships, one technique is to populate one table, then pull all of the primary keys out in to a list and pick them at random from that list when creating other records. You might want to bias that selection towards some records to get more of a realistic bell-curve rather than a purely random selection. There are libraries that can help with this (e.g. built-in routines for generating fake email addresses etc). If you're using Ruby, http://faker.rubyforge.org/ is worth a look (a port of Data::Faker from Perl). There's a Python port here: https://github.com/threadsafelabs/python-faker
Simon Willison at Quora Visit the source
Other answers
If you know about Apache JMeter, it has functionality for communicating with database. You can write a test-plan for it, and place in BeforeSteps instructions for filling database with test data. Read an article about configurating JMeter for this purpose, http://community.blazemeter.com/knowledgebase/articles/65143-using-jdbc-sampler-in-jmeter-2-6
Dzmitry Kashlach
Related Q & A:
- Is there any open-source antivirus for Android?Best solution by avira.com
- Are there any open-source check-in / check-out systems?Best solution by stackoverflow.com
- Are there any open source projects for building websites like elance?Best solution by Stack Overflow
- How to Implement Gateway Service something similar to Oracle API gateway Using Java and Java based Open Source frameworks only?Best solution by Quora
- Which is the best data entry jobs in Bangalore?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.