Skip to content

Commit 8e72e4c

Browse files
merged master to V3
1 parent 0b8ec8f commit 8e72e4c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The pattern is as follows:
2727
### Groups
2828
- `(\d){5}` - Five digits between 0 and 9.
2929
- `\L(\d){3}\L` - A upper-case letter, five digits between 0 and 9 and another upper-case letter.
30-
- `(.[100-101]){3}` - Three items, each will include a dot '.' and either 100 or 101 e.g. *'.100.100.100'*
30+
- `(.[100-101]){3}` - Three items, each will include a dot '.' and either 100 or 101 e.g. *'.100.101.101'*
3131

3232
### Ranges
3333
- `[a-z]` - A single lower-case letter between a and z.
@@ -46,7 +46,7 @@ The pattern is as follows:
4646

4747
### Named Parameters
4848
A named pattern is surrounded with @ characters and links to a predefined pattern loaded from a file. The `default.tdg-patterns` file located in the same directory as the tdg executable file contains a list of named patterns which can be used in other patterns you write. For example to generate you could write something like `([1-9]\d\d-\d\d-\d\d\d\d)` or you can use the named parameter in the file `(@ssn@)` to a similar value. You can add more patterns to the file as you wish. Named patterns can also include other named patterns if you so wish. Take a look at the `@us_address_type1@` pattern in the file as an example of a compound pattern than uses other patterns to produce an output.
49-
'3516 Delaware Terrace, Hunterdon County, Florida, yrwcB'
49+
'8327 Maple Lane, Prince William County, Delaware, D@,^]'
5050

5151
### CommandLine tool
5252
You can use the `tdg.exe` application to generate test data from the command line. It can handle provided templates directly from the command line or from a file. The tool also supports exporting the generated output to either the command line or another file.
@@ -63,23 +63,23 @@ You can use the `tdg.exe` application to generate test data from the command lin
6363
### Examples
6464
- Single repeating symbols using the following syntax
6565
- `tdg -t 'Letters \<<\L{20}>> and Numbers \<<\d{12}>>'`
66-
- Produces items like *'Letters MCKVNPVFNLYOYQLEISKI and Numbers 364796587178'*.
66+
- Produces items like *'Letters HZEVGDYOVQHYWLEGNWIO and Numbers 588647416623'*.
6767
- Repeating patterns containing multiple letters or numbers of random length.
68-
- `tdg -t '\<<(\L){5}>>'` - Will generate 5 random upper-case characters. e.g. *'BAYFW'*
69-
- `tdg -t '\<<(\L\L\d){24}>>'` - Will generate 24 repeating letter-letter-number values e.g. *'DY6CJ9OX0IU7ZY4WS9VQ6YX0AM3QB4XS1HF7UG0RX8WH7CS1HA3CD5FF0OC8PY8OK0NR7SB4'*
68+
- `tdg -t '\<<(\L){5}>>'` - Will generate 5 random upper-case characters. e.g. *'HVFKK'*
69+
- `tdg -t '\<<(\L\L\d){24}>>'` - Will generate 24 repeating letter-letter-number values e.g. *'DS6SS4LM8TK3XV0HF3KB5JO6UZ1LY6BG7WJ1QW8ML1QZ0VS8DB0MV3WU1AY7GZ5ES1OB4XQ3'*
7070
- Variable length data can be generated also
71-
- `tdg -t '\<<(\L){10,20}>>'` - Will generate a string containing between 10 and 20 characters of random value e.g. *'ETVBQJXUEIBDUPPCZSG'*
72-
- `tdg -t 'Letters \<<\L{2,20}>> and Numbers \<<\d{2,12}>>'` produces items like *'Letters EBZZ and Numbers 86504'*
71+
- `tdg -t '\<<(\L){10,20}>>'` - Will generate a string containing between 10 and 20 characters of random value e.g. *'YPKSPRYGJIWOOLL'*
72+
- `tdg -t 'Letters \<<\L{2,20}>> and Numbers \<<\d{2,12}>>'` produces items like *'Letters PZQYBFMPMHWHRIFLUZWS and Numbers 0639596'*
7373
- Input can contain several placeholders.
7474
- `tdg -t 'Hi there \<<\L\v{0,2}\l{0,2}\v \L\v{0,2}\l{0,2}\v{0,2}\l{0,2}\l>> how are you doing? Your SSN is \<<[1-9]\d\d-\d\d-\d\d\d\d>>.' -c 100`
75-
- Produces 100 items like *'Hi there Puevja Kpu how are you doing? Your SSN is 649-57-0837.'*
75+
- Produces 100 items like *'Hi there Racbu Yeidvv how are you doing? Your SSN is 600-47-5575.'*
7676
- Generate 100 SSN like values and output to console window.
7777
- `tdg -t '\<<[1-9]\d\d-\d\d-\d\d\d\d>>' -c 100`
78-
- Produces 100 items like *'i78-77-7377'*.
78+
- Produces 100 items like *'R33-95-3798'*.
7979
- Generate 100 strings with random name like values and output to file.
8080
- `tdg -t 'Hi there \<<\L\v\l\v \L\v\l\l\v\v\l\l\v>> how are you doing?' -c 100 -o C:\test1.txt`
81-
- Produces 100 items like *'Tahi Qosweazco'*.
82-
- `tdg -t '\<<Letters \w{2,20} and Numbers \d{2,12}\n>>'` produces the following output: *'Letters jTmjHwIEh and Numbers 5805354
81+
- Produces 100 items like *'Daeo Lelkiapqu'*.
82+
- `tdg -t '\<<Letters \w{2,20} and Numbers \d{2,12}\n>>'` produces the following output: *'Letters BrVUEnR and Numbers 13535649
8383
'*
8484

8585
## More Information
@@ -94,23 +94,23 @@ If you are familiar with Regular Expressions then most of the syntax used will b
9494
`\<<\L\v\l\v>>` is a placeholder containing the pattern of symbols `\L\v\l\v`.
9595

9696
### Symbol Repetition
97-
Individual symbols can be repeated by a supplying a repeat section immediately after the symbol. For example `\L{5}` will produce 5 upper case letters. You can also add some randomness to the mix by supplying a range: `\L{min,max}`. The pattern `\L{1,100}` will produce between 1 and 100 upper case letters. Here's one *'IRVSDAVDWXRUJQLKRWONRICEYUBTSFNTODTZNMTFIMOTXJDXKQWMAZEAORUJYBLRKXFGWMWFDJFFUIGOQEJBI'*
97+
Individual symbols can be repeated by a supplying a repeat section immediately after the symbol. For example `\L{5}` will produce 5 upper case letters. You can also add some randomness to the mix by supplying a range: `\L{min,max}`. The pattern `\L{1,100}` will produce between 1 and 100 upper case letters. Here's one *'IXJERMZPVAKAJDXQBUQQLFQANYVCBRTYPUGTMCVW'*
9898

9999
### Symbol Grouping
100-
Individual symbols can be grouped together using parenthesis characters. When grouped together they can be repeated using the same repeat syntax. `(\l\d){5}` will produce something like *'a7p9t4w6k2'*.
100+
Individual symbols can be grouped together using parenthesis characters. When grouped together they can be repeated using the same repeat syntax. `(\l\d){5}` will produce something like *'y3u2l5v2q7'*.
101101
You can also include the random range syntax from above.
102102

103103
### Alternating Symbols and Groups
104104
Patterns can contain several individual symbols or groups of symbols and randomly alternate between them when generating the output value. `\<<\C|\c{10}|\V\V\V|(\v\v){2,3}>>` will produce either a single upper-case consonant, 10 lower-case consonants, 3 upper-case vowels or between 10 and 15 lower-case vowels. Which one gets outputed is randomly selected when processing the pattern.
105105

106106
### Other patterns:
107-
- `'\<<This is a \L\L string>>'` will produce something similar to *'This is a GB string'*.
108-
- `'\<<This is a \d{19} string>>'` will produce something similar to *'This is a 8301909763679223277 string'*.
107+
- `'\<<This is a \L\L string>>'` will produce something similar to *'This is a NX string'*.
108+
- `'\<<This is a \d{19} string>>'` will produce something similar to *'This is a 8291236768512445911 string'*.
109109
- Individual symbols can be repeated a specific number of times using the syntax `\L{10}` which will generate 10 upper case letters.
110110
- Individual symbols can be repeated a random number of times using the syntax `\L{10,20}` which will generate between 10 and 20 upper case letters.
111111
- 1 or more Symbols can be combined into patterns by wrapping them in parenthesis e.g. `(\*\L\d)`.
112-
- Patterns can be repeated a specific number of times using the syntax `(\L\d){10}` which will generate 10 repeated letter-number pairs e.g. *'S3J3E6H1B9N7C9D9Z2K7'*.
113-
- Patterns can be repeated a random number of times using the syntax `(\L\d){10,20}` which will generate between 10 and 20 repeated letter-number pairs e.g. *'L2R6B8Z4F4L6M5R5Z8O6W8'*.
112+
- Patterns can be repeated a specific number of times using the syntax `(\L\d){10}` which will generate 10 repeated letter-number pairs e.g. *'Y9T6C4K5Z1P4H1V1I8D4'*.
113+
- Patterns can be repeated a random number of times using the syntax `(\L\d){10,20}` which will generate between 10 and 20 repeated letter-number pairs e.g. *'M0F0T6Z0D2I4O5Z0P8R8V6'*.
114114

115115
### Profiling results
116116
*These timings are taken from unit tests making direct API calls, the command line tool will have higher times as it has additional IO work to output the values to screen or file. Should still be fast.*

0 commit comments

Comments
 (0)