Use this tag for questions about the Flutter integration_test package, used to write and run integration tests (end-to-end/GUI tests).
Questions tagged [flutter-integration-test]
137 questions
17
votes
5 answers
how to restore FlutterError.onError?
In my app, I record the flutter onError to crashalytics,
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
While running the integration test, if some exceptions happens I get the below statement in the console and the test…

MeanMan
- 1,040
- 10
- 25
9
votes
1 answer
How to interact with native UI elements from flutter integration_test?
I am trying to do an automated testing of the user flow in a flutter app. For this I am using flutter integration test package (https://flutter.dev/docs/testing/integration-tests). I have written tests using integration_test package. Though…

Karan Ajith
- 91
- 3
9
votes
3 answers
Flutter integration test firebase auth (email link or google sign in)
I'm adding integration testing (using the integration_test package) to my app but I am running into a problem.
Let me explain. The first step when my app launch is authentication for which I have 3 options: firebase email link, firebase google sign…

Théo Champion
- 1,701
- 1
- 21
- 46
8
votes
0 answers
How to generate test golden files from Integration test in Flutter
Is it possible to generate test golden files(images) when running an integration test in Flutter?
I'm able to generate the golden files when I run flutter test --update-goldens which happens not to run the integration test.
My main aim is being able…

Joshua Erinosho
- 212
- 2
- 9
8
votes
2 answers
How to wait until the Finder is visible for next code execution in Flutter integration test?
Information:
I have created a sample Flutter unit test to test the login screen where I have email & password as input field and a login button.
Requirement:
Need to test false cases and for that, I have written code as per the below steps.
Open…

Patel Pinkal
- 8,984
- 4
- 28
- 50
7
votes
3 answers
How to automate testing of Flutter application on Linux-Desktop via Github Actions CI
We want to make our integration tests work on Linux desktop (ubuntu-latest) via Github Actions.
The command is
flutter config --enable-linux-desktop
flutter test -d linux integration_test
But we always get an error:
Error waiting for a debug…

User Rebo
- 3,056
- 25
- 30
6
votes
1 answer
Flutter integration test - Failed to stop the app - only on iOS
I am doing an integration test for my app on both simulators android and iOS
the android one finish like expected All tests passed and application stopped
but the iOS one finish testing and all Tests passed but finish with error "Failed to stop…

Ahmed Morra
- 129
- 10
6
votes
2 answers
How do you combine two Finders in a Flutter widget test?
Using package:flutter_test, I can create a finder that finds widgets with a key:
expect(find.byKey(const ValueKey('counter')), findsOneWidget);
or by text:
expect(find.text('0'), findsOneWidget);
I can also find widgets descending from this…

John Ryan
- 230
- 2
- 11
6
votes
1 answer
Which is the best approach for testing Flutter Apps
I'm working for a Flutter App which relies on an API. We are thinking about a testing strategy and we would like to know which should be the best approach.
According to their documentation ( https://flutter.dev/docs/testing ) they have 3 levels of…

Tomás Wonderfurt
- 127
- 5
6
votes
2 answers
Finding a widget inside of a CustomScrollView in Flutter test
I have encountered an error when trying to test my Flutter App. I have a custom widget that is at the bottom (out of the first viewport) of a CustomScrollView widget. In my test, I want to verify that it is actually there.
I have already tried to…

Matteo
- 179
- 1
- 8
5
votes
0 answers
Flutter integration_test - add --flavor argument in VS Code
I have a suite of integration tests for a Flutter app. I would like to run them using the VS Code Testing tab, so that I can easily see info about what tests passed/failed, etc.
This worked fine before we implemented flavors. Now that flavors are…

Luke Morse
- 395
- 2
- 12
5
votes
1 answer
How to wait until a widget gets loaded in flutter integration test?
Is there any way in flutter integration test keeping wait until a widget gets loaded completely?
Like waiting until the home page is loaded after finishing the splash screen?

Jagadeesh
- 358
- 5
- 17
5
votes
1 answer
Is there is any way to capture print() statement during integration test
Is there is any way during the integration testing to monitor or save or read whatever the print() statement is printing to the console. I m using integration_test for testing.

Nikhil Soni
- 51
- 2
5
votes
1 answer
Hot reload for Flutter integration test?
I have setted up Flutter Integration Testing on my project as defined here: https://flutter.dev/docs/testing/integration-tests
I used the following devDepencendies:
integration_test: ^1.0.0
flutter_test:
sdk: flutter
flutter_driver:
sdk:…

Christopher
- 9,682
- 7
- 47
- 76
4
votes
0 answers
a single app.main() in flutter; How to run all tests using method?
I'm trying to write an integration test for my Flutter app
I don't want to call the app.main() method over and over for each test
a single app.main() in flutter; How to run all tests using method?
group('Test', () {
testWidgets('Test 1',…

gulss
- 41
- 3