Automate your Testing on Devices with Flutter Integration Testing

  Рет қаралды 49,928

Flutter Explained

Flutter Explained

Күн бұрын

Пікірлер: 114
@nils.reichardt
@nils.reichardt 3 жыл бұрын
Update: The integration_test package moved into the Flutter SDK (with Flutter 2.0). You should not use "integration_test: ^1.0.2+3" anymore. Use instead: dev_dependencies: integration_test: sdk: flutter
@marh122
@marh122 2 жыл бұрын
should have noticed your comment earlier, it would save me around hour
@andreisas1621
@andreisas1621 Жыл бұрын
On VSCode i use pubspec assist extension that adds the most recent dependency version and runs flutter pub get also, check it out
@ronny-if7ms
@ronny-if7ms 3 жыл бұрын
Great video! Please make a complete series on integration testing of flutter apps there are lot of QA folks struggling with this and there is nothing on this topic 🙏🙏
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi Ronny, sounds like a fantastic idea. What would you like to see covered in such an Integration Test Series?
@ronny-if7ms
@ronny-if7ms 3 жыл бұрын
@Flutter Explained complete E2E integration test suit 1. OTP sign up 2. Smoke test 3. Test cases for switching between web browser and App 4. CI/CD 5. Report 6. Parallel execution using firebase test lab or AWS device farm 7. UI data validation with Api response Appium for flutter apps(I guess appium dosent support flutters but if u can cover this topic) A course specially for QA folks will be great and there is no content on these topics
@ronny-if7ms
@ronny-if7ms 3 жыл бұрын
Thanks a lot for replying!
@ronny-if7ms
@ronny-if7ms 3 жыл бұрын
And if possible please cover flutter gherkin aswell.
@BrunoCodeman
@BrunoCodeman 3 жыл бұрын
I could expect learning sociology from Max Weber, but I never thought I would learn flutter from Max Weber.
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Yeah the world is a small place and my namesake is everywhere :D
@KraasRas
@KraasRas 3 жыл бұрын
Thank you for this good tutorial. I have two questions: 1. I want to take a screenshot of the current frame, if a test fails. How could I do that? 2. What is the difference, doing integration tests with the 'package:integration_test/integration_test.dart' + 'package:flutter_test/flutter_test.dart'; vs. 'package:flutter_driver/flutter_driver.dart'; + 'package:test/test.dart';?
@FlutterExplained
@FlutterExplained 3 жыл бұрын
If you are interested in more testin videos, checkout the Testing Series Playlist: kzbin.info/aero/PLq83k-ITj6lSISMo6JOGkcOBcio_zEeAB
@mdshihabuddin129
@mdshihabuddin129 Жыл бұрын
The playlist not exists!!
@FlutterExplained
@FlutterExplained Жыл бұрын
@@mdshihabuddin129 Thank you for letting me know, I renamed it and probably it lost track, I will update the link right away.
@andreisas1621
@andreisas1621 Жыл бұрын
Great great great tutorial. Very clear and comprehensive explanation, thank you!
@FlutterExplained
@FlutterExplained Жыл бұрын
Thanks for your fantastic feedback!
@vijaybabaria3253
@vijaybabaria3253 2 жыл бұрын
Awesome tutorial, thanks for sharing and hope to see more on integration videos.
@mannembhavya4872
@mannembhavya4872 3 жыл бұрын
Thank you for the nice explanation on flutter integration testing. Could you please make video on how to inject a mock client in integration testing. In the example you have shown, we know the flow but in some apps it all depends on the response of the app. Please make a video on injecting Client and testing with that.
@Eileen-in-the-coding-maschine
@Eileen-in-the-coding-maschine 3 ай бұрын
Thanks for the video! Are you using AndroidStudio? Which plugins would you suggest to use for a beginner?
@johngod35
@johngod35 3 жыл бұрын
fucking awesome, thank you so much for this flutter testing tutorial series
@ivanyoed
@ivanyoed 2 жыл бұрын
You produce excellent content Max. Thank you so much.
@robinn1337
@robinn1337 3 жыл бұрын
gutes Video! hab mich schon gefragt, ob du deutsch bist, bei 5:20 war es mir klar :D hast du dich schon mit dem Thema Test-Lab Robo-Test beschäftigt? Finde das Konzept hinter den Monkey Tests richtig geil, sind ja quasi schnelle Integrationstests, um einfach mal bei z.B. größeren oder kleinere strukturellen oder architektonischen Änderungen am Code zu überprüfen, ob alles noch so klappt Tests sind halt teuer und zeitaufwendig... da konnte ich mich mit Unit- und Widget Tests noch nicht so anfreunden. Da haben für den Anfang Integrationstests und evtl. auch Monkey Tests(zukünftig) schon einen besseren Kosten/Nutzen Faktor, oder was denkst du? VG aus Sachsen, Robin
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Danke dir für dein Feedback! Immerhin konnte ich es für 5 minuten verheimlichen :)
@Findmanish09
@Findmanish09 Жыл бұрын
@FlutterExplained Very nicely explained except the thing which I was looking for. At the timestamp 11:59 you mentioned that we can put Key but how to find the exact widget to put key in a fully developed app and we have no idea about it. How to search and reach out to that exact widget to put key..? if you can help me in this.
@FlutterExplained
@FlutterExplained Жыл бұрын
Sure to set a key for a specfic widget you can give the widget the "key" property with a unique key. This tutorial has a minimal setup for this: docs.flutter.dev/cookbook/testing/widget/finders#2-find-a-widget-with-a-specific-key
@iansmith3301
@iansmith3301 3 жыл бұрын
Any tips or ideas on how to do unit testing / integration tests for parts of your app that use voice recognition? :) I've thought about using pre-recorded audio files but I'd need some type of set up that would stream audio through a virtual input. Maybe there's some integration software that has already done this? Bespoken might be an option but it looks pricey.
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi Ian, that is a great question, to be honest this is the first time I have to think about something like that. If you find something in that direction I would be super interested.
@psy8428
@psy8428 3 жыл бұрын
Did you come up with any solution to this?
@OICG
@OICG 3 жыл бұрын
I am loving your videos ❤
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Great that you like them, if I can do something that you like them even more, I am all ears :)
@pedromartin3766
@pedromartin3766 3 жыл бұрын
Hi nice video, thanks :). But, at the end, you mentioned that one thing learned is how to run multiple integration test and it didn't show in the video... could you please give more details about how to do it? thanks
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi you are most welcome, I am glad you like it :). At the last part of the video I explain that. It is not possible to run multiple at once but you can prepare a script that let you run one by one. kzbin.info/www/bejne/jYGopKGAnLxsb68
@frx-michael-widjaja
@frx-michael-widjaja 3 жыл бұрын
Thanks for the video. Btw do you have any suggestion for testing tool which support flutter for black box testing?
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Mhhh sorry, not really.
@iDujii
@iDujii 3 жыл бұрын
So I've been trying to read about UI and Integration testing (specifically for iOS development). I always though these tests were different, but a lot of the integration tests example I see, appear to be what I would call UI testing. So now I'm curious, what is the difference between UI and integration testing?
@FlutterExplained
@FlutterExplained 3 жыл бұрын
At the moment in Flutter there is basically no real difference.
@brightworld7550
@brightworld7550 3 жыл бұрын
Thank you so much for this tutorial, it was very helpful.
@FlutterExplained
@FlutterExplained 3 жыл бұрын
You are most welcome, I am glad that you could use it!
@anatoliipipko7258
@anatoliipipko7258 3 жыл бұрын
Great tutorial! Thanks a lot!
@ivanvotchel1604
@ivanvotchel1604 3 жыл бұрын
Thanks for the video! How i can divide my tests without repeating previous steps? For example, I should always created an account in my app's first step. I wrote tests for this logic, but I want to keep tests for another logic in other files. And I should repeat the creation account in all test files. Is there a solution for this?
@darlinmanuelcasadoperez1092
@darlinmanuelcasadoperez1092 7 ай бұрын
thanks for the video, it was very helpful
@Ajaysharma-ri9xi
@Ajaysharma-ri9xi Жыл бұрын
Thanks a lot for your tutorial, its an awesome tutorial, I have also started with flutter test automation i am struggling to automate the file or image uploading from device automation part do you have any suggestion or help for me ,Thanks in advance!!
@FlutterExplained
@FlutterExplained Жыл бұрын
Hi there, I am glad my video helped you. That is quite a specific use case. Let me see if I can have a look and would directly produce a video for that. It could be that it is to late to answer your question. In general you want probably using a Flutter Integration Testing helper like Patrol in this case because you want to access native elements (the gallery). This video gives a short intro: kzbin.info/www/bejne/aJ-oaKSJjL6snJY patrol.leancode.co/native/overview I hope that helps :)
@anupamaprabhu9819
@anupamaprabhu9819 2 жыл бұрын
Can you please share an example how to select radio button in integration test.
@WilliS1651686868
@WilliS1651686868 3 жыл бұрын
Thank you for this explaination! One question: How we can check all checkboxes instead of only the first one?
@Nithin.Raaj.J
@Nithin.Raaj.J 2 жыл бұрын
find.byType(Checkbox).at(_index); use this to check the specific checkbox
@sarharmiha3184
@sarharmiha3184 5 ай бұрын
thank you
@SEGVeenstra
@SEGVeenstra 3 жыл бұрын
Great video and great explanation, thx! The app I'm working on has to react on getting disconnected from power. I found out that you can use 'adb shell dumpsys battery set ac 0' to simulate it from command line, but I need to be able to do this during the test. Any idea on how to achieve that? Kind regards.
@Robin.Backer
@Robin.Backer Жыл бұрын
How would you work with semantics because sometimes really long name content must be entirely described to avoid duplicated. Especially if this text is a variable
@mahmoudadel1542
@mahmoudadel1542 3 жыл бұрын
Hello, I got this error Target file "\" not found when running flutter drive \ --driver=test_driver/integration_test.dart \ --target=integration_test/app_test.dart \ on the terminal, how can I solve it? I googled it but I couldn't solve it
@FlutterExplained
@FlutterExplained 3 жыл бұрын
It looks like your line breaks are not able to execute \ is only working on mac or windows (not sure which system anymore) therefore it tries to exectue \ which is not a correct target file.
@ahmedadnan5875
@ahmedadnan5875 3 жыл бұрын
it was an awesome tutorial
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Thank you for your feedback, I am happy that you liked it!
@rommelmalqued4580
@rommelmalqued4580 3 жыл бұрын
Great introduction. Question, can the test code and the app being tested live in two separate codebase? Thanks
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Mhhh good question, never tried that.
@rommelmalqued4580
@rommelmalqued4580 3 жыл бұрын
yeah, I'm new to flutter testing and haven't explored it either. Since QAs are responsible for the integration test, it's a little risky if they will be working on the same codebase with the devs. Just wondering.
@kamalakannanmuthu4274
@kamalakannanmuthu4274 3 жыл бұрын
@@rommelmalqued4580 hi i am also new to flutter testing you can help me and clear the doubt
@adbysantos6603
@adbysantos6603 3 жыл бұрын
Good job, sir :D
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Thank you :)
@dhavebarsalote810
@dhavebarsalote810 2 жыл бұрын
what's the use again with integration_test_driver? Can't we run integration_test without it?
@FlutterExplained
@FlutterExplained 2 жыл бұрын
The video is quite outdated and needs a new version. In former times with Flutter 2 I believe you would need it and nowadays you still need it but it is created differently. Checkout the following page to get all the info you need. docs.flutter.dev/cookbook/testing/integration/introduction If you have more questions please let me know :)
@anassa6737
@anassa6737 7 ай бұрын
when i move to next page the testing stop why and not complete the rest of code
@NItaboEstrada
@NItaboEstrada 3 жыл бұрын
Hi, I am trying to test a flutter project, but this project is just web, and when I run the integration testing doesn't works, do you have some recommedation or idea? I really will appreciate it.
@ivanivanov-lu5wm
@ivanivanov-lu5wm 3 жыл бұрын
Thanks for video. Could tell how to get green play icon in .sh file, is it special extension for that? PS I don't have it
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Yep if you work with mac and shell scripts .sh I have the following plugin installed: plugins.jetbrains.com/plugin/13122-shell-script
@saileshverma1942
@saileshverma1942 Жыл бұрын
can u explain how to test out a drop down menu widget used in a form
@kavithap4620
@kavithap4620 3 жыл бұрын
Thanks a lot for this video. Can you upload Advanced flutter automation series?
@pnutalapati
@pnutalapati 2 жыл бұрын
Is there a way, I can down load the source bundle of the demo project ?
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Yes the code should be available in GitHub
@ankara9594
@ankara9594 2 жыл бұрын
How can we change location (latitude , longitude) with this intehration test? And is it possible to test terminated mod background test?
@sandormartin4549
@sandormartin4549 2 жыл бұрын
Thanks for the video. One question. How can we handle the modals that require permissions to use geolocation, camera or any other service of the phone?
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Hi Sandor, thanks for your comment. Honestly I am not sure, sounds like a great topic for a future video. I will look around if I find something I will let you know.
@sandormartin4549
@sandormartin4549 2 жыл бұрын
@@FlutterExplained thanks I will be waiting
@MatthiasSchippling
@MatthiasSchippling 2 жыл бұрын
This is an open issue for the flutter sdk. There are multiple workarounds described in the issue. The one that works for me is this: github.com/flutter/flutter/issues/12561#issuecomment-782150327
@petroniobonavides3530
@petroniobonavides3530 3 жыл бұрын
Please, one question. Should I have the 'Android Emulator' opened? Or The script will OPEN the Android Emulator, instead.? Thanks
@FlutterExplained
@FlutterExplained 3 жыл бұрын
The script should start the emulator actually.
@petroniobonavides3530
@petroniobonavides3530 3 жыл бұрын
@@FlutterExplained thx for the answer. But how? I couldn't do that in IntelliJIdea. Could you please give some tip?
@rakhichhettri7086
@rakhichhettri7086 3 жыл бұрын
Running the flutter integration test i just see "test starting" on my mobile device. Is there any reason this happens. would you know of any solution? Great video
@FlutterExplained
@FlutterExplained 3 жыл бұрын
I will take tomorrow some time to investigate. Thanks for letting me know and I will give you a heads up if I find something odd.
@ramkumaarmurugesan2217
@ramkumaarmurugesan2217 3 жыл бұрын
Hi brother, Flutter widget test does not trigger DropdownButton.onChanged when selecting another item
@karthikeyanjayamani121
@karthikeyanjayamani121 3 жыл бұрын
is there a way, that we can reuse the flutter mobile scripts for flutter web app? or do we have alternate way to automate the flutter web application?
@ExtraTerrestrials
@ExtraTerrestrials 3 жыл бұрын
I have a test build APK file. How do I import it to project to start testing by writing tests?
@raieshghimire9916
@raieshghimire9916 3 жыл бұрын
please provide the full execution code for the ps1 extention
@aqibjaved5120
@aqibjaved5120 2 жыл бұрын
how do i pick image while integeration testing
@tanoth1pl
@tanoth1pl 3 жыл бұрын
Hey i encounter one issue. When i have 3 tests and the first one fails, then it stops the execution of the next tests. It should print error to the console and try to do other tests. Do you encounter this issue and can help me somehow?
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi Hubert, I guess this is wished bahaviour, I will check if there is a solution so that tests will run further even on an error.
@BooSgu
@BooSgu 3 жыл бұрын
Hey Hubert. If you run 3 tests, The app would be installed 3 times, right?
@BooSgu
@BooSgu 3 жыл бұрын
Hi teacher, is it possible to put 2 "testWidgets" within a group?
@FlutterExplained
@FlutterExplained 3 жыл бұрын
I guess you mean in a Integration Test? No unfortunately not you will always run the whole suite
@BooSgu
@BooSgu 3 жыл бұрын
@@FlutterExplained That means we cannot 2 widget tests within a group. That's not handy. Thank you for your explanation!
@AzeUnkn0wn
@AzeUnkn0wn Жыл бұрын
do you integrate test authorization/sign in?
@alex_terente
@alex_terente 2 жыл бұрын
Can you have multiple testWidgets under same group?
@joaocorreia6593
@joaocorreia6593 Жыл бұрын
How can I select one email in selector natvie google account?
@salmasiala3340
@salmasiala3340 Жыл бұрын
can we test flutter with selenium ?
@deiv319x
@deiv319x 3 жыл бұрын
Quick question: will testing solve the extremely relevant animations jank on iOS? I’m desperate 😞
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi Dave, no, unfortunately not. According to most GitHub Issues that I saw around that topic, we will have to wait for a solution. But feel free to check out this tweet where I discussed the topic already with the Flutter Community. twitter.com/flutter_exp/status/1362315607673352193
@deiv319x
@deiv319x 3 жыл бұрын
@@FlutterExplained Thank you so much for the answer, I’ll check out the post for sure 😊 I’ve been working and exploring various solutions for this problem and I found some interesting and possibile solutions short term at least. I’ll share everything with the community once I’m sure they work! Do you find this being problematic for you or you mainly develop for Android? Thanks again, have a nice day 😊
@FlutterExplained
@FlutterExplained 3 жыл бұрын
@@deiv319x @Dave RiseUp I saw the problem and I had to explain it also to one of my customers, but he is not really concerned about it and me neither. The small lags are not business crucial at the moment and he decided to wait until the Flutter team found a solution to the problem.
@mdnaim4569
@mdnaim4569 3 жыл бұрын
PumpAndSettle is not working with infinite animation. It would be really helpful if any alternate to do. Thanks
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Good point, you can also just use pump and add a duration for as long your particular animation needs to display the correct part of the screen. `pump(Duration(seconds: 1))` With that you avoid regressions too :) api.flutter.dev/flutter/flutter_test/WidgetTester/pump.html I hope that helps!
@shivz732
@shivz732 3 жыл бұрын
This is all cool and stuff but when your app gets too complicated with lots of screens etc, I really can't see how this is better than manuelly testing (speed is the only thing I can think of).
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Excellent question, and actually, I am a bit sad that I could not bring that point over in my video. There are a couple of advantages, but the major once are: 1. Money, Testing experts are usually pretty expensive. 2. As you already mentioned, speed 3. Consistency, manual testing tend to test different scenarios differently, good/bad 4. Manual Testing is biased. People usually test positive and try to make the app work 5. Overnight and Weekend Testing, you can let your tests run whenever you want.
@mohammedashique8923
@mohammedashique8923 3 жыл бұрын
Anybody know how to choose value from dropdown
@marh122
@marh122 2 жыл бұрын
i think this video is little bit outdated
@FlutterExplained
@FlutterExplained 2 жыл бұрын
Thanks for the feedback. Good point, I will take it into account and try to create a newer version soon.
@marh122
@marh122 2 жыл бұрын
@@FlutterExplained perfect thanks :)
@sanuhara1375
@sanuhara1375 3 жыл бұрын
Great explanation but disagree with this video editing style. Please stop switching into the full camera view. Had to pause like 100 times to keep up with what you type on the editor.. It's really frustrating... 😩
@FlutterExplained
@FlutterExplained 3 жыл бұрын
Hi thanks for your feedback, I will see if I can improve it in the future.
@saharatphotongkham8382
@saharatphotongkham8382 2 жыл бұрын
Thanks
7. Best Practices for your Flutter Project
14:35
Flutter Explained
Рет қаралды 30 М.
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 12 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 28 МЛН
Unit Testing - For Beginners in Dart - Setup with Flutter Project
15:02
Flutter Explained
Рет қаралды 26 М.
Flutter Integration Testing Tutorial For Beginners - Practical Guide
17:06
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,2 МЛН
CI/CD - Простым языком на понятном примере
15:29
Артём Шумейко
Рет қаралды 112 М.
Flutter Europe: Optimizing your Flutter App
44:05
Flutter
Рет қаралды 117 М.
6 Steps to Master in Test Automation in 2025
44:40
Naveen AutomationLabs
Рет қаралды 20 М.
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 12 МЛН