Class Ben

  • All Implemented Interfaces:
    FaultCharacterizationAlgorithm

    public class Ben
    extends SuspiciousCombinationAlgorithm
    The implementation of the BEN fault characterization algorithm based on the paper "Identifying Failure-Inducing Combinations in a Combinatorial Test Set". Generates multiple sets of new test inputs if necessary. This means it is not known at which iteration an empty list is returned to signal the algorithm is stopping. Failure-Inducing combinations are ranked by an internal measure of probability. This means that combinations at the beginning of the returned list are more likely to be failure-inducing. The list of failure-inducing combinations is build out of lists for each combination size. That means first all 1-value-combinations are returned in probability order, then all two-value-combinations, ..., then all t-value combinations where t is the testing strength.

    Internally, the algorithm works with two important structures: t-value-combinations and so called components (1-value-combinations). In each iteration all components are ranked according to appearance in failed or successful test inputs as well as suspicious combinations. Next, all suspicious t-value combinations (those combinations appearing in only failed test inputs) are ranked according to the suspiciousness of their contained components, and other components in their test inputs. Consider the following example: There is a failed test input (1, 2, 3) when testing with strength 2. (1, 2, -) appears in no successful test input so its a suspicious combinations. 1 appears in many failed test inputs and suspicious combinations in the whole test suite and it is therefore likely that some failure-inducing combinations contains 1. With 2, the same story is the input. 3 does not appear in any failed test input at all. This means (1, 2, -) is very likely the combination causing the failure of (1, 2, 3). Of course, a combination with fewer than t values can also be failure inducing. Therefore, BEN recudes all t-value- combinations at the end. This is done by looking if all possible containing combinations are suspicious. For example, if each parameter has 2 values and (0, 1) and (0, 2) are suspicious, (0, -) is therefore also suspicious since there is no non-suspicious combination containing (0, -).

    Important Information: -Will not find any failure-inducing combination involving more than t parameters. If you expect such failure-inducing combinations, your t is already chose wrong -Can generate many additional test inputs if needed. The number of generated test inputs per iteration is configurable -Orders failure-inducing combinations by probability -Considers constraints as an addition to the original algorithm -Not very efficient if failure-inducing combination is smaller than t values

    • Constructor Detail

      • Ben

        public Ben​(FaultCharacterizationConfiguration configuration)
        Builds a new instance of the algorithm for a given configuration. 10 test inputs will be generated per step, and no further test inputs are generated in the next iteration if no test input can be found for a failure inducing combinations after 50 attempts.
        Parameters:
        configuration - for knowing which combinations can be failure-inducing/which test inputs can be generated. Must not be null
        Throws:
        java.lang.NullPointerException - if configuration is null
      • Ben

        public Ben​(FaultCharacterizationConfiguration configuration,
                   int numberOfCombinationsPerStep,
                   int maxGenerationAttempts)
        Builds a new instance of the algorithm for the given configuration.
        Parameters:
        configuration - for knowing which combinations can be failure-inducing/which test inputs can be generated. Must not be null
        numberOfCombinationsPerStep - how many test inputs should be generated per step. Must be positive
        maxGenerationAttempts - after how many attempts the algorithm should give up on generating a previously untested test inputs containing a given failure-inducing combination. Must be positive
        Throws:
        java.lang.NullPointerException - if configuration is null
        java.lang.IllegalArgumentException - if one of the integers is not positive