Update test to include more complete instructions for how to run tests locally, add example to andoid 11 tests as well (#158528)

Follow @matanlurey's example and include how to run a test at the top of the test file.
This commit is contained in:
Reid Baker 2024-11-12 16:07:55 -06:00 committed by GitHub
parent 8e5bd5af86
commit 638331b133
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 2 deletions

View File

@ -8,6 +8,20 @@ import 'package:path/path.dart' as path;
import '../utils.dart';
/// To run this test locally:
///
/// 1. Connect an Android device or emulator.
/// 2. Run `dart pub get` in dev/bots
/// 3. Set flutter to use Java 11
/// flutter config --jdk-dir=<Path to java 11>
/// On a Mac you can run `/usr/libexec/java_home -V1 to find the installed
/// versions of java. Remember to clear this value after testing.
/// `flutter config --jdk-dir=`
/// 4. Run the following command from the root of the Flutter repository:
///
/// ```sh
/// SHARD=android_java11_tool_integration_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// ```
Future<void> androidJava11IntegrationToolTestsRunner() async {
final String toolsPath = path.join(flutterRoot, 'packages', 'flutter_tools');

View File

@ -9,14 +9,16 @@ import '../utils.dart';
/// To run this test locally:
///
/// 1. Connect an Android device or emulator.
/// 2. Run the following command from the root of the Flutter repository:
/// 2. Run `dart pub get` in dev/bots
/// 3. Run the following command from the root of the Flutter repository:
///
/// ```sh
/// SHARD=flutter_driver_android bin/cache/dart-sdk/bin/dart dev/bots/test.dart
/// ```
///
/// For debugging, it is recommended to instead just run and launch these tests
/// For debugging, you need to instead run and launch these tests
/// individually _in_ the `dev/integration_tests/native_driver_test` directory.
/// Comparisons against goldens cant happen locally.
Future<void> runFlutterDriverAndroidTests() async {
print('Running Flutter Driver Android tests...');