Class: Google::Apis::FirebaserulesV1::TestResult
- Inherits:
-
Object
- Object
- Google::Apis::FirebaserulesV1::TestResult
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firebaserules_v1/classes.rb,
lib/google/apis/firebaserules_v1/representations.rb,
lib/google/apis/firebaserules_v1/representations.rb
Overview
Test result message containing the state of the test as well as a description and source position for test failures.
Instance Attribute Summary collapse
-
#debug_messages ⇒ Array<String>
Debug messages related to test execution issues encountered during evaluation.
-
#error_position ⇒ Google::Apis::FirebaserulesV1::SourcePosition
Position in the
Sourcecontent including its line, column number, and an index of theFilein theSourcemessage. -
#expression_reports ⇒ Array<Google::Apis::FirebaserulesV1::ExpressionReport>
The mapping from expression in the ruleset AST to the values they were evaluated to.
-
#function_calls ⇒ Array<Google::Apis::FirebaserulesV1::FunctionCall>
The set of function calls made to service-defined methods.
-
#state ⇒ String
State of the test.
-
#visited_expressions ⇒ Array<Google::Apis::FirebaserulesV1::VisitedExpression>
The set of visited permission expressions for a given test.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TestResult
constructor
A new instance of TestResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TestResult
Returns a new instance of TestResult.
637 638 639 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 637 def initialize(**args) update!(**args) end |
Instance Attribute Details
#debug_messages ⇒ Array<String>
Debug messages related to test execution issues encountered during evaluation.
Debug messages may be related to too many or too few invocations of function
mocks or to runtime errors that occur during evaluation. For example:
Unable to read variable [name: "resource"]
Corresponds to the JSON property debugMessages
599 600 601 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 599 def @debug_messages end |
#error_position ⇒ Google::Apis::FirebaserulesV1::SourcePosition
Position in the Source content including its line, column number, and an
index of the File in the Source message. Used for debug purposes.
Corresponds to the JSON property errorPosition
605 606 607 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 605 def error_position @error_position end |
#expression_reports ⇒ Array<Google::Apis::FirebaserulesV1::ExpressionReport>
The mapping from expression in the ruleset AST to the values they were
evaluated to. Partially-nested to mirror AST structure. Note that this field
is actually tracking expressions and not permission statements in contrast to
the "visited_expressions" field above. Literal expressions are omitted.
Corresponds to the JSON property expressionReports
613 614 615 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 613 def expression_reports @expression_reports end |
#function_calls ⇒ Array<Google::Apis::FirebaserulesV1::FunctionCall>
The set of function calls made to service-defined methods. Function calls are
included in the order in which they are encountered during evaluation, are
provided for both mocked and unmocked functions, and included on the response
regardless of the test state.
Corresponds to the JSON property functionCalls
621 622 623 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 621 def function_calls @function_calls end |
#state ⇒ String
State of the test.
Corresponds to the JSON property state
626 627 628 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 626 def state @state end |
#visited_expressions ⇒ Array<Google::Apis::FirebaserulesV1::VisitedExpression>
The set of visited permission expressions for a given test. This returns the
positions and evaluation results of all visited permission expressions which
were relevant to the test case, e.g. match /path ` allow read if: `
For a detailed report of the intermediate evaluation states, see the
expression_reports field
Corresponds to the JSON property visitedExpressions
635 636 637 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 635 def visited_expressions @visited_expressions end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
642 643 644 645 646 647 648 649 |
# File 'lib/google/apis/firebaserules_v1/classes.rb', line 642 def update!(**args) @debug_messages = args[:debug_messages] if args.key?(:debug_messages) @error_position = args[:error_position] if args.key?(:error_position) @expression_reports = args[:expression_reports] if args.key?(:expression_reports) @function_calls = args[:function_calls] if args.key?(:function_calls) @state = args[:state] if args.key?(:state) @visited_expressions = args[:visited_expressions] if args.key?(:visited_expressions) end |