STDLIB Testing Parametrization Function Reference
Index
@parametrize.apply
Applies multiple parametrizer functions to a test function.
STDLIB_TESTING_PARAMETRIZE_SETTING_DEBUG_BOOLEAN boolean keyword: Whether to show debug information (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIELD_SEPARATOR string keyword: The field separator for scenarios (default=”;”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIXTURE_COMMAND_PREFIX string keyword: The prefix for fixture commands (default=”@fixture “).
STDLIB_TESTING_PARAMETRIZE_SETTING_PREFIX string keyword: The prefix for parametrizer functions (default=”@parametrize_with_”).
STDLIB_TESTING_PARAMETRIZE_SETTING_SHOW_ORIGINAL_TEST_NAMES_BOOLEAN boolean keyword: Whether to show original test names (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_VARIANT_TAG string keyword: The tag in the test function name to replace (default=”@vary”).
Arguments
$1 (string): The name of the test function to parametrize.
… (array): A series of parametrizer functions to apply.
Exit codes
0: If the parametrizer functions were applied successfully.
123: If a variable reserved for use by the BASH stdlib has been assigned an invalid value.
125: If an invalid keyword has been provided.
126: If an invalid argument has been provided.
127: If the wrong number of arguments were provided.
Output on stderr
The error message if the operation fails.
@parametrize.compose
Composes multiple parametrizer functions to create a product of scenarios.
STDLIB_TESTING_PARAMETRIZE_SETTING_DEBUG_BOOLEAN boolean keyword: Whether to show debug information (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIELD_SEPARATOR string keyword: The field separator for scenarios (default=”;”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIXTURE_COMMAND_PREFIX string keyword: The prefix for fixture commands (default=”@fixture “).
STDLIB_TESTING_PARAMETRIZE_SETTING_PREFIX string keyword: The prefix for parametrizer functions (default=”@parametrize_with_”).
STDLIB_TESTING_PARAMETRIZE_SETTING_SHOW_ORIGINAL_TEST_NAMES_BOOLEAN boolean keyword: Whether to show original test names (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_VARIANT_TAG string keyword: The tag in the test function name to replace (default=”@vary”).
Arguments
$1 (string): The name of the test function to parametrize.
… (array): A series of parametrizer functions to compose.
Exit codes
0: If the parametrizer functions were composed successfully.
123: If a variable reserved for use by the BASH stdlib has been assigned an invalid value.
125: If an invalid keyword has been provided.
126: If an invalid argument has been provided.
127: If the wrong number of arguments were provided.
Output on stderr
The error message if the operation fails.
@parametrize
Parametrizes a test function with multiple scenarios.
STDLIB_TESTING_THEME_PARAMETRIZE_HIGHLIGHT string global: A theme colour used to highlight informational messages (default=”LIGHT_BLUE”).
STDLIB_TESTING_PARAMETRIZE_SETTING_DEBUG_BOOLEAN boolean keyword: Whether to show debug information (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIELD_SEPARATOR string keyword: The field separator for scenarios (default=”;”).
STDLIB_TESTING_PARAMETRIZE_SETTING_FIXTURE_COMMAND_PREFIX string keyword: The prefix for fixture commands (default=”@fixture “).
STDLIB_TESTING_PARAMETRIZE_SETTING_SHOW_ORIGINAL_TEST_NAMES_BOOLEAN boolean keyword: Whether to show original test names (default=”0”).
STDLIB_TESTING_PARAMETRIZE_SETTING_VARIANT_TAG string keyword: The tag in the test function name to replace (default=”@vary”).
Arguments
$1 (string): The name of the test function to parametrize.
… (array): Optional fixture commands (prefixed with ‘@fixture ‘), followed by a semicolon-separated list of variable names, and then one or more semicolon-separated scenarios (scenario name followed by values).
Exit codes
0: If the test function was parametrized successfully.
123: If a variable reserved for use by the BASH stdlib has been assigned an invalid value.
125: If an invalid keyword has been provided.
126: If an invalid argument has been provided.
127: If the wrong number of arguments were provided.
Output on stdout
The informational messages.
Output on stderr
The error message if the operation fails.