Using VB scripts is one of the easiest ways of creating test data in Windows environment. I usually use this technique to create file based test data. This is quite an efficient and effective method of creating test data with XML, EDI, Flat etc like file types.
Here what you all have to do is create a VB script and name it as ‘filename.vbs’, place it somewhere in your Windows machine and double click the file to execute it.
I’ll try to elaborate 2 simple methods of creating test data;
Method 01
Create a large test data file by duplicating a part of content within the same file (with certain changes in relevant areas to gain the uniqueness of test data)
Sample test file
Requirment
Create multiple packages while keeping the uniqueness of the data (Assumption: within the <Order>, ‘n’ number of <Package> can be available)
Solution
Output
Method 02
Create large number of test data files by duplicating a particular sample file (produced files should contain unique data)
Sample test file
Create multiple files with unique packages (‘n’ number of files with 1 unique package included in each file)
In this case we use sample test data file as a template and produce required test data files based on it. You can change ‘numOfFiles’ variable to produce the desired number of files.
Output












useful thing!