Class: Drntest::TestExecutor::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/drntest/test-executor.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, config, results, abort_tag) ⇒ Context

Returns a new instance of Context.



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/drntest/test-executor.rb', line 58

def initialize(client, config, results, abort_tag)
  @client = client
  @config = config
  @results = results
  @abort_tag = abort_tag
  @requests = []
  @responses = []
  @logging = true
  @completion = nil
  @validation = nil
end

Instance Method Details

#execute(operation) ⇒ Object



70
71
72
73
74
75
76
77
# File 'lib/drntest/test-executor.rb', line 70

def execute(operation)
  case operation
  when Directive
    execute_directive(operation)
  else
    execute_request(operation)
  end
end

#finishObject



79
80
81
82
# File 'lib/drntest/test-executor.rb', line 79

def finish
  consume_requests
  @results.actuals = @responses
end