Var Textby Group Public on Saturday January 02 2010 @ 21:14:41 (1/1 Points) |
|
| API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
%Var:Text% is a data generator→ which can produce random text, such as sentences and paragraphs. It is a available as a context item so it can be used in any strings or file expansion.
Notice %Var:Text:3sentences%
Syntax
One of "words", "sentences", or "paragraphs" can be generated. They are specified by name. The number of these items you wish to create is specfied as a number before the name.
%Var:Text:5paragraphs% %Var:Text:2sentences% %Var:Text:17words%
Ranges
Rather than a fixed count you can instead specify a range. In this form a random value between the two values (inclusive) will be generated.
# Generate 10 to 15 words Notice %Var:Text:10-15words%
Configuration
The data for the generation is initialized from an external file. When first called the TextGen.Base value will be used to initialize the sample data. This is parsed into paragraphs (split with \n\n). Sentences are extracted as period terminate sections, and words work on several common delimiters.
The standard text is a sample of from the lorem ipsem website↗. It is good for sample text in many western languages. To use a different source simply specify an alternate file as a context item→ your parameters to TestPlan.
TextFile.TextGen.Base=myfile.txt
TestPlan Var Text
