-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Is your feature request related to a problem? Please describe.
Scripting usually requires to generate some sort of random value to prevent conflicting with other scripts or command runs.
It would be useful to be able to set a property from a random value.
Describe the solution you'd like
A random attribute should be added to the <property> element.
<property name="my_random_numeric_id" random="#####" />
<property name="my_random_name" random="Aaaaaaaa" />
<property name="my_random_string" random="zZ" />
<property name="my_random_guid" random="guid" />where
#generates a random numeric digit.agenerates a random alphabetic lowercase letter.Agenerates a random alphabetic uppercase letter.zorZgenerates a random alphanumeric character (digits, uppercase and lowercase letters).GUIDgenerates a random GUID.
Additional properties for numeric values should also be considered.
For example attributes such randommin and randommax would allow ranged value generation:
<property name="my_dice_roll" random="#" randommin="1" randommax="6" />
<property name="my_coin_flip" random="#" randommin="0" randommax="1" />
<property name="my_random_card" random="#" randommin="1" randommax="52" />Describe alternatives you've considered
You could generate random numbers with the following steps:
- Execute an external script with
<exec>. - Wait for the execution to complete.
- Dump the output to a file.
- Read the file as a property.
However, that would be unnecessary complicated and ugly.
Additional context
N/A
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request