Repository: flutter
Issue: Dart test groups are removed when running tests with `integration_test` natively
Labels: platform-android,framework,f: integration_test,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-android,triaged-android

## Steps to reproduce

1. Clone the [bartekpacia/flutter_integration_test_duration_bug](https://github.com/bartekpacia/flutter_integration_test_groups_bug) repository. This is a default counter app slightly modified by me to demonstrate this problem. `cd` to the cloned repository.
3. `$ flutter pub get`
4. `$ cd android`
5. Run Flutter integration test natively:
     
    ```console
    $ ./gradlew app:connectedDebugAndroidTest -Ptarget=$(pwd)/../integration_test/app_test.dart`
    ```

8. Open the test summary generated by Gradle:

    ```
    $ open ../build/app/reports/androidTests/connected/index.html
    ```

The same problem occurs when running tests on iOS. Refer to [integration_test's README](https://github.com/flutter/flutter/tree/master/packages/integration_test) to learn how to run tests on iOS.

**Expected results:** <!-- what did you want to see? -->

I expect test groups to be taken into account, both in test name and structurally. So, since the test looks like this:

```dart
void main() {
  group('Counter', () {
    testWidgets(
      'is incremented when plus button is tapped',
      (WidgetTester tester) async { /* ... */ },
    );

    testWidgets(
      'is decremented when minus button is tapped',
      (WidgetTester tester) async { /* ... */ },
    );
  });
```

I expect the test cases to have names like:

```
- Counter is incremented when plus button is tapped
- Counter is decremented when minus button is tapped
```

**Actual results**

Calling `group()` doesn't have any effect:

![Screenshot 2022-12-20 at 1 25 14 PM](https://user-images.githubusercontent.com/40357511/208666752-e7473bd1-41cf-4077-9c88-30a3af39348d.png)

This also occurs when importing the `test-results.pb` file in Android Studio using `Run > Import Tests from File...`:

![Screenshot 2022-12-20 at 1 30 57 PM](https://user-images.githubusercontent.com/40357511/208667850-ad2d0c3a-f25e-4422-a140-db62a37d34e1.png)

The perfect solution would not only concatenate groups and test case, but would also preserve the structure (so that e.g in the Android Studio test viewer we could expand and hide individual groups).

This is somewhat related to #117386.

<details>
  <summary>Logs</summary>

```
$ ./gradlew app:connectedDebugAndroidTest -Ptarget=$(pwd)/../integration_test/app_test.dart

> Task :app:compressDebugAssets
Execution optimizations have been disabled for task ':app:compressDebugAssets' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/bartek/dev/random/flutter_integration_test_duration_bug/build/app/intermediates/assets/debug/mergeDebugAssets'. Reason: Task ':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:connectedDebugAndroidTest
Starting 1 tests on Pixel_4_API_31(AVD) - 12

Test results saved as file:/Users/bartek/dev/random/flutter_integration_test_duration_bug/build/app/outputs/androidTest-results/connected/Pixel_4_API_31(AVD)%20-%2012/test-result.pb. Inspect these results in Android Studio by selecting Run > Import Tests From File from the menu bar and importing test-result.pb.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 16s
76 actionable tasks: 5 executed, 71 up-to-date
```
```
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.0.1 22A400 darwin-arm, locale en-PL)
    • Flutter version 3.3.10 on channel stable at /Users/bartek/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (5 days ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/bartek/androidsdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/bartek/androidsdk
    • Java binary at: /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3)
    • IntelliJ at /Users/bartek/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 71.1.6
    • Dart plugin version 223.7571.203

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3)
    • IntelliJ at /Users/bartek/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.7571.182/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.74.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.54.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 12 (API 31) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>