@@ -68,11 +68,6 @@ xattr -d com.apple.quarantine ~/path/to/chromedriver
68
68
* ` --update-goldens ` : behaves like the ` --update-goldens ` flag for Flutter unit
69
69
tests, updating the golden images to the results produced by the test run.
70
70
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
-
76
71
# Where to add an integration test
77
72
78
73
Where you should place your integration test will depend on the answers to the
@@ -86,8 +81,9 @@ following questions:
86
81
87
82
## "live connection" integration tests
88
83
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.
91
87
92
88
## "offline" integration tests
93
89
@@ -114,3 +110,21 @@ For a list of such arguments, see
114
110
[ _ in_file_args.dart] ( test_infra/run/_in_file_args.dart ) . For an example of
115
111
usage, see
116
112
[ 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