View Source GoogleApi.FirebaseRules.V1.Model.TestResult (google_api_firebase_rules v0.16.3)

Test result message containing the state of the test as well as a description and source position for test failures.


  • debugMessages (type: list(String.t), default: nil) - 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"]
  • errorPosition (type: GoogleApi.FirebaseRules.V1.Model.SourcePosition.t, default: nil) - Position in the Source or Ruleset where the principle runtime error occurs. Evaluation of an expression may result in an error. Rules are deny by default, so a DENY expectation when an error is generated is valid. When there is a DENY with an error, the SourcePosition is returned. E.g. error_position { line: 19 column: 37 }
  • expressionReports (type: list(GoogleApi.FirebaseRules.V1.Model.ExpressionReport.t), default: nil) - 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.
  • functionCalls (type: list(GoogleApi.FirebaseRules.V1.Model.FunctionCall.t), default: nil) - 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.
  • state (type: String.t, default: nil) - State of the test.
  • visitedExpressions (type: list(GoogleApi.FirebaseRules.V1.Model.VisitedExpression.t), default: nil) - 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

Link to this section Summary


Unwrap a decoded JSON object into its complex fields.

Link to this section Types


t() :: %GoogleApi.FirebaseRules.V1.Model.TestResult{
  debugMessages: [String.t()] | nil,
  errorPosition: GoogleApi.FirebaseRules.V1.Model.SourcePosition.t() | nil,
    [GoogleApi.FirebaseRules.V1.Model.ExpressionReport.t()] | nil,
  functionCalls: [GoogleApi.FirebaseRules.V1.Model.FunctionCall.t()] | nil,
  state: String.t() | nil,
    [GoogleApi.FirebaseRules.V1.Model.VisitedExpression.t()] | nil

Link to this section Functions


decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.