ParameterVariationGeneratorComponent¶
- class ParameterVariationGeneratorComponent¶
- Clone()¶
Call this method if you want to use API-objects in multiple contexts, e.g. if you want to insert a specific test step in multiple blocks.
- Returns:
A copy of this object
- Return type:
- GetAlgorithm()¶
Returns the id of the algorithm to use. Id mapping: 0 - cartesian product, 1 - classification tree method, 2 - n-wise method
- Returns:
id of the algorithm choice
- Return type:
int
- GetIndex()¶
Returns the zero based index in the parent.
- Returns:
Zero based index
- Return type:
int
- GetLineNo()¶
Returns the line number within its project.
- Returns:
Line number
- Return type:
int
- GetNWiseFactor()¶
Returns the n-wise factor used within the n-wise algorithm.
- Returns:
n wise factor
- Return type:
int
- GetName()¶
Returns the name of the project component.
- Returns:
Name of the component
- Return type:
str
- GetParameters()¶
Returns all stored parameters of the parameter variation generator. Parameters are returned as an OrderedDict with parameter name as key and the parameter value and parameter type in a list. The parameter value is returned as a str Examples: parameter ‘a’ with value int 5 –> {‘a’: [‘5’, ‘Numeric’]} parameter ‘b’ with string values ‘5’, ‘6’ –> {‘b’: [‘“5”, “6”’, ‘String’]}
- Returns:
OrderedDict mapping attributes names to values
- Return type:
dict[str, list[str]]
- GetParent()¶
Returns the parent project component.
- Returns:
Parent component
- Return type:
- GetRandomVariationMethod()¶
Returns the id of the random variation method to use. Id mapping: 0 - non-deterministic, 1 - deterministic
- Returns:
id of the random variation method to use
- Return type:
int
- GetRandomVariationSeed()¶
Returns the random number generator seed for the random variation.
- Returns:
random variation seed
- Return type:
str
- GetType()¶
- Returns the type (class name) of the project component, e.g.
“ConfigChange”
“ParameterSet”
“PackageCall”
“Project”
“PackageGenerator”
- Returns:
Type (class name) of the project component
- Return type:
str
- GetVariationLimit()¶
Returns the variation limit of the variation generator.
- Returns:
variation limit
- Return type:
int
- IsEnabled()¶
Returns the state of the test step.
- Returns:
True if test step is enabled, otherwise False
- Return type:
bool
- IsParameterSetNumbering()¶
Returns the setting of the parameter set numbering.
- Returns:
parameter set numbering
- Return type:
bool
- IsRandomVariation()¶
Returns the setting of the random variation.
- Returns:
random variation setting
- Return type:
bool
- IsReported()¶
Returns whether the test step will be reported. If it has a parent test step, this function will only return true if both this test step and the parent test step should be reported.
- Returns:
True if test step will be reported, otherwise False
- Return type:
bool
- RemoveFromProject()¶
Removes this component from the project.
- Raises:
ApiError – if the component is not part of any project
- SetAlgorithm(algorithm)¶
Sets the id of the algorithm to use. Id mapping: 0 - cartesian product, 1 - classification tree method, 2 - n-wise method
- Parameters:
- algorithm : int¶
algorithm id
-
SetEnabled(state=
True)¶ Enable or disable the test step.
- Parameters:
- state : bool¶
True (=Default) to enable, False to disable the test step.
- SetNWiseFactor(nWiseFactor)¶
Sets the n-wise factor used within the n-wise algorithm.
- Parameters:
- nWiseFactor : int¶
n wise factor
- SetParameterSetNumbering(parameterSetNumbering)¶
Sets the parameter set numbering.
- Parameters:
- parameterSetNumbering : bool¶
parameter set numbering
- SetParameters(parameters)¶
Overwrites the existing attributes of the generator with the provided ones. Parameters are returned as an OrderedDict with parameter name as key and the parameter value and parameter type in a list. The parameter value is returned as a str Examples: parameter ‘a’ with value int 5 –> {‘a’: [‘5’, ‘Numeric’]} parameter ‘b’ with string values ‘5’, ‘6’ –> {‘b’: [‘“5”, “6”’, ‘String’]}
- Parameters:
- parameters : dict[str, list[str]]¶
Dictionary mapping attribute names to tuple with value and value type
- SetRandomVariation(randomVariation)¶
Activates or deactivates the random variation of the parameter variation generator.
- Parameters:
- randomVariation : bool¶
random variation setting
- SetRandomVariationMethod(randomVariationMethod)¶
Sets the random variation method to use for random variation in the generator. Id mapping: 0 - non-deterministic, 1 - deterministic
- Parameters:
- randomVariationMethod : int¶
id of the random variation method to use
- SetRandomVariationSeed(randomSeed)¶
Sets the random number generator seed for the random variation.
- Parameters:
- randomSeed : str¶
seed for random number generator
-
SetReported(state=
True)¶ Enable or disable the reporting of the test step. If it has a parent test step, its reporting must also be enabled in order to have this test step appear in the report.
- Parameters:
- state : bool¶
True (=Default) to enable, False to disable the reporting of the test step.