Repository navigation
integration_test_driver and integration_test_driver_extended #128381
Copy link
Copy link
Closed as not planned
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamr: timeoutIssue is closed due to author not providing the requested details in timeIssue is closed due to author not providing the requested details in timewaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- run integration test with integration_test_driver_extended
- screenshot could generated as expect.
Expected results
integration test result integration_response_data.json should be able to generated.
Actual results
integration_response_data only printed in console, no json file is generated.
Code sample
Code sample
import 'dart:io';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:integration_test/integration_test_driver_extended.dart';
DriverLogCallback logDriverMessages = (String source, String message) {
final msg = '$source: $message';
if (message.toLowerCase().contains('error')) {
stderr.writeln(msg);
} else {
stdout.writeln(msg);
}
};
Future<void> main() async {
driverLog = logDriverMessages;
try {
await integrationDriver(
onScreenshot: (String screenshotName, List<int> screenshotBytes, [Map<String, Object?>? args]) async {
print('screenshot: $screenshotName');
final File image =
await File('$screenshotName').create(recursive: true);
image.writeAsBytesSync(screenshotBytes);
return true;
},
);
// ignore: avoid_catches_without_on_clauses
} catch (e) {
print('Error occurred in Driver: $e');
}
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.10.3, on macOS 12.4 21F79 darwin-x64, locale en-CN)
! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/2.17.6/libexec/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/clin/fvm/versions/stable. Consider adding /Users/clin/fvm/versions/stable/bin
to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] Connected device (2 available)
[✓] Network resources
! Doctor found issues in 2 categories.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamr: timeoutIssue is closed due to author not providing the requested details in timeIssue is closed due to author not providing the requested details in timewaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Activity
huycozy commentedon Jun 7, 2023
Hi @linchen2chris, which platform are you facing this issue on?
And I see your sample code still has a casting error. The
onScreenshotcallback is different now:Please update to make it runnable. Thank you!
linchen2chris commentedon Jun 7, 2023
updated
huycozy commentedon Jun 7, 2023
Thanks, I check this on Android but it doesn't seem to work:
Can you also share the detailed steps to reproduce this? And which platform are you working on this?
github-actions commentedon Jun 28, 2023
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Jul 12, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.