-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Closed
Copy link
Labels
f: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-macosOwned by the macOS platform teamOwned by the macOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Steps to reproduce
- create a dummy project
- add below to dev_dependencies.
integration_test:
sdk: flutter
- create a file
application_test.dartunder a folderintegration_testwith the following contents:
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:integration_test_example/main.dart';
void main () {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
group("end-to-end test", () {
testWidgets("tap on the floating action button, verify counter", (tester) async {
await tester.pumpWidget(const MyApp());
// Verify the counter starts at 0.
expect(find.text('0'), findsOneWidget);
// Finds the floating action button to tap on.
final fab = find.byKey(const ValueKey('increment'));
// Emulate a tap on the floating action button.
await tester.tap(fab);
// Trigger a frame.
await tester.pumpAndSettle();
// Verify the counter increments by 1.
expect(find.text('1'), findsOneWidget);
});
});
}
- run the tests.
Background Information
What i have found out, is that even when starting the application main.dart, i get this error:
Building macOS application...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006021-001C71C82243C01E, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006021-001C71C82243C01E, name:My Mac }
building file list ... done
deleting App.framework/Versions/A/_CodeSignature/CodeResources
deleting App.framework/Versions/A/_CodeSignature/
App.framework/Versions/A/
App.framework/Versions/A/App
sent 17470 bytes received 48 bytes 35036.00 bytes/sec
total size is 50571904 speedup is 2886.85
building file list ... done
FlutterMacOS.framework/Versions/A/
FlutterMacOS.framework/Versions/A/FlutterMacOS
FlutterMacOS.framework/Versions/A/_CodeSignature/CodeResources
sent 52269084 bytes received 70 bytes 104538308.00 bytes/sec
total size is 53041798 speedup is 1.01
/Users/amaita/Workspace/private/integration_test_example/build/macos/Build/Products/Debug/integration_test_example.app/Contents/Frameworks/App.framework/App: replacing existing signature
/Users/amaita/Workspace/private/integration_test_example/build/macos/Build/Products/Debug/integration_test_example.app/Contents/Frameworks/App.framework/App: signed bundle with Mach-O thin (arm64) [io.flutter.flutter.app]
/Users/amaita/Workspace/private/integration_test_example/build/macos/Build/Products/Debug/integration_test_example.app/Contents/Frameworks/FlutterMacOS.framework/FlutterMacOS: replacing existing signature
/Users/amaita/Workspace/private/integration_test_example/build/macos/Build/Products/Debug/integration_test_example.app/Contents/Frameworks/FlutterMacOS.framework/FlutterMacOS: signed bundle with Mach-O universal (arm64) [io.flutter.flutter-macos]
building file list ... done
sent 73 bytes received 20 bytes 62.00 bytes/sec
total size is 0 speedup is 0.00
/Users/amaita/Workspace/private/integration_test_example/build/macos/Build/Products/Debug/integration_test_example.app/Contents/Frameworks/*.framework: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **
Error: Build process failed
a quick google search, brought me to some checkboxes in XCode:

When these 2 checkboxes are active, the application builds without problems. However, the integration tests still dont run, but just start the application without actually running the tests.
Expected results
It is expected, that the integration tests start running and assert my expect(find.text('1'), findsOneWidget);for example.
Actual results
When the Checkboxes are set (as described in background information) the tests just start the application without acutally running the tests.
When the Checkboxes are not set, the tests fail to run with the following message, and gets stuck:

Code sample
Code sample
[Paste your code here]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.24.0, on macOS 14.6.1 23G93 darwin-arm64, locale en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.4)
[✓] IntelliJ IDEA Community Edition (version 2023.3.2)
[✓] VS Code (version 1.90.2)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
TomKrauss and mono0926
Metadata
Metadata
Assignees
Labels
f: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-macosOwned by the macOS platform teamOwned by the macOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.