Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyFilters ¶
ApplyFilters applies a set of filters onto a token. Filters are applied in the order in which they are given. If multiple filters are replacing the same token, only the first replacement will be applied. Filters are not applied onto filter generated tokens.
func NewNegativeBoundaryValueAnalysis ¶
NewNegativeBoundaryValueAnalysis implements a fuzzing filter for negative boundary-value analysis. This filter searches the token graph for integer range tokens which will be transformed to exactly two integers: The lower and higher negative boundary. Using this filter reduces for example the integer range 1-100 to the integers 0 and 101. Which reduces the range away from the model definition and therefore to an invalid data generation, which can be used for example for negative tests.
func NewPositiveBoundaryValueAnalysis ¶
NewPositiveBoundaryValueAnalysis implements a fuzzing filter for positive boundary-value analysis. This filter searches the token graph for range tokens which will be transformed to a most 5 values: the lower and high boundaries as well as the middle values of the range. Using this filter reduces for example integer ranges of 1-100 to the integers 1, 50 and 100, which reduces permutations dramatically. A range of 1-2 will be reduces to the integers 1 and 2. A range of 1 will be reduced to the integer 1. Resulting integers of this filter therefore do not overlap. As a special case, integer ranges where the signs of the two boundaries are different are reduced to a maximum of 5 non-overlapping values. For instance, the integer range [-5, 10] is reduced to the integers -5, -1, 0, 1 and 10.