Class TestResult
Test result message containing the state of the test as well as a description and source position for test failures.
Implements
Inherited Members
Namespace: Google.Apis.FirebaseRules.v1.Data
Assembly: Google.Apis.FirebaseRules.v1.dll
Syntax
public class TestResult : IDirectResponseSchema
Properties
DebugMessages
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"]
Declaration
[JsonProperty("debugMessages")]
public virtual IList<string> DebugMessages { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
ErrorPosition
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 }
Declaration
[JsonProperty("errorPosition")]
public virtual SourcePosition ErrorPosition { get; set; }
Property Value
Type | Description |
---|---|
SourcePosition |
ExpressionReports
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.
Declaration
[JsonProperty("expressionReports")]
public virtual IList<ExpressionReport> ExpressionReports { get; set; }
Property Value
Type | Description |
---|---|
IList<ExpressionReport> |
FunctionCalls
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
.
Declaration
[JsonProperty("functionCalls")]
public virtual IList<FunctionCall> FunctionCalls { get; set; }
Property Value
Type | Description |
---|---|
IList<FunctionCall> |
State
State of the test.
Declaration
[JsonProperty("state")]
public virtual string State { get; set; }
Property Value
Type | Description |
---|---|
string |
VisitedExpressions
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
Declaration
[JsonProperty("visitedExpressions")]
public virtual IList<VisitedExpression> VisitedExpressions { get; set; }
Property Value
Type | Description |
---|---|
IList<VisitedExpression> |