automated_testing_framework library

Classes

AbortTestCommand
Command to abort a currently running test.
AnnounceDeviceCommand
Command to announce a device to a command and control server.
AnnounceDriverCommand
Command to announce a test driver to a command and control server.
AssertErrorForm
AssertErrorStep
Test step that asserts that the error value equals (or does not equal) a specific value.
AssertSemanticsForm
AssertSemanticsStep
Test step that asserts that the value equals (or does not equal) a specific value.
AssertValueForm
AssertValueStep
Test step that asserts that the value equals (or does not equal) a specific value.
AssetTestStore
Test store that can be used to read tests from asset files. Each asset file may contain one or more tests.
AsyncTestLoader
Loader that loads the test from an async callback.
AvailableTestsPage
Page that displays all the currently available tests and provides the option to run them.
AvailableTestStep
Describes an automated test step. Custom test steps must register with the TestStepRegistry and create an instance of this class. This binds the input form, any quick-add values, the help and title translation entities, and the requirements of the step that determines if the step will show or not given the current constraints.
BaseSize
CancelToken
Token can can be used to cancel test steps.
CaptureContext
PODO that simply holds the request for a screen capture.
ChallengeCommand
Command issued to solicit a challenge response for authentication / authorization purposes.
ChallengeResponseCommand
Command to respond to a challenge with an authorization signature for authentication / authorization.
ClipboardTestStore
Test store that can be used to read and write tests from / to the clipboard. The clipboard may contain one or more tests when attempting to load from the clipboard.
CommandAck
Acknowlegement command sent in response to acknowledge a remote command. This will include the id of the command being ack'd in the commandId.
CommandResponse
Base class for the command responses associated to the CommandAck.
CommentForm
CommentStep
Technically not a step but is instead a place where testers can put comments into the test. Comments will be emitted into the logs in addition to being viewable in the test editor itself.
ConnectedDevice
DeviceCommand
A command class intended to be extended to provide comamnds and controls events between the backend server, the device drivers, and the devices themselves.
DismissKeyboardForm
DismissKeyboardStep
Test step that dismisses the keyboard.
DoubleTapForm
DoubleTapStep
Step that double-taps a Testable widget.
DragForm
DragStep
Step that will attempt to scroll another widget until it becomes visible.
DriverSignatureHelper
Helper class to generate signatures for use by test drivers as well as driven devices.
EnsureExistsForm
EnsureExistsStep
Test step that ensures a particular widget exists on the widget tree before continuing.
ExitAppForm
ExitAppStep
Test step that exits the application.
GoBackForm
GoBackStep
Step that attempts to execute a Back action against the current navigation stack.
GoldenTestImages
GoodbyeCommand
Command to tell the remote connection that the socket is about to be disconnected by the sender. If the complete attribute is true then the session is also being terminated. Otherwise, if the receiver initiates a reconnection then the session will be resumed.
IoTestStore
Test store that uses dart:io to perform CRUD operations on tests, reports, and images. This is not supported on the web platform, and all functions are set to no-op when on web to prevent compile issues if accidentally included in a web build.
JsonLogRecord
ListDevicesCommand
Command to list the devices currently online for testing. Use the availableOnly flag to filter between devices that are online, but actively in use, vs ones that are both online and available to run tests.
ListDevicesResponse
Response associated with a ListDevicesCommand that provides the list of connected devices.
LogHandler
LogResponse
Response associated with a StartLogStreamCommand that provides the log entry information.
LongPressForm
LongPressStep
Step that sends a longPress event to a Testable widget.
MemoryTestLoader
Loader that loads the test from an in-memory object.
PendingTest
Describes a pending test. The pending test should describe the name, number of steps, version, and provide a loader to load the full test details.
PingCommand
Command sent to let the other side know the connection is still ongoing and that the sender is still actively processing commands. Devices may optionally provide information about the device and the device's test state as part of these periodic check ins.
ProgressValue
PODO that holds the value of progress. The progress can be anything.
ReleaseDeviceCommand
Command sent by a test driver to release a device from the driver to put it back into the available device pool.
RemoveGlobalVariableForm
RemoveGlobalVariableStep
Sets a global variable on the identified TestController.
RemoveVariableForm
RemoveVariableStep
Sets a variable on the identified TestController.
RequestScreenshotCommand
Command sent by a test driver to request a single screenshot from a device.
ReservationHandler
ReserveDeviceCommand
Command sent by a test driver to reserve a test device. If this is ack'd with a successful response, the device will now accept commands from the test driver.
RunTestCommand
Command to initiate a test run on a device. The device will send progress via the CommandAck command using this command's id.
RunTestHandler
ScreenshotForm
ScreenshotHandler
ScreenshotResponse
Response containing a screenshot image. This may come from a RunTestCommand's ScreenshotStep or from a StartScreenshotStreamCommand.
ScreenshotStep
ScrollUntilVisibleForm
ScrollUntilVisibleStep
Step that will attempt to scroll another widget until it becomes visible.
SetGlobalVariableForm
SetGlobalVariableStep
Sets a global variable on the identified TestController.
SetValueForm
SetValueStep
Sets a value on the identified Testable.
SetVariableForm
SetVariableStep
Sets a variable on the identified TestController.
SleepForm
SleepProgress
Renders the sleep progress on the test runner.
SleepStep
Simple test step that will sleep for a given period of time.
StartLogStreamCommand
Command to start a log stream from the device to the test driver. When accepted the device will send a CommandAck with this command's id and the log information in the response.
StartScreenshotStreamCommand
Command instructing the device to send a screenshot periodically to the driver. The default implementation will only send screenshots that have changed since the previous one rather than constantly sending the same screenshot over and over.
StopLogStreamCommand
Command to instruct a device to stop streaming logs to the test driver.
StopScreenshotStreamCommand
Command to stop the stream of screenshots from a device to a test driver.
TapForm
TapStep
Step that taps a Testable widget.
Test
PODO for a test that can be executed.
Testable
Workhorse of the Automate Testing Framework.
TestableDropdownButtonFormField<T>
An extention to the standard DropdownButtonFormField that is wrapped with a Testable.
TestableFormDialog
Dialog for test forms. This is used for the quick dialog version of adding a test step.
TestableFormField<T>
An extention to the standard FormField that is wrapped with a Testable.
TestableFormPage
Form that displays all the input options for an individual test step.
TestableGestureAction
Built-in actions that are available to be set either by-default or by-widget on Testable widgets.
TestableGestures
Set of gestures that Testable widgets will respond to when the TestRunner is enabled. Applications can (should) set the gestures based on their typical usage patterns such that the gestures have a minimal amount of conflict with application based gestures.
TestableRenderController
Controller that is used to provide information for the Testable. This includes information such as what gestures to respond to as well as how to render the global and / or individual overlays.
TestableState
State object for a Testable widget.
TestableStepsDialog
Dialog that displays the test steps in a quick access / minified form.
TestableStepsPage
Page that displays all the test steps for the current test. This will allow the reordering, clearing, editing, and saving of the steps w/in a current test.
TestableTextFormField
An extention to the standard TextFormField that is wrapped with a Testable.
TestableType
Enum-like class that describes the various capabilities of a Testable
TestAppSettings
Provides settings for the test app that apply globaly. Any settings set here will globally override values from other parts of the framework.
TestController
Controller that allows for the creation, loading, saving, and running of automated tests.
TestControllerState
TestDeviceCommunicator
Interface that plugins may implement to provide their own solution for communicating with external sources.
TestDeviceInfo
Container class for the device information for the device the test is being executed on.
TestDeviceInfoHelper
Container class for the device information for the device the test is being executed on.
TestDeviceStatus
TestDriver
TestDriverState
TestDriverStatus
TestImage
Represents an image from a test.
TestLoader
Interface for loading tests.
TestProgressBuilder
Builds and displays the test progress.
TestReport
Represents a report from a test run.
TestReportMetadata
TestReportPage
Page that can display a full test report.
TestReportStep
The result for an executed test step. It's important to note that times in the report are relative to each run and should not be thought of in absolute terms. Too many variables such as animations, built in delays, etc. can cause an individual test step to take 1-2 seconds despite a perceived expectation that something should be sub-second. When comparing the times, do so only across tests and look for trends. Avoid the temptation to look at the times as absolutes.
TestReportStepWidget
Widget for rendering a test step from a test report.
TestRunner
Test runner that should be the base widget within an application. This requires the test controller and the child which is the application itself.
TestRunnerState
TestRunnerStep
Abstract step that all other test steps must extend.
TestRunnerThemeData
Test runner theme data that can be used to alter the appearance of the built in test runner.
TestStatusAlignment
Alignment for the test status bar.
TestStatusResponse
Response that gets sent periodically from a RunTestCommand.
TestStep
Describes a single step in a test. A test step is required to have an id which is the human-readable key for the test step. It has an optional image that is a capture of the widget for reference. Finally, it has an optional set of values that configure the step.
TestStepBuilder
Simple class that binds an available test step with the actual running test step.
TestStepDelays
Defines the various delays and timeouts involved when executing tests.
TestStepForm
TestStepListFullTab
Tab that shows the test steps in the full list view.
TestStepListMarkdownTab
Tab that shows the test steps in a drag-and-drop reorderable format.
TestStepListMinifiedTab
Tab that shows the test steps in a drag-and-drop reorderable format.
TestStepPicker
TestStepRegistry
Registry that allows for the binding of custom test steps. There exists a default instance that will always be used when a custom instance is not available.
TestStepsPage
Page that shows all the test steps and their values for a current test.
TestStepTranslations
TestStore
Generic test store that provies no-op implementations of all the test storage functions.
TestSuiteReport
A summary of all the results from all the runs in a single test suite.
TestSuiteReportPage
Page that can display a summarized result from a test suite run.
TestSuiteResult
Represents a the summarized results from a single test run within a larger test suite.
TestSuiteResultWidget
TestTranslations

Mixins

ResetNavigationStateMixin<T extends StatefulWidget>
Mixin to listen for the testing framework to request a reset and thus pop itself off the navigation stack if it is still mounted.

Functions

testableChildBuilder(BuildContext context, Widget child) Widget
ChildWidgetBuilder that can be used to wrap child widgets with a Testable widget. This particular builder will only wrap the child if the child has a ValueKey set on it. In that case, the Testable will be given the a new ValueKey with the value from the child's key prefixed with value_key_.

Typedefs

ConnectionChangedCallback = Future<void> Function(TestDeviceCommunicator communicator, bool connected)
DeviceCommandHandler = Future<CommandAck> Function(DeviceCommand command)
GoldenImageWriter = Future<void> Function(TestReport report)
Writer to save the given test report as golden images for the test.
TestImageReader = Future<Uint8List?> Function({required TestDeviceInfo deviceInfo, required String imageId, String? suiteName, required String testName, int? testVersion})
Reader to load a golden image from a data store and return it for comparison. If testVersion is omitted, this should default to the highest version listed in the golden file.
TestReader = Future<List<PendingTest>?> Function(BuildContext? context, {String? suiteName})
TestReporter = Future<bool> Function(TestReport report)
TestRunnerStepBuilder = TestRunnerStep? Function(dynamic values)
TestWriter = Future<bool> Function(BuildContext context, Test test)
VariableResolver = dynamic Function(String variableName)
A resolver that takes a variable name to a value. If this resolver does not recognize the variable, it must throw an UnknownVariableException rather than returning null. A null return value will be interpreted as the variable was explicitly resolved to null.
WidgetOverlayBuilder = dynamic Function({required BuildContext context, required Testable testable})
Builder function that renders the Testable overlay when it is active.

Exceptions / Errors

UnknownVariableException
An exception that should be thrown by a VariableResolver when it is asked to resolve a variable that it does not support resolving.