Add VMServiceTest with a simple test project. - #9052
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request registers a new integration test task in Gradle and introduces VmServiceTest, which verifies that the IDE can establish a WebSocket connection and exchange messages with the Dart VM service during a paused flutter test run. The feedback suggests utilizing SystemInfo.isWindows from the IntelliJ Platform SDK for OS checks and refactoring the SDK home resolution in Kotlin to prefer immutable val over mutable var declarations.
0d5e337 to
316baea
Compare
Update findFlutterSdkHome to use val
| maxHeapSize = "4g" | ||
|
|
||
| systemProperty("path.to.build.plugin", buildPlugin.get().archiveFile.get().asFile.absolutePath) | ||
| systemProperty("idea.home.path", providers.provider { |
There was a problem hiding this comment.
Does this break the tests? Do you know why?
There was a problem hiding this comment.
intellijPlatformTesting.testIde.register("integration") provides the value for "idea.home.path". So it's not needed.
|
CC @pq |
Summary
Adds VmServiceTest, an integration test that launches a paused Flutter test process using machine output, extracts its VM Service URI, connects over WebSocket, and verifies three request/response exchanges:
How to run
The test requires a Flutter SDK. Set FLUTTER_ROOT or FLUTTER_SDK to the SDK directory.
From the command line:
FLUTTER_ROOT=/path/to/flutter ./gradlew integration
--tests "io.flutter.integrationTest.vmService.VmServiceTest"
In the IDE, run the class as a JUnit test after adding FLUTTER_ROOT to the run configuration’s environment variables. The test is skipped when no Flutter SDK is configured.