@@ -59,6 +59,71 @@ To demonstrate static variable binding, this does binding for both first and las
59
59
Currently, templating is only supported for the request body and URL.
60
60
There are technical challenges adding it everywhere, but plans to add it where needed to other options.
61
61
62
+ # Generators Listing
63
+ List of all generators and their configuration elements (required, optional, and meaning).
64
+
65
+ | Description | Name (in YAML): | Output Type | Parameters |
66
+ | ----------------------------------------------------------------| -----------------| -------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
67
+ | Environment Variable | env_variable | any | required: 'variable_name', type: string (environment variable to use, no $ or % prefix) |
68
+ | Environment String, with variable subsitution | env_string | string | required: 'string', type: string with env variables to substitute |
69
+ | Integer sequence | number_sequence | integer | optional: 'start', type: integer, default: 1 optional: 'increment', type: integer, default 1 |
70
+ | Integer - Random (32 bit) | random_int | integer | |
71
+ | Text - Random | random_test | string | optional: 'character set' OR 'characters', type: string, default: string.ascii_letters optional: 'min_length', type: integer, default: 8 optional: 'max_length', type: integer, default: 8 optional: 'length', (can either have length or min/min), type integer |
72
+ | Choice of random values from input list | choice | any | required: 'values', type: array of anything |
73
+ | Sequence of values from input list of values, looping in order | fixed_sequence | any | required: 'values, type: array of anything | |
74
+
75
+ ## Additional Details For Generators
76
+ ### env_variable: explanation
77
+ The variable name is used to lookup the environment variable.
78
+ For example, if you used $HOST in a shellscript, the 'variable_name' value for the generator would be 'HOST'
79
+
80
+ ### env_string: explanation
81
+ This is a string substitution with potentially multiple environment variables used.
82
+ BASH: ` echo "$USER logged into $HOSTNAME" `
83
+ becomes generator:
84
+ ``` yaml
85
+ {type: 'env_string', 'string': "$USER logged into $HOSTNAME"}
86
+ ```
87
+
88
+ ### random_text: explanation
89
+ This generates strings of random characters.
90
+ All it needs is the:
91
+ - legal length ranges:
92
+ + a 'length' sets it to a constant, fixed length
93
+ + a 'min_length' and 'max_length' allow it to be randomly size, in that range
94
+
95
+ - valid characters to use, defined one of two ways:
96
+ + a 'characters': you supply a list of valid characters to use, as a string
97
+ + a 'character_set': a named character set of values, see below for table
98
+
99
+ ### Character Sets Reference
100
+ Python internal character sets come from the [ String constants] ( https://docs.python.org/2/library/string.html#string-constants ) in the string module.
101
+
102
+ ** Reference:**
103
+
104
+ | Description | Text Name | Source |
105
+ | -------------------------------------------------------------------| --------------------| -----------------------------------------------|
106
+ | ASCII Letters, upper and lowercase, no whitespace | ascii_letters | Python internal |
107
+ | ASCII Letters, lowercase, no whitespace | ascii_lowercase | Python internal |
108
+ | ASCII Letters, uppercase only, no whitespace | ascii_uppercase | Python internal |
109
+ | Digits, 0-9 | digits | Python internal |
110
+ | Hexadecimal digits, mixed upper and lowercase | hexdigits | Python internal |
111
+ | Hexadecimal digits, all lowercase | hex_lower | string.digits+abcdef, |
112
+ | Hexadecimal digits, all uppercase | hex_upper | string.digits+ABCDEF, |
113
+ | Letters | letters | Python internal, locale-dependent |
114
+ | Lowercase letters | lowercase | Python internal, locale-dependent |
115
+ | Octal digits (0-7) | octdigits | Python internal |
116
+ | Punctuation characters, pipe plus !"#$%&'()* +,-./:;<=>?@[ \] ^_ `{}~ | punctuation | Python internal |
117
+ | All printable characters, includes whitespace | printable | Python internal, locale-dependent |
118
+ | Uppercase letters | uppercase | Python internal, locale-dependent |
119
+ | Whitespace characters | whitespace | Python internal, locale-dependent |
120
+ | URL Slug characters (lowercase ASCII and dashes) | url.slug | string.ascii_lowercase + string.digits + '-' |
121
+ | URL Safe (unreserved characters from RFC3986) | url.safe | string.ascii_letters + string.digits + '-~ _ .' |
122
+ | Alphanumeric | alphanumeric | string.ascii_letters + string.digits |
123
+ | Alphanumeric, lowercase only | alphanumeric_lower | string.ascii_lowercase + string.digits |
124
+ | Alphanumeric, uppercase only | alphanumeric_upper | string.ascii_uppercase + string.digits |
125
+
126
+
62
127
# Extractors Basics
63
128
Extractors are query-based ways to extract some part of an HTTP response body for use.
64
129
@@ -229,16 +294,4 @@ Optionally, validators can return a ValidationFailure which evaluates to False,
229
294
* Benchmarks track a static failure count, to account for network issues
230
295
* Benchmarks will try to optimize out as much templating as they can safely.
231
296
232
- # Generators Listing
233
- List of all generators and their configuration elements (required, optional, and meaning).
234
-
235
- ## env_variable
236
- Read an environment variable
237
-
238
- ### Configuration elements:
239
- - variable_name: environment variable name, without prefix
240
-
241
- ### Example:
242
- Example here
243
-
244
297
0 commit comments