-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 testing' page issue #5552
Comments
@johnpryan, can you address this? Thx! |
Hi @neiljaywarner, yes you can share code that uses You could add a file somewhere in your package (e.g. import 'package:flutter_test/flutter_test.dart';
void checkForLocationString(WidgetTester tester) {
await tester.pumpAndSettle();
expect(find.text('Getting location...'), findsOneWidget);
} Then you could import that file in your widget test file and integration test file using a Hope this helps! |
It kinda feels like you are modifying the SUT. Does the release build process "just work" to keep it out of the final ipa and apk |
Yes, any unused code will be tree shaken at build time. You could move the shared test code into different package if you prefer. |
@johnpryan @sfshaza2 thank you |
Page URL: https://flutter.dev/docs/testing/integration-tests/
Page source: https://github.com/flutter/website/tree/master/src/docs/testing/integration-tests/index.md
Feature Request
Since widget and integration tests have the same API now, how do we make a directory of shared code? Seems like this would be a common request? Or maybe it's too simple, but still, documentation is so good..
https://stackoverflow.com/questions/66824928/how-do-i-make-a-shared-directory-to-share-code-in-flutter-between-integration-te
The text was updated successfully, but these errors were encountered: