FaultInjector class abstract
Abstract base class for all SATE AI fault injectors.
Implement this interface to create a custom fault scenario. Each injector represents one failure mode (e.g. memory pressure, malformed input).
Example
class ThermalThrottleInjector implements FaultInjector {
@override
FaultType get type => FaultType.thermalThrottle;
@override
String get name => 'Thermal Throttle Injector';
@override
String get description => 'Simulates CPU throttling under heat';
@override
Future<void> inject() async {
// artificially increase CPU load
}
@override
Future<void> reset() async {}
}
Constructors
Properties
- description → String
-
Detailed description of what this injector simulates.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Short human-readable name shown in reports and logs.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → FaultType
-
The FaultType category this injector belongs to.
no setter
Methods
-
inject(
) → Future< void> - Activate the fault.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Future< void> - Deactivate the fault and restore normal conditions.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited