Generating Sample Data for Testing
Throughout the process of developing a solution, testing each aspect of your file is vital. For me, the problem I always used to run into, was generating enough sample data to properly test my scripts, calculations and performance. Well, that was until I found Fake Name Generator.
What Fake Name Generator Does
Fake Name Generator lets you generate from 1 to 50,000 sample records…with just about every option you could possibly think of. Choose your Name Set, Country, Gender ratio (how many male vs female names in the set), even the age range. Select which fields you want to include in the records (currently, they have 18 different fields available). And you can choose between 11 different Output formats. The various formats include variations of .txt, .sql, .csv and .htm.
Why Sample Data is So Valuable
While this article is not intended to be the “be all and end all” on the subject, I often receive sample files from people asking for help with a performance problem…and those files have no data in them, or only a few records. Looking at the file, I can see that as soon as the person puts this file up on FileMaker server through their hosting provider and/or add a few thousand records, there is going to be a painful slow-down in performance.
Yes, testing with a few records is better than not testing at all. However, if you find aspects of your database solution that are causing bottlenecks, you can identify it immediately and fix it…before you get to far into the project. Changes near the end of a development cycle can potentially cause a ton of extra work having to rework or rewrite a large portion of the solution. All this, possibly, avoidable if you could have tested it’s functionality earlier in the development process.
After setting up your tables and fields, based on the structure you decided to go with after doing some brainstorming with paper and pencil, you add a portal to your main table. That portal is based on a related table that will eventually hold a large number of related records for each record in the main table. For this example, let’s say the main table is Employees and the related table is Expenses. You have your relationship setup to sort based on the Expenses transaction date.
Depending on the industry or type of business you are work in, that Expenses table may hold thousands of reimbursed expenses for each employee. Ok, you throw in 10 Employee records and, maybe…5 Expense records for each Employee to test the portal. Awesome, everything works perfectly…at least locally.
Fast forward a few months, development is just about complete, you convert the existing data from the old solution and import it into your newly developed solution file(s). You open the file to demo it to your boss, and almost every record you look at in the Employee table takes 10-15 seconds to load. You can already feel the temperature rising, as your boss begins to tap his/her feet and ask, “Why is it taking so long?”
Back to the drawing board!!! You dig through the fields and script looking for the possible hang up. And you notice that relationship for the portal on the main page is sorted and a number of scripts have the Refresh Window () step flushing the cache. The short of it, all of the expense records from that employee would need to be downloaded every time FileMaker has to evaluate the relationship. Download, sort, display…Download, sort, display. At the local level (especially with very few records), you probably wouldn’t even notice it. But with a decent amount of records, across a WAN…you may ‘notice’.
Here is the short of it. Get yourself a hefty amount of sample records to test with. You don’t need to put all of them in every solution you develop…but at least have them available to use. Go ahead and create yourself a sample data file in FileMaker. Then it becomes as simple as importing the records into your file and hammering away at your design to test for potential problems.
Even that alone, can save you development time and make the development process an overall better experience for yourself and your client or boss.