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- ALL_VALIDATIONS =
:all_validations- DEFAULT_VALIDATION_TYPE =
VALIDATE_CONNECTION
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.
16 17 18 19 20 |
# File 'app/validators/qa_server/scenario_validator.rb', line 16 def initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE) @status_log = status_log @scenario = scenario @validation_type = validation_type end |
Instance Method Details
#log_without_running ⇒ Object
Log the structure of the scenario without running the scenario test.
29 30 31 |
# File 'app/validators/qa_server/scenario_validator.rb', line 29 def log_without_running log end |
#run ⇒ Object
Run a search scenario and log results.
23 24 25 26 |
# File 'app/validators/qa_server/scenario_validator.rb', line 23 def run run_accuracy_scenario if accuracy_scenario? && validating_accuracy? run_connection_scenario if connection_scenario? && validating_connections? end |