CliTestResult class
Represents the result of executing a CLI command or test.
Constructors
Properties
- combinedOutput → String
-
Returns the combined output (stdout + stderr)
no setter
-
context
→ Map<
String, dynamic> ? -
Additional context or metadata
final
- duration → Duration?
-
The duration the command took to execute
final
- exitCode → int
-
The exit code from the command
final
- hasErrors → bool
-
Returns true if there are errors in stderr
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOutput → bool
-
Returns true if there is output in stdout
no setter
- isFailure → bool
-
Returns true if the command failed (non-zero exit code)
no setter
- isSuccess → bool
-
Returns true if the command executed successfully (exit code 0)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stderr → String
-
The standard error from the command
final
- stdout → String
-
The standard output from the command
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
failure(
{String stdout = '', required String stderr, required int exitCode, Duration? duration, Map< String, dynamic> ? context}) → CliTestResult - Creates a failed test result
-
success(
{required String stdout, String stderr = '', Duration? duration, Map< String, dynamic> ? context}) → CliTestResult - Creates a successful test result