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
# 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
end

Instance Method Details

#execute(operation) ⇒ Object



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

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

#finishObject



77
78
79
80
# File 'lib/drntest/test-executor.rb', line 77

def finish
  consume_requests
  @results.actuals = @responses
end