Show 'started' messages, explain how to debug hangs in the Android JUnit tests (#163242)
There is more work to do, i.e. https://github.com/flutter/flutter/issues/163239, to make this a better experience, but better than nothing.
This commit is contained in:
parent
f3bdcbda58
commit
9ffdd3a0ec
@ -51,7 +51,15 @@ The easiest way (though not the quickest) is to use `run_tests.py`:
|
|||||||
./testing/run_tests.py --type java --android-variant android_debug_unopt_arm64
|
./testing/run_tests.py --type java --android-variant android_debug_unopt_arm64
|
||||||
```
|
```
|
||||||
|
|
||||||
You may also be able to run the tests directly from Android Studio.
|
> [!TIP]
|
||||||
|
> Trying to debug tests or timeouts/hangs?
|
||||||
|
>
|
||||||
|
> Run the tests directly from Android Studio, or [set `maxParallelForks` to `1`](https://github.com/flutter/flutter/blob/1cd3ab16ca1cba35e187ae75063fce0915985b94/engine/src/flutter/shell/platform/android/test_runner/build.gradle#L55):
|
||||||
|
>
|
||||||
|
> ```diff
|
||||||
|
> + maxParallelForks availableProcessors // The CI bot has 8 CPUs.
|
||||||
|
> - maxParallelForks 1
|
||||||
|
> ```
|
||||||
|
|
||||||
### Integration tests
|
### Integration tests
|
||||||
|
|
||||||
@ -150,6 +158,7 @@ completion:
|
|||||||

|

|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
|
>
|
||||||
> `--compile-commands-dir` must point to an Android build output:
|
> `--compile-commands-dir` must point to an Android build output:
|
||||||
>
|
>
|
||||||
> ```jsonc
|
> ```jsonc
|
||||||
@ -220,7 +229,8 @@ code completion in the `io/flutter` and `test/io/flutter` folders. For example,
|
|||||||

|

|
||||||
|
|
||||||
To get code coverage displayed in line: go to the test class you wish to run and
|
To get code coverage displayed in line: go to the test class you wish to run and
|
||||||
1. Right click > Modify Run Configuration...,
|
|
||||||
|
1. Right click > Modify Run Configuration...,
|
||||||
2. In the window that pops up click Modify options > Specify classes
|
2. In the window that pops up click Modify options > Specify classes
|
||||||
and packages (under "code coverage").
|
and packages (under "code coverage").
|
||||||
3. In the new box that appears at the bottom of the window, click the + > Add package, and then add `io.flutter.*`.
|
3. In the new box that appears at the bottom of the window, click the + > Add package, and then add `io.flutter.*`.
|
||||||
|
@ -54,7 +54,7 @@ android {
|
|||||||
maxHeapSize "8g"
|
maxHeapSize "8g"
|
||||||
maxParallelForks availableProcessors // The CI bot has 8 CPUs.
|
maxParallelForks availableProcessors // The CI bot has 8 CPUs.
|
||||||
testLogging {
|
testLogging {
|
||||||
events "passed", "skipped", "failed", "standardOut", "standardError"
|
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
|
||||||
exceptionFormat "full"
|
exceptionFormat "full"
|
||||||
showStackTraces true
|
showStackTraces true
|
||||||
showStandardStreams true
|
showStandardStreams true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user