Google Search

Google
 

Wednesday, July 9, 2008

Video: How Do I: Generate Test Data using Visual Studio Team System Database Edition?

Presented:Richard Hundhausen

Join Richard Hundhausen as he explains how to create and use a test generator to generate random (yet meaningful) test data, suitable for testing and development.

The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video


Minute 0

In him back as rich a thousand President sends you a Microsoft regional Director of Visual Studio team system MVP and assassin video is tackled a common problem in database development leading to test data at all of the dilemma you backup question in a 10 resort in your development environment or do you generate test data yourself the other one has very convenient tobacco production data walked over to your environment restore it and have a great data that makes sense as a business meeting but he run the risk of exposing sensitive information you also run the risk of exposing data bits can be no attorneys is your unit tests may fail one time in the past and asked for never having to generate your own test data in your own algorithms run scripts generate a bunch of test data Mr food Mrs Barr will spend you are a business person so I know it s not very meaningful end of the random enough to really test your tests are

Minute 1

Middlebrow to be achieved by using the data generator out of the database edition of team system 2000 and and user data generators to generate meaningful data testing and generate revenue and operating data from various data sources control many aspects of their generation you specify the statistical distribution of randomly generated data user at expressions and you can also supply percentage of Knowles and generated a single will launch a studio team system and_my servers for an added data connection to my little sample database directly with its own with the SUS server and database is HR a simple database as one table please with a couple of columns recognized names in cities and phones etc in the table is devoid of data actually a good

Minute 2

Buttercream beauty connections overhears the stick with you as you close them a studio to back up again also the various dialogs in the database edition will respect these infections and those in the drop down list so some up ahead of time for your interesting databases are using will save you time down the road and create a new database projects choose a SQL Server 2001 Wizard normal a lazy today so was critical database to recall the HR and this asks all the interesting questions know I don t have schemas melded at Safeco to have more than one table Solomon have organized a object type by as he settings your list of options or findings that the default I do want to import schema to bring in my one glorious table into the defaults your and my rebuilding or employing so only those loans will okay

Minute 3

Moments is that importing my schema hands over your click finish in the solution Explorer and see if I have a database projects pretty much empty except I do have my employees table her that I don t care about schemas of a computer factoring is what I did a generation plan to my database else is called something though I ve no original like to generate random employees saw this comes without employees were generated 50 of them and there you will cause a revenue I do like a blue number for your Mr dog can look like the Oregon as IEEE given this really interesting Unicode data so it might want to do at this point is over to the column details and spent a little time and will generate more meaningful random data super example under last the

Minute 4

And so does having the string generator which is the default one avenue we can use duty bound generators with about a moment regular expressions and these are kind of interesting because you can come over to the properties or window and you can specify your rate is freshly won a use is the default switches lower and upper zeros nines and repeat until you the maximum length of 20 I think better than that is a lesson with Smith 1000 thousand have storm and possibly yield on 1050 separate was is an active at the preview day you go more meaningful bitterness is somewhat random or if he run again and again little at the same distribution of data but the casual observer versus elves agreement in a fat a few more names my expression would help

Minute 5

The same thing here for first name was first things will go with the one who will tell you and Tony 10 days and waved and city would do the same thing we specify regular expression and let s go with something like what the Seattle for the CD organizers face of their receipt and possibly Boston are using the state and country phone is little more distinct phone Russian user writer expressions generating a US looking phone number I can do this without screwing it up something like a one 9 and were in repeat that have zero 922 to those and

Minute 6

and you can copy this and she little bit down the power tools for 2008 possession as the regular expression dialog recovered almost a wizard helps you write what I m coming painstakingly doing right here goes with the digital speed regular expressions little utility weapons can be very nice and then let s see zero 9 finishes up with a fork over for sword to a symptom of her sister was a is still a slogan in pretty good and is probably real phone numbers I would want to call them and ask if it ll wait 10 or was home but you get a unit test reports queries busier your designing and testing would be fun to have a beta with what you know and will go on talk about different generator you see I really like the regular expressions over e mail about this see

Minute 7

Will do fine comedies that to ask you about so Hotmail with com or wealthy stick with the Microsoft senior MSN where com to escape the Borges the day CE maybe you three Equifax and where dogs can you know what it could be a calm and in the best work of you or enclose the simplex on its beautiful it is some really good rebels in Darfur As people reply to you but hey why I have the same awesome real first names and last names not just patterns regular expressions is where you might want to actually go and borrow some live my data from a production database just shrugging our

Minute 8

Are not returning those columns which are sensitive just isn t a last name will suit it about generator and the connection information here much integrating new connection SQL Server is on the same server nervy STS positioning by the Schwartz database and off my select query your essay in the slightest aura from persons ought to contact in overcoming your 20th of generator given a select statement it ran it and knows that these are my possible outputs and this gets more realistic here to see this put in my person to contact table a Michigan poll over the last name here and data generator here I can do the same thing with my connection information

Minute 9

Workbench works much like query selects her own person to contact admin for that output table will choose the product ID list a person that was all she do is go and connect to and pull real time last names and first instrument connection was great getting to a combination of a truly fictitious data with the various built in generators or if you also were meaningful business meeting you can connect to a data source generator that fashion is the amount you can also build your own custom data generators so you might build one that says city to integers that goes out and generates prime numbers or dates that it s just holidays for example you will algorithm and she sharpens that looks out for a similar talk about here before I should generate the data or VC values

Minute 10

It was the 20 generators as as as as seed in here which is all the fault of five is received with a random numbers is her funny given the same seed movie with the same sequence of data back again to buy from your posts look at the quarrels of its city New York New York New York Boise New York will if I change cities see him just to choose Mr sure where that went only city will change the scene from five something like six back to preview it a whole different set of data Boston Boise Boston Boston Boston Boise okay radical change the thinking here is so long as you make your sees the same Always look the same as what I tell people what to do this for is to write a unit test runner seat of five and in the past is the data that comes back with your procedures

Minute 11

Your functions and then changes east to 61 26 and make sure that your unit tests don t pass it up with both of you were fatal developers will subdue the data changes underneath the ingenuity to radically change the data see what happened to arrive back in the changing seasons very cool for school head back to our can generator and are potentially save runners generated data in the province for the connection room push it towards HR database click okay it s fair to ask us to incorporate concepts first for certain heroes sure exactly where it had been in error would override it and we have successfully generated data for one table let s go ahead here in the peek at it shall table data and here s the 50 rows on the server with the same distribution of data we ve are you will have

Minute 12

In the preview that he continues data generators is just a deanship file and you can you can automate can run just prior to your unit test suite running so that it uploads of data base changes to Atari connection loads of test data runs the tests pass fail and you go back and results you can also automate data generators with the automated builds with team foundation build can connect gold and then load the test data and then run the tests automated build a united in their good stuff it does bridge the gap between backing up and restoring production data and writing your own meaningless strips generate tested when its return doesn t present except in wife s original director and your team s MVP that you

Click here to go to original video page

0 comments: