
Fixes #162107 Commands that were helpful when working on this pr. `dart dev/tools/bin/generate_gradle_lockfiles.dart --no-gradle-generation` from flutter/flutter root. `./gradlew test` from packages/flutter_tools/gradle. `git add -- ":*.lockfile"` for adding only lockfile changes. `../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t android_java11_dependency_smoke_tests` from dev/devicelab `ktlint --editorconfig=dev/bots/test/analyze-test-input/.editorconfig --baseline=dev/bots/test/analyze-test-input/ktlint-baseline.xml packages/flutter_tools/gradle/src/ --format` formatting kotlin code. Need ktlint 1.5 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
Integration tests
These tests are not hermetic, and use the actual Flutter SDK. While
they don't require actual devices, they run flutter_tester
to test
Dart VM and Flutter integration.
Use this command to run (from the flutter_tools
directory):
../../bin/cache/dart-sdk/bin/dart run test test/integration.shard
You need to have downloaded the Dart SDK in your Flutter clone for this
to work. Running ../../bin/flutter
will automatically download it.
Coverage exclusion
These tests are expensive to run and do not give meaningful coverage
information for the flutter
tool (since they are black-box tests that
run the tool as a subprocess, rather than being unit tests). For this
reason, they are in a separate shard when running on continuous
integration and are not run when calculating coverage.
Adding new test files
When adding a new test file make sure that it ends with _test.dart
, or else it will not be run.