class Crowbar::Campaign::Target

Overview

Represents a targeted test endpoint with corpus seeds, mutation rules, expected non-fatal exception types, and execution boundary.

Defined in:

crowbar/campaign/target.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, category : TargetCategory = TargetCategory::Custom, samples : Array(Buffer) = [] of Buffer, rules : Array(Rule) = [] of Rule, expected_errors : Array(Exception.class) = [] of Exception.class, timeout : Time::Span = 500.milliseconds, execution : Proc(Buffer, Nil) | Nil = nil) #

Instance Method Detail

def add_expected_error(err_class : Exception.class) : Nil #

def add_rule(rule : Rule) : Nil #

def add_sample(sample : Buffer | Bytes | String) : Nil #

def category : TargetCategory #

def category=(category : TargetCategory) #

def execution : Proc(Buffer, Nil) | Nil #

def execution=(execution : Proc(Buffer, Nil) | Nil) #

def expected_error?(ex : Exception) : Bool #

def expected_errors : Array(Exception.class) #

def expected_errors=(expected_errors : Array(Exception.class)) #

def mutator_pool : MutatorPool #

def mutator_pool=(mutator_pool : MutatorPool) #

def name : String #

def name=(name : String) #

def pattern : Pattern #

def pattern=(pattern : Pattern) #

def rules : Array(Rule) #

def rules=(rules : Array(Rule)) #

def samples : Array(Buffer) #

def samples=(samples : Array(Buffer)) #

def timeout : Time::Span #

def timeout=(timeout : Time::Span) #