flutter/packages/flutter_tools/test/integration.shard
Martin Kustermann a44f745180
Allow integration test helpers to work on substrings instead of whole strings (#160437)
The integration test framework that waits for transitions and
(optionally) takes actions on transitions allows to match patterns.

If one uses a RegExp pattern than the framework only checks whether a
line contains the given RegExp pattern.

If one uses a String pattern it matches it exactly.

=> We add a `Barrier.contains()` and `Multiple.contains()` that allow
matching a line with if it contains the String (just like in RegExp)

=> This makes tests simpler as they don't have to know about the exact
padding of progres bar etc. Those may be irrelevant for the purpose of
the integration test and only complicate it.
2024-12-20 17:27:33 +00:00
..
debug_adapter Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
isolated Allow integration test helpers to work on substrings instead of whole strings (#160437) 2024-12-20 17:27:33 +00:00
test_data Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_all_templates_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_once_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_size_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
analyze_suggestions_integration_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_e2e_api_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_daemon_cache_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_deprecated_plugin_apply_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_flutter_source_path_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_java_version_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_legacy_flutter_plugins_strings_in_comments_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_outputs_app_link_settings_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_print_build_variants_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_compilesdkversion_mismatch_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_example_app_build_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_ndkversion_mismatch_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_new_output_dir_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_plugin_skip_unsupported_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
asset_transformation_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
background_isolate_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
bash_entrypoint_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
batch_entrypoint_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
break_on_framework_exceptions_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
build_ios_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
build_macos_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
build_preview_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
cache_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
command_output_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
coverage_collection_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
daemon_mode_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
debugger_stepping_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
deferred_components_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
deprecated_gradle_settings_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
devtools_uri_test.dart Define and use flutterBin consistently across integration.shard. (#159007) 2024-11-18 19:00:04 +00:00
downgrade_upgrade_integration_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
exit_code_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
expression_evaluation_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_attach_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_android_app_project_builddir_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_apk_verbose_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_config_only_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_wasm_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_windows_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_build_with_compilation_error_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_gen_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_plugins_dependencies_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_run_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
flutter_run_with_error_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
forbidden_imports_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gen_l10n_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gradle_non_android_plugin_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
hot_reload_errors_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
hot_reload_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
hot_reload_with_asset_test.dart Add a tag and assert some state in FlutterTestDriver tests. (#159099) 2024-11-18 23:37:05 +00:00
lifetime_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
observatory_port_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
overall_experience_test.dart Allow integration test helpers to work on substrings instead of whole strings (#160437) 2024-12-20 17:27:33 +00:00
plist_parser_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
README.md Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00
shader_compiler_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
stateless_stateful_hot_reload_test.dart Add a tag and assert some state in FlutterTestDriver tests. (#159099) 2024-11-18 23:37:05 +00:00
swift_package_manager_create_app_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
swift_package_manager_create_plugin_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
swift_package_manager_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
swift_package_manager_utils.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
template_manifest_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
test_driver.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
test_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
test_utils.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
timeline_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tool_backend_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
transition_test_utils.dart Allow integration test helpers to work on substrings instead of whole strings (#160437) 2024-12-20 17:27:33 +00:00
unit_coverage_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
variable_expansion_windows_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
variable_expansion_windows.dart Enable avoid_print lint. (#91444) 2021-10-07 16:48:04 -07:00
vmservice_integration_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
web_plugin_registrant_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
xcode_backend_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00

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.