Class: QaServer::ScenarioValidator
- Inherits:
-
Object
- Object
- QaServer::ScenarioValidator
- Defined in:
- app/validators/qa_server/scenario_validator.rb
Direct Known Subclasses
Constant Summary collapse
- PASS =
:good
- FAIL =
:bad
- UNKNOWN =
:unknown
- VALIDATE_CONNECTION =
:connection
- VALIDATE_ACCURACY =
:accuracy
- VALIDATE_ACCURACY_COMPARISON =
:accuracy_comparison
- ALL_VALIDATIONS =
:all_validations
- DEFAULT_VALIDATION_TYPE =
VALIDATE_CONNECTION
Instance Attribute Summary collapse
-
#scenario ⇒ Object
readonly
Returns the value of attribute scenario.
-
#status_log ⇒ Object
readonly
Returns the value of attribute status_log.
-
#validation_type ⇒ Object
readonly
Returns the value of attribute validation_type.
Instance Method Summary collapse
-
#initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE) ⇒ ScenarioValidator
constructor
A new instance of ScenarioValidator.
-
#log_without_running ⇒ Object
Log the structure of the scenario without running the scenario test.
-
#run ⇒ Object
Run a search scenario and log results.
Constructor Details
#initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE) ⇒ ScenarioValidator
Returns a new instance of ScenarioValidator.
20 21 22 23 24 |
# File 'app/validators/qa_server/scenario_validator.rb', line 20 def initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE) @status_log = status_log @scenario = scenario @validation_type = validation_type end |
Instance Attribute Details
#scenario ⇒ Object (readonly)
Returns the value of attribute scenario.
15 16 17 |
# File 'app/validators/qa_server/scenario_validator.rb', line 15 def scenario @scenario end |
#status_log ⇒ Object (readonly)
Returns the value of attribute status_log.
15 16 17 |
# File 'app/validators/qa_server/scenario_validator.rb', line 15 def status_log @status_log end |
#validation_type ⇒ Object (readonly)
Returns the value of attribute validation_type.
15 16 17 |
# File 'app/validators/qa_server/scenario_validator.rb', line 15 def validation_type @validation_type end |
Instance Method Details
#log_without_running ⇒ Object
Log the structure of the scenario without running the scenario test.
33 34 35 |
# File 'app/validators/qa_server/scenario_validator.rb', line 33 def log_without_running log end |
#run ⇒ Object
Run a search scenario and log results.
27 28 29 30 |
# File 'app/validators/qa_server/scenario_validator.rb', line 27 def run run_accuracy_scenario if accuracy_scenario? && validating_accuracy? run_connection_scenario if connection_scenario? && validating_connections? end |