Skip to content

Commit 7ad4173

Browse files
authored
Add debugging text to integration_test README (#9316)
1 parent e25288f commit 7ad4173

File tree

1 file changed

+21
-7
lines changed
  • packages/devtools_app/integration_test

1 file changed

+21
-7
lines changed

packages/devtools_app/integration_test/README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ xattr -d com.apple.quarantine ~/path/to/chromedriver
6868
* `--update-goldens`: behaves like the `--update-goldens` flag for Flutter unit
6969
tests, updating the golden images to the results produced by the test run.
7070

71-
The following flags are available, but should not be used manually. To run a
72-
test with offline data or with experiments enabled, place the test in the proper
73-
directory, and the `run_tests.dart` script will propagate the proper flag values
74-
automatically (see [instructions below](#where-to-add-an-integration-test)).
75-
7671
# Where to add an integration test
7772

7873
Where you should place your integration test will depend on the answers to the
@@ -86,8 +81,9 @@ following questions:
8681

8782
## "live connection" integration tests
8883

89-
Tests under `integration_test/test/live_connection` will run DevTools and
90-
connect it to a live Dart or Flutter application.
84+
Tests under `integration_test/test/live_connection` will:
85+
* run a "test app" (a Dart application or a Flutter app), and
86+
* run DevTools, connecting it to that test app.
9187

9288
## "offline" integration tests
9389

@@ -114,3 +110,21 @@ For a list of such arguments, see
114110
[_in_file_args.dart](test_infra/run/_in_file_args.dart). For an example of
115111
usage, see
116112
[eval_and_browse_test.dart](test/live_connection/eval_and_browse_test.dart).
113+
114+
# Debugging
115+
116+
There is not an easy setup for debugging a DevTools integration test from an
117+
IDE. But print debugging can be applied as follows:
118+
119+
* To log the steps of the test script execution, you can set
120+
[`debugTestScript`][] to `true`.
121+
* In the test code, (the "target" of the integration test command), `print` or
122+
[`logStatus`][] will print to the terminal.
123+
* In the "test app," there is no acccess to any `print`ed output. If the app
124+
has access to `dart:io`, you can still log to a file, as easy as
125+
`io.File('some-file.txt').writeAsStringSync('...');`.
126+
127+
128+
129+
[`debugTestScript`]: https://github.com/flutter/devtools/blob/master/packages/devtools_app/integration_test/test_infra/run/_utils.dart/#L7
130+
[`logStatus`]: https://github.com/flutter/devtools/blob/master/packages/devtools_test/lib/src/helpers/utils.dart#L243

0 commit comments

Comments
 (0)