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.
241 242 243 244 |
# File 'lib/gurke/reporter.rb', line 241 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.
263 264 265 266 |
# File 'lib/gurke/reporter.rb', line 263 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.
219 220 221 222 |
# File 'lib/gurke/reporter.rb', line 219 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.
184 185 186 187 |
# File 'lib/gurke/reporter.rb', line 184 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.
73 74 75 76 |
# File 'lib/gurke/reporter.rb', line 73 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.
47 48 49 50 |
# File 'lib/gurke/reporter.rb', line 47 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.
98 99 100 101 |
# File 'lib/gurke/reporter.rb', line 98 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.
146 147 148 149 |
# File 'lib/gurke/reporter.rb', line 146 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.
134 135 136 137 |
# File 'lib/gurke/reporter.rb', line 134 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.
230 231 232 233 |
# File 'lib/gurke/reporter.rb', line 230 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.
252 253 254 255 |
# File 'lib/gurke/reporter.rb', line 252 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.
196 197 198 199 |
# File 'lib/gurke/reporter.rb', line 196 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.
171 172 173 174 |
# File 'lib/gurke/reporter.rb', line 171 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.
207 208 209 210 |
# File 'lib/gurke/reporter.rb', line 207 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.
122 123 124 125 |
# File 'lib/gurke/reporter.rb', line 122 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.
86 87 88 89 |
# File 'lib/gurke/reporter.rb', line 86 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.
60 61 62 63 |
# File 'lib/gurke/reporter.rb', line 60 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.
110 111 112 113 |
# File 'lib/gurke/reporter.rb', line 110 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.
158 159 160 161 |
# File 'lib/gurke/reporter.rb', line 158 def start_step(_step, _scenario) raise NotImplementedError.new \ "#{self.class.name}#start_step must be implemented in subclass." end |