Questions tagged [flutter-integration-test]

Use this tag for questions about the Flutter integration_test package, used to write and run integration tests (end-to-end/GUI tests).

137 questions
4
votes
2 answers

How to locate multiple widget of same type in widget hierarchy?

I am developing some intregration tests for one of my flutter-web application. I wanted to specifically locate the container(width: 50, height: 50) in the following below widget hierarchy tree considering top to bottom approach. ParentWidget --> Row…
Rajesh Patil
  • 181
  • 2
  • 10
4
votes
2 answers

How to specify build variant while running integration test?

I need to run my app with build variants config. Like this flutter run --flavor dev I've added some integration_tests, for running those I tried to use this command flutter test integration_test/login_test.dart How can I specify my build variants…
4
votes
0 answers

Migrating from Flutter_driver to integration_test package

I am working on migrating from flutter_driver to integration_test package as this page indicates: https://flutter.dev/docs/testing/integration-tests But I find the process of writing tests with integration_test package (…
4
votes
2 answers

How to pass parameters into flutter integration_test?

I used flutter_driver before for integration tests and was able to insert parameters to the test via environment variables from the host, as the test was running from the host. For another project I am now using the integration_test package. The…
Bob
  • 376
  • 3
  • 18
4
votes
1 answer

Hit the the enter/done/return button in Flutter integration test after enter a text

await tester.enterText(mySearchField, 'my search text'); await tester.showKeyboard(mySearchField); await tester.sendKeyDownEvent(LogicalKeyboardKey.enter); // do something to wait for 2 seconds await tester.pumpAndSettle(); await…
3
votes
0 answers

How to ignore the exception in flutter integration test & continue the test execution

I'm getting FirebaseException is CAUGHT BY FLUTTER TEST FRAMEWORK, while flutter integration test is being run.! Can anybody help in understading how to ignore the FirebaseException in integration test and continue the rest of execution? I tried…
3
votes
1 answer

Flutter: How to use dart-define variables in gradle scripts

While creating integration tests for a flutter app, how to pass a dart-define variables via gradle scripts. From Flutter documentation, in order to build an instrumentation test apk (and later to upload it to Firebase test lab and test), we need to…
krishnakumarcn
  • 3,959
  • 6
  • 39
  • 69
3
votes
2 answers

How to run multiple tests with flutter - Integration Test

working with tests in flutter and with the new integration tests package didn't find anything that could help me. My problem is that I need to run several tests, but when the first test ends or the second test fails, because when the test ends, the…
3
votes
2 answers

How can we generate json report for integration tests in Flutter?

I am writing integration tests with Flutter's new integartion-test package. The tests are executing fine using flutter drive command but it does not give me any json report. flutter test --machine is not working for integration tests. I want to…
3
votes
0 answers

I can't target the Google Login for integration testing

Currently I'm trying to build out the integration testing for an app that someone else built. I'm stuck with the Google sign in. Specifically, the integration testing can't find the Google pop-up page. Is there any way to use integration testing…
3
votes
1 answer

How do I make a shared directory to share code in flutter between integration tests and widget tests?

How do i create a directory of shared code between Integration tests and Widget tests in flutter? There could be quite a bit of it since they use the same API now as of the new official in Android native you can do the below in order to have code…
nAndroid
  • 862
  • 1
  • 10
  • 25
2
votes
1 answer

Using patrol test package for google sign in during integration test error

I am unable to select the particular email for google sign-in for testing this is the error that im facing. _AssertionError ('package:patrol/src/custom_finders/patrol_tester.dart': Failed assertion: line 131 pos 7: 'nativeAutomator != null':…
2
votes
1 answer

How to reinstall the app between every testWidgets in Flutter integration test?

In Flutter integration tests, is there any way we can kill the app & reinstall it for every testWidgets? void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); testWidgets('TC_01 Home page validation', (tester) async { …
2
votes
0 answers

Flutter integration test Binding Error - overrode FlutterError.onError

I tried to create a test for my flutter app with integration_test. There is some error when i tried to run the test. Here's the error on the terminal: 'package:flutter_test/src/binding.dart': Failed assertion: line 810 pos 14:…
Kim San
  • 575
  • 7
  • 22
2
votes
0 answers

Multiple testWidgets tests are not working in flutter integration test

I'm using google flutter integration driver to automate the flutter mobile app. I want to write multiple widgetTests in a single main_test.dart file. First test is running successfully, but when second test starts i see Test starting...(attached…
Jagadeesh
  • 358
  • 5
  • 17
1
2
3
9 10