Class: SixthSense::Analyzers::RedundancyMutation

Inherits:
SixthSense::Analyzer show all
Includes:
RedundancyRequirement
Defined in:
lib/sixth_sense/analyzers/redundancy_mutation.rb

Instance Method Summary collapse

Methods inherited from SixthSense::Analyzer

analyzer_id, axis, inherited, level, reference, references

Instance Method Details

#analyze(test_file, context) ⇒ Object

Paper basis: Koochakzadeh/Garousi 2010 (doi:10.1155/2010/932686) uses mutation kill sets for redundancy; Yoo/Harman 2012 (doi:10.1002/stvr.430) surveys minimization/selection tradeoffs.



28
29
30
31
32
33
34
35
36
# File 'lib/sixth_sense/analyzers/redundancy_mutation.rb', line 28

def analyze(test_file, context)
  matrix = context.kill_matrix_for(test_file)
  return unmeasured(confidence: :low) unless matrix&.matrix?

  requirements = test_file.test_cases.to_h do |test_case|
    [test_case.id, matrix.kill_requirements_for(test_case.id)]
  end
  analyze_requirements(test_file, requirements, confidence: :high)
end