FlutterTestConfiguration class

Inheritance

Constructors

FlutterTestConfiguration()

Properties

build bool
If the application should be built prior to running the tests Defaults to true
read / write
buildFlavor String
The build flavor to run the tests against (optional) Defaults to empty
read / write
createWorld CreateWorld
An optional function to create a world object for each scenario.
read / write, inherited
customStepParameterDefinitions Iterable<CustomParameter>
Any user defined step parameters
read / write, inherited
defaultTimeout Duration
The default step timeout - this can be override when definition a step definition
read / write, inherited
exitAfterTestRun bool
the program will exit after all the tests have run
read / write, inherited
featureDefaultLanguage String
The default feature language
read / write, inherited
features Iterable<Glob>
The glob path(s) to all the features
read / write, inherited
flutterBuildTimeout Duration
Duration to wait for Flutter to build and start the app on the target device Slower machine may take longer to build and run a large app Defaults to 90 seconds
read / write
flutterDriverMaxConnectionAttempts int
The maximum times the flutter driver can try and connect to the running app Defaults to 3
read / write
flutterDriverReconnectionDelay Duration
Duration to wait before reconnecting the Flutter driver to the app. On slower machines the app might not be in a state where the driver can successfully connect immediately Defaults to 2 seconds
read / write
getAttachmentManager CreateAttachmentManager
used to get a new instance of an attachment manager class that is passed to the World context
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
hooks Iterable<Hook>
Hooks that are run at certain points in the execution cycle
read / write, inherited
logFlutterProcessOutput bool
Logs Flutter process output to stdout The Flutter process is use to start and driver the app under test. The output may contain build and run information Defaults to false
read / write
onAfterFlutterDriverConnect Future<void> Function(FlutterDriver driver)
Called after the successful connection of Flutter driver to the running application. Depending on your configuration this method will be called on each new connection usually before each scenario is run.
read / write
onBeforeFlutterDriverConnect Future<void> Function()
Called before any attempt to connect Flutter driver to the running application, Depending on your configuration this method will be called before each scenario is run.
read / write
order ExecutionOrder
The execution order of features - this default to random to avoid any inter-test depedencies
read / write, inherited
reporters Iterable<Reporter>
a list of reporters to use. Built-in reporters: [...]
read / write, inherited
restartAppBetweenScenarios bool
restarts the application under test between each scenario. Defaults to true to avoid the application being in an invalid state before each test
read / write
runningAppProtocolEndpointUri String
An observatory url that the test runner can connect to instead of creating a new running instance of the target application Url takes the form of http://127.0.0.1:51540/EM72VtRsUV0=/ and usually printed to stdout in the form Connecting to service protocol: http://127.0.0.1:51540/EM72VtRsUV0=/ You will have to add the --verbose flag to the command to start your flutter app to see this output and ensure enableFlutterDriverExtension() is called by the running app
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stepDefinitions Iterable<StepDefinitionBase<World>>
The user defined step definitions that are matched with written steps in the features
read / write, inherited
tagExpression String
a filter to limit the features that are run based on tags see https://docs.cucumber.io/cucumber/tag-expressions/ for expression syntax
read / write, inherited
targetAppPath String
The target app to run the tests against Defaults to "lib/test_driver/app.dart"
read / write
targetAppWorkingDirectory String
Option to define the working directory for the process that runs the app under test (optional) Handy if your app is separated from your tests as flutter needs to be able to find a pubspec file
read / write
targetDeviceId String
The target device id to run the tests against when multiple devices detected Defaults to empty
read / write
verboseFlutterProcessLogs bool
Sets the --verbose flag on the flutter process Defaults to false
read / write

Methods

createFlutterDriver([String dartVmServiceUrl]) Future<FlutterDriver>
createFlutterWorld(TestConfiguration config, FlutterWorld world) Future<FlutterWorld>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
prepare() → void
used to allow for custom configuration to ensure framework specific congfiguration is in place
override
setObservatoryDebuggerUri(String uri) → void
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited