Class: Gurke::Reporter
- Inherits:
-
Object
- Object
- Gurke::Reporter
- Defined in:
- lib/gurke/reporter.rb
Overview
A Reporter provides callbacks that will be executed whenever a specific execution step starts or ends.
Direct Known Subclasses
Constant Summary collapse
- CALLBACKS =
List of all callback methods as symbols.
%i[ before_features before_feature before_scenario before_step start_features start_feature start_scenario start_background start_step end_features end_feature end_scenario end_background end_step after_features after_feature after_scenario after_step retry_scenario ].freeze
Instance Method Summary collapse
-
#after_feature(_feature) ⇒ Object
Called after each feature and after all hooks.
-
#after_features(_features) ⇒ Object
Called after all features and after all hooks.
-
#after_scenario(_scenario) ⇒ Object
Called after each scenario and after all hooks.
-
#after_step(_step_result, _scenario) ⇒ Object
Called after each step, after all step hook.
-
#before_feature(_feature) ⇒ Object
Called for each feature before it starts, but before any before-feature hook is run.
-
#before_features(_features) ⇒ Object
Called before the execution of any feature and before any before-features hook is invoked.
-
#before_scenario(_scenario) ⇒ Object
Called for each each scenario before it starts.
-
#before_step(_step, _scenario) ⇒ Object
Called before each step and before any before-step hook.
-
#end_background(_background, _scenario) ⇒ Object
Called after each background.
-
#end_feature(_feature) ⇒ Object
Called after each feature but before any after hook.
-
#end_features(_features) ⇒ Object
Called after all features but before any after-features hook.
-
#end_scenario(_scenario) ⇒ Object
Called after each scenario but before any after hook.
-
#end_step(_step_result, _scenario) ⇒ Object
Called after each step but before any after-step hook.
-
#retry_scenario(_scenario) ⇒ Object
Called when a flaky scenario is retried.
-
#start_background(_background, _scenario) ⇒ Object
Called before each background.
-
#start_feature(_feature) ⇒ Object
Called for each feature before it starts, but after all before-feature hooks.
-
#start_features(_features) ⇒ Object
Called before the execute of any feature, but after all before-features hooks.
-
#start_scenario(_scenario) ⇒ Object
Called for each each scenario before it starts, but after all before hooks for given scenario.
-
#start_step(_step, _scenario) ⇒ Object
Called before each step and after all before-step hooks.
Instance Method Details
#after_feature(_feature) ⇒ Object
Called after each feature and after all hooks.
239 240 241 242 |
# File 'lib/gurke/reporter.rb', line 239 def after_feature(_feature) raise NotImplementedError.new \ "#{self.class.name}#after_feature must be implemented in subclass." end |
#after_features(_features) ⇒ Object
Called after all features and after all hooks.
261 262 263 264 |
# File 'lib/gurke/reporter.rb', line 261 def after_features(_features) raise NotImplementedError.new \ "#{self.class.name}#after_features must be implemented in subclass." end |
#after_scenario(_scenario) ⇒ Object
Called after each scenario and after all hooks.
217 218 219 220 |
# File 'lib/gurke/reporter.rb', line 217 def after_scenario(_scenario) raise NotImplementedError.new \ "#{self.class.name}#after_scenario must be implemented in subclass." end |
#after_step(_step_result, _scenario) ⇒ Object
Called after each step, after all step hook.
182 183 184 185 |
# File 'lib/gurke/reporter.rb', line 182 def after_step(_step_result, _scenario) raise NotImplementedError.new \ "#{self.class.name}#after_step must be implemented in subclass." end |
#before_feature(_feature) ⇒ Object
Called for each feature before it starts, but before any before-feature hook is run.
71 72 73 74 |
# File 'lib/gurke/reporter.rb', line 71 def before_feature(_feature) raise NotImplementedError.new \ "#{self.class.name}#start_feature must be implemented in subclass." end |
#before_features(_features) ⇒ Object
Called before the execution of any feature and before any before-features hook is invoked.
45 46 47 48 |
# File 'lib/gurke/reporter.rb', line 45 def before_features(_features) raise NotImplementedError.new \ "#{self.class.name}#before_features must be implemented in subclass." end |
#before_scenario(_scenario) ⇒ Object
Called for each each scenario before it starts. Will be called before any hooks for the given scenario is executed.
96 97 98 99 |
# File 'lib/gurke/reporter.rb', line 96 def before_scenario(_scenario) raise NotImplementedError.new \ "#{self.class.name}#before_scenario must be implemented in subclass." end |
#before_step(_step, _scenario) ⇒ Object
Called before each step and before any before-step hook.
144 145 146 147 |
# File 'lib/gurke/reporter.rb', line 144 def before_step(_step, _scenario) raise NotImplementedError.new \ "#{self.class.name}#before_step must be implemented in subclass." end |
#end_background(_background, _scenario) ⇒ Object
Called after each background.
132 133 134 135 |
# File 'lib/gurke/reporter.rb', line 132 def end_background(_background, _scenario) raise NotImplementedError.new \ "#{self.class.name}#end_background must be implemented in subclass." end |
#end_feature(_feature) ⇒ Object
Called after each feature but before any after hook.
228 229 230 231 |
# File 'lib/gurke/reporter.rb', line 228 def end_feature(_feature) raise NotImplementedError.new \ "#{self.class.name}#end_feature must be implemented in subclass." end |
#end_features(_features) ⇒ Object
Called after all features but before any after-features hook.
250 251 252 253 |
# File 'lib/gurke/reporter.rb', line 250 def end_features(_features) raise NotImplementedError.new \ "#{self.class.name}#end_features must be implemented in subclass." end |
#end_scenario(_scenario) ⇒ Object
Called after each scenario but before any after hook.
194 195 196 197 |
# File 'lib/gurke/reporter.rb', line 194 def end_scenario(_scenario) raise NotImplementedError.new \ "#{self.class.name}#end_scenario must be implemented in subclass." end |
#end_step(_step_result, _scenario) ⇒ Object
Called after each step but before any after-step hook.
169 170 171 172 |
# File 'lib/gurke/reporter.rb', line 169 def end_step(_step_result, _scenario) raise NotImplementedError.new \ "#{self.class.name}#end_step must be implemented in subclass." end |
#retry_scenario(_scenario) ⇒ Object
Called when a flaky scenario is retried.
205 206 207 208 |
# File 'lib/gurke/reporter.rb', line 205 def retry_scenario(_scenario) raise NotImplementedError.new \ "#{self.class.name}#retry_scenario must be implemented in subclass." end |
#start_background(_background, _scenario) ⇒ Object
Called before each background.
120 121 122 123 |
# File 'lib/gurke/reporter.rb', line 120 def start_background(_background, _scenario) raise NotImplementedError.new \ "#{self.class.name}#start_background must be implemented in subclass." end |
#start_feature(_feature) ⇒ Object
Called for each feature before it starts, but after all before-feature hooks.
84 85 86 87 |
# File 'lib/gurke/reporter.rb', line 84 def start_feature(_feature) raise NotImplementedError.new \ "#{self.class.name}#start_feature must be implemented in subclass." end |
#start_features(_features) ⇒ Object
Called before the execute of any feature, but after all before-features hooks.
58 59 60 61 |
# File 'lib/gurke/reporter.rb', line 58 def start_features(_features) raise NotImplementedError.new \ "#{self.class.name}#before_features must be implemented in subclass." end |
#start_scenario(_scenario) ⇒ Object
Called for each each scenario before it starts, but after all before hooks for given scenario.
108 109 110 111 |
# File 'lib/gurke/reporter.rb', line 108 def start_scenario(_scenario) raise NotImplementedError.new \ "#{self.class.name}#start_scenario must be implemented in subclass." end |
#start_step(_step, _scenario) ⇒ Object
Called before each step and after all before-step hooks.
156 157 158 159 |
# File 'lib/gurke/reporter.rb', line 156 def start_step(_step, _scenario) raise NotImplementedError.new \ "#{self.class.name}#start_step must be implemented in subclass." end |