Class: PerformanceTester::Runner::Context
- Inherits:
-
Object
- Object
- PerformanceTester::Runner::Context
- Includes:
- Capybara::DSL
- Defined in:
- lib/performance_tester/runner.rb
Overview
Provides an execution context for scenarios
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#hosts ⇒ Object
readonly
Returns the value of attribute hosts.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute(scenario) ⇒ Object
-
#initialize(params, hosts) ⇒ Context
constructor
A new instance of Context.
- #network_traffic ⇒ Object
Constructor Details
#initialize(params, hosts) ⇒ Context
Returns a new instance of Context.
110 111 112 113 |
# File 'lib/performance_tester/runner.rb', line 110 def initialize(params, hosts) @params = params @hosts = hosts end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
108 109 110 |
# File 'lib/performance_tester/runner.rb', line 108 def error @error end |
#hosts ⇒ Object (readonly)
Returns the value of attribute hosts.
108 109 110 |
# File 'lib/performance_tester/runner.rb', line 108 def hosts @hosts end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
108 109 110 |
# File 'lib/performance_tester/runner.rb', line 108 def params @params end |
Instance Method Details
#execute(scenario) ⇒ Object
115 116 117 118 119 |
# File 'lib/performance_tester/runner.rb', line 115 def execute(scenario) instance_eval(&scenario) rescue => error @error = error end |
#network_traffic ⇒ Object
121 122 123 |
# File 'lib/performance_tester/runner.rb', line 121 def network_traffic page.driver.network_traffic end |