-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[integration_test] IntegrationTestWidgetsFlutterBinding reportData won't allow for "Array of Objects" JSON because it is Map #74324
Labels
a: tests
"flutter test", flutter_test, or one of our tests
f: integration_test
The flutter/packages/integration_test plugin
found in release: 3.3
Found to occur in 3.3
found in release: 3.7
Found to occur in 3.7
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Comments
flutter doctor -v
|
darshankawar
added
p: first party
f: integration_test
The flutter/packages/integration_test plugin
found in release: 1.26
Found to occur in 1.26
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
labels
Jan 21, 2021
stuartmorgan
added
a: tests
"flutter test", flutter_test, or one of our tests
and removed
plugin
labels
Mar 15, 2021
darshankawar
added
the
framework
flutter/packages/flutter repository. See also f: labels.
label
Apr 26, 2022
Piinks
removed
the
framework
flutter/packages/flutter repository. See also f: labels.
label
Jun 16, 2022
Reproducible as of latest master 3.7 also fails when running without flutter driver logsmahesh@Maheshs-MacBook-Air-M1 example % flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/example_test.dart --no-dds
Could not load custom device from config index 0: Expected enabled to be a boolean.
Running "flutter pub get" in example...
Resolving dependencies...
archive 3.3.2 (3.3.5 available)
pedantic 1.11.1 (discontinued replaced by lints)
Got dependencies!
Multiple devices found:
sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm64
Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.124
[1]: sdk gphone arm64 (emulator-5554)
[2]: iPhone 12 Pro (026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4)
[3]: macOS (macos)
[4]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 1
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Running Gradle task 'assembleDebug'... 7.7s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk... 1,037ms
I/on_test_exampl( 6901): Background young concurrent copying GC freed 90844(4838KB) AllocSpace objects, 3(60KB) LOS
objects, 92% free, 2013KB/25MB, paused 9.851ms total 49.400ms
VMServiceFlutterDriver: Connecting to Flutter application at http://127.0.0.1:64683/6URaWa8n2zU=/
VMServiceFlutterDriver: Isolate found with number: 693438423231835
VMServiceFlutterDriver: Isolate is paused at start.
VMServiceFlutterDriver: Attempting to resume isolate
I/flutter ( 6901): 00:00 +0: verify text
VMServiceFlutterDriver: Connected to Flutter application.
I/flutter ( 6901): 00:01 +1: failure 2
I/flutter ( 6901): ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
I/flutter ( 6901): The following _TypeError was thrown running a test:
I/flutter ( 6901): type 'List<Map<String, int>>' is not a subtype of type 'Map<String, dynamic>?' of ' in type cast'
I/flutter ( 6901):
I/flutter ( 6901): When the exception was thrown, this was the stack:
I/flutter ( 6901): #0 main.<anonymous closure>
(file:///Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/_example_test_io.dar
t:48:7)
I/flutter ( 6901): #1 testWidgets.<anonymous closure>.<anonymous closure>
(package:flutter_test/src/widget_tester.dart:171:29)
I/flutter ( 6901): <asynchronous suspension>
I/flutter ( 6901): #2 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:935:5)
I/flutter ( 6901): <asynchronous suspension>
I/flutter ( 6901):
I/flutter ( 6901): The test description was:
I/flutter ( 6901): failure 2
I/flutter ( 6901): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 6901): 00:01 +1: failure 2 [E]
I/flutter ( 6901): Test failed. See exception logs above.
I/flutter ( 6901): The test description was: failure 2
I/flutter ( 6901):
I/flutter ( 6901): 00:01 +1 -1: (tearDownAll)
I/flutter ( 6901): 00:02 +2 -1: Some tests failed.
Failure Details:
Failure in method: failure 2
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following _TypeError was thrown running a test:
type 'List<Map<String, int>>' is not a subtype of type
'Map<String, dynamic>?' of ' in type cast'
When the exception was thrown, this was the stack:
#0 main.<anonymous closure> (file:///Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/_example_test_io.dart:48:7)
#1 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:171:29)
<asynchronous suspension>
#2 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:935:5)
<asynchronous suspension>
The test description was:
failure 2
═════════════════════════════════════════════════════════════════
end of failure 1
mahesh@Maheshs-MacBook-Air-M1 example % logs `flutter test integration_test`mahesh@Maheshs-MacBook-Air-M1 example % flutterm test integration_test
Could not load custom device from config index 0: Expected enabled to be a boolean.
Running "flutter pub get" in example...
Resolving dependencies...
archive 3.3.2 (3.3.5 available)
pedantic 1.11.1 (discontinued replaced by lints)
Got dependencies!
Multiple devices found:
sdk gphone arm64 (mobile) • emulator-5554 • android-arm64 • Android 11 (API 30) (emulator)
iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.124
[1]: sdk gphone arm64 (emulator-5554)
[2]: iPhone 12 Pro (026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4)
[3]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 1
00:00 +0: ...hesh/Development/flutter_master/packages/integration_test/example/integration_test/extended_test.dart R
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
00:16 +0: ...hesh/Development/flutter_master/packages/integration_test/example/integration_test/extended_test.d 16.5s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
00:17 +0: ...hesh/Development/flutter_master/packages/integration_test/example/integration_test/extended_test.dart Installing build/app/outputs/flutter-apk/app-debug.apk... 645ms
00:21 +2: ...ahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.dart R
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: Errors limit exceeded. To receive all errors set com.sun.xml.bind logger to FINEST level.
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
00:33 +2: ...ahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.d 11.7s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
00:34 +2: ...ahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.dart I00:35 +2: ...ahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.d 1,382ms
00:38 +3: /Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.dart: failure 2
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following _TypeError was thrown running a test:
type 'List<Map<String, int>>' is not a subtype of type 'Map<String, dynamic>?' of ' in type cast'
When the exception was thrown, this was the stack:
#0 main.<anonymous closure> (file:///Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/_example_test_io.dart:48:7)
#1 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:171:29)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)
The test description was:
failure 2
════════════════════════════════════════════════════════════════════════════════════════════════════
00:38 +3 -1: /Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.dart: failure 2 [E]
Test failed. See exception logs above.
The test description was: failure 2
To run this test again: /Users/mahesh/Development/flutter_master/bin/cache/dart-sdk/bin/dart test /Users/mahesh/Development/flutter_master/packages/integration_test/example/integration_test/example_test.dart -p vm --plain-name 'failure 2'
00:39 +3 -1: Some tests failed.
mahesh@Maheshs-MacBook-Air-M1 example % flutter doctor -v (mac)
|
maheshmnj
added
found in release: 3.3
Found to occur in 3.3
found in release: 3.7
Found to occur in 3.7
and removed
found in release: 1.26
Found to occur in 1.26
labels
Dec 28, 2022
goderbauer
added
P3
Issues that are less important to the Flutter project
triaged-framework
Triaged by Framework team
labels
Jul 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: tests
"flutter test", flutter_test, or one of our tests
f: integration_test
The flutter/packages/integration_test plugin
found in release: 3.3
Found to occur in 3.3
found in release: 3.7
Found to occur in 3.7
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
P3
Issues that are less important to the Flutter project
team-framework
Owned by Framework team
triaged-framework
Triaged by Framework team
Steps to Reproduce
and integration_test.dart:
to
Expected results: On step 2 there is File created in folder integration_test/gherkin/reports with JSON parsed contents of reportData. On step 4 - same result.
Actual results: On step 2 everything is fine, but on step 4 tests will fail - not surprisingly, because static analysis showed us that reportData is typed as Map<String, dynamic>, while JSON allows for Arrays too.
Why it is important: cucumber JSON format is actually an Array of Objects, so you can't use testing framework to generate correct JSON.
By the way, I have a fix for this in this commit: vrnvorona/plugins@efa7dfa
Logs
The text was updated successfully, but these errors were encountered: