You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Showing AOSP on IA Emulator logs:
I/flutter (14063): The Dart VM service is listening on http://127.0.0.1:36961/xFrDspOIlCo=/
I/flutter (14063): Patrol (native): initialize() started
I/flutter (14063): Patrol (native): initialize() succeeded
I/flutter (14063): 00:00 +0: patrol_test_explorer
I/flutter (14063): patrol_test_explorer: obtained Dart-side test hierarchy:
I/flutter (14063): -- group: ''
I/flutter (14063): -- group: 'counter state is the same after going to home and switching apps'
I/flutter (14063): PatrolAppService started, address: 0.0.0.0, host: 0.0.0.0, port: 8082
I/flutter (14063): Patrol (native): markPatrolAppServiceReady() started
I/flutter (14063): 00:00 +1: example_test (setUpAll)
I/flutter (14063): setUpAll - calling API
I/flutter (14063): 00:00 +2: example_test counter state is the same after going to home and switching apps
I/flutter (14063): Patrol (native): markPatrolAppServiceReady() succeeded
I/flutter (14063): PatrolAppService: registered "example_test counter state is the same after going to home and switching apps"
I/flutter (14063): PatrolAppService.listDartTests() called
I/flutter (14063): 2023-11-14T11:52:21.522605 0:00:00.012473 GET [200] /listDartTests
I/flutter (14169): The Dart VM service is listening on http://127.0.0.1:34604/8gRA3FjS6a0=/
I/flutter (14169): Patrol (native): initialize() started
I/flutter (14169): Patrol (native): initialize() succeeded
I/flutter (14169): 00:00 +0: patrol_test_explorer
I/flutter (14169): patrol_test_explorer: obtained Dart-side test hierarchy:
I/flutter (14169): -- group: ''
I/flutter (14169): -- group: 'counter state is the same after going to home and switching apps'
I/flutter (14169): PatrolAppService started, address: 0.0.0.0, host: 0.0.0.0, port: 8082
I/flutter (14169): Patrol (native): markPatrolAppServiceReady() started
I/flutter (14169): 00:00 +1: example_test (setUpAll)
I/flutter (14169): setUpAll - calling API
I/flutter (14169): 00:00 +2: example_test counter state is the same after going to home and switching apps
I/flutter (14169): Patrol (native): markPatrolAppServiceReady() succeeded
I/flutter (14169): PatrolAppService: registered "example_test counter state is the same after going to home and switching apps"
I/flutter (14169): PatrolAppService.listDartTests() called
I/flutter (14169): 2023-11-14T11:52:25.378652 0:00:00.006766 GET [200] /listDartTests
I/flutter (14169): PatrolAppService.runDartTest(example_test counter state is the same after going to home and switching apps) called
I/flutter (14169): PatrolAppService: requested execution of test "example_test counter state is the same after going to home and switching apps"
I/flutter (14169): Patrol (native): configure() started
I/flutter (14169): Patrol (native): configure() succeeded
I/flutter (14169): Patrol (native): pressHome() started
I/flutter (14169): Patrol (native): pressHome() succeeded
I/flutter (14169): PatrolBinding: tearDown(): count: 1, results: {counter state is the same after going to home and switching apps: success}
I/flutter (14169): PatrolBinding: finished test example_test counter state is the same after going to home and switching apps. Will report its status back to the native side
I/flutter (14169): PatrolBinding: tearDown(): test "counter state is the same after going to home and switching apps" in group "example_test counter state is the same after going to home and switching apps", passed: true
I/flutter (14169): PatrolAppService.markDartTestAsCompleted(): example_test counter state is the same after going to home and switching apps
I/flutter (14169): 2023-11-14T11:52:25.474498 0:00:02.399937 POST [200] /runDartTest
I/flutter (14169): 00:02 +3: example_test (tearDownAll)
I/flutter (14169): 00:02 +4: (tearDownAll)
I/flutter (14169): 00:02 +5: All tests passed!
Patrol CLI version: 2.2.1
Program adb found in /Users/haomun//Library/Android/sdk/platform-tools/adb
Env var $ANDROID_HOME is not set
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /usr/local/bin/ideviceinstaller
Flutter Doctor output
Flutter Doctor output
[✓] Flutter (Channel stable, 3.13.8, on macOS 14.0 23A344 darwin-x64, locale en-MY)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] IntelliJ IDEA Community Edition (version 2022.3)
[✓] VS Code (version 1.83.1)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
The text was updated successfully, but these errors were encountered:
Hi, Patrol doesn't work with setUpAll (and setUp and tearDown and tearDownAll) from package:flutter_test/package:test. That's because of how our native test bundling feature is implemented. For more details, see #1341.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.
Steps to reproduce
The patrol test code is as follows:
Actual results
IS: 'setUpAll' being invoked twice
SHOULD: 'setUpAll' being invoked only once as per the doc: https://api.flutter.dev/flutter/flutter_test/setUpAll.html
See the flutter logs:
Logs
Logs
Patrol version
patrol ^2.3.1
Patrol Doctor output
Patrol Doctor output
Flutter Doctor output
Flutter Doctor output
The text was updated successfully, but these errors were encountered: