@@ -7,13 +7,15 @@ This package contains the code for test framework and the tests. More generally
...
@@ -7,13 +7,15 @@ This package contains the code for test framework and the tests. More generally
the tests are referred to as "tasks" in the API, but since we primarily use it
the tests are referred to as "tasks" in the API, but since we primarily use it
for testing, this document refers to them as "tests".
for testing, this document refers to them as "tests".
If you have access to Google's internal network, you can see the continuous build results from the master branch at
If you have access to Google's internal network, you can see the continuous
<http://go/flutter-dashboard/build.html>. (There is currently no public view of this data, unfortunately.)
build results from the master branch at <http://go/flutter-dashboard/build.html>.
(There is currently no public view of this data, unfortunately.)
# Prerequisites
# Prerequisites
You must set the `ANDROID_HOME` environment variable to run tests on Android. If you
You must set the `ANDROID_HOME` environment variable to run tests on Android. If
have a local build of the Flutter engine, then you have a copy of the Android SDK at `.../engine/src/third_party/android_tools/sdk`.
you have a local build of the Flutter engine, then you have a copy of the
Android SDK at `.../engine/src/third_party/android_tools/sdk`.
# Running tests locally
# Running tests locally
...
@@ -26,10 +28,16 @@ To run a test, use option `-t` (`--task`):
...
@@ -26,10 +28,16 @@ To run a test, use option `-t` (`--task`):
```sh
```sh
# from the .../flutter/dev/devicelab directory
# from the .../flutter/dev/devicelab directory
dart bin/run.dart -t{NAME_OF_TEST}
dart bin/run.dart -t{NAME_OR_PATH_OF_TEST}
```
```
You can see the test names in the `manifest.yaml` file in this directory or by looking in `bin/tasks/`. Do not include the `.dart` file extension. For example, `dart bin/run.dart -t complex_layout__start_up`.
Where `NAME_OR_PATH_OF_TEST` can be either of:
- the _name_ of a task, which you can find in the `manifest.yaml` file in this
directory. Example: `complex_layout__start_up`.
- the path to a Dart _file_ corresponding to a task, which resides in `bin/tasks`.
Tip: most shells support path auto-completion using the Tab key. Example:
`bin/tasks/complex_layout__start_up.dart`.
To run multiple tests, repeat option `-t` (`--task`) multiple times:
To run multiple tests, repeat option `-t` (`--task`) multiple times:
...
@@ -54,8 +62,8 @@ Currently there are only two stages defined, `devicelab` and `devicelab_ios`.
...
@@ -54,8 +62,8 @@ Currently there are only two stages defined, `devicelab` and `devicelab_ios`.
# Reproducing broken builds locally
# Reproducing broken builds locally
If a commit caused a test to fail,
If a commit caused a test to fail,
[the dashboard](http://go/flutter-dashboard/build.html)(requires access to the Google network, sorry) might look something
[the dashboard](http://go/flutter-dashboard/build.html)(requires access to the
like this:
Google network, sorry) might look something like this: