Тёмный

Automate your Testing on Devices with Flutter Integration Testing 

Flutter Explained
Подписаться 37 тыс.
Просмотров 48 тыс.
50% 1

I am also live streaming over on Kick, it would be great to see you there from time to time: kick.com/devcafe
If you like our work and want to support us, feel free to join us on Patreon.
/ flutterexp
The tip of the testing pyramid and the highest level of automation is included inside the Flutter Integration Testing. The integration Tests allow us to mimic user behaviour and use of a real physical device to execute the tests. Thanks to the execution of a real device, you get the highest certainty that your application works correctly.
#Flutter #IntegrationTest #TestAutomation
Interesting Links:
github.com/md-weber/flutter_t...
martinfowler.com/bliki/Integr...
/ updates-on-flutter-tes...
gist.github.com/md-weber/6b33...
Timetable:
00:00 Introduction
00:39 What is Integration Testing
02:20 Benefits
02:45 Downsides
05:05 Setup Integration Tests in a project
07:55 Write an Integration Test
16:12 Except with Schematics
19:00 Test multiple Files
** New Mentorship Program to boost your Flutter career **
gumroad.com/l/ydgtfV
**BOOKS I RECOMMEND**
geni.us/flutterbook
geni.us/clean-code
** RU-vid OPTIMIZATION PLUG-INS I USE **
TUBEBUDDY: www.tubebuddy.com/flutterexpl...
VIDIQ: vidiq.com?afmc=7jl
**ALL THE RU-vid EQUIPMENT I USE**:
Our current RU-vid gear
💻 MacBook Pro: geni.us/mac-book
📹 Lumix FZ1000: geni.us/fz-1000
🎙 Samson Mic: geni.us/samson-mic
🎉 ACCESSORIES:
Satechi USB-C Adapter: geni.us/P9R0
SD Card for 4k Videos: geni.us/PTAc
Disclaimer Flutter Explained (Max & Mahtab) are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to www.amazon.com.
** Social Medias **
Website: flutter-explained.dev
Say hi to Max
Twitter: / flutter_exp
GitHub Max: github.com/md-weber
LinkedIn: / max-weber-9889a3ba
Twitch: / maxflutter
Say hi to Mahtab
Twitter Mahtab: / mahtab_dev
GitHub Mahtab: github.com/mt-tadayon

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 115   
@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
@FlutterExplained
@FlutterExplained 3 года назад
If you are interested in more testin videos, checkout the Testing Series Playlist: ru-vid.com/group/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.
@vijaybabaria3253
@vijaybabaria3253 2 года назад
Awesome tutorial, thanks for sharing and hope to see more on integration videos.
@ivanyoed
@ivanyoed Год назад
You produce excellent content Max. Thank you so much.
@andreisas1621
@andreisas1621 Год назад
Great great great tutorial. Very clear and comprehensive explanation, thank you!
@FlutterExplained
@FlutterExplained Год назад
Thanks for your fantastic feedback!
@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 :)
@anatoliipipko7258
@anatoliipipko7258 3 года назад
Great tutorial! Thanks a lot!
@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!
@BrunoCodeman
@BrunoCodeman 2 года назад
I could expect learning sociology from Max Weber, but I never thought I would learn flutter from Max Weber.
@FlutterExplained
@FlutterExplained 2 года назад
Yeah the world is a small place and my namesake is everywhere :D
@darlinmanuelcasadoperez1092
@darlinmanuelcasadoperez1092 3 месяца назад
thanks for the video, it was very helpful
@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';?
@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.
@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.
@ivanvotchel1604
@ivanvotchel1604 2 года назад
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?
@johngod35
@johngod35 3 года назад
fucking awesome, thank you so much for this flutter testing tutorial series
@adbysantos6603
@adbysantos6603 3 года назад
Good job, sir :D
@FlutterExplained
@FlutterExplained 3 года назад
Thank you :)
@ankara9594
@ankara9594 Год назад
How can we change location (latitude , longitude) with this intehration test? And is it possible to test terminated mod background test?
@karthikeyanjayamani121
@karthikeyanjayamani121 2 года назад
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?
@ahmedadnan5875
@ahmedadnan5875 3 года назад
it was an awesome tutorial
@FlutterExplained
@FlutterExplained 3 года назад
Thank you for your feedback, I am happy that you liked it!
@sarharmiha3184
@sarharmiha3184 Месяц назад
thank you
@mannembhavya4872
@mannembhavya4872 2 года назад
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.
@saileshverma1942
@saileshverma1942 Год назад
can u explain how to test out a drop down menu widget used in a form
@ramkumaarmurugesan2217
@ramkumaarmurugesan2217 2 года назад
Hi brother, Flutter widget test does not trigger DropdownButton.onChanged when selecting another item
@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.
@AzeUnkn0wn
@AzeUnkn0wn Год назад
do you integrate test authorization/sign in?
@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.
@ExtraTerrestrials
@ExtraTerrestrials 2 года назад
I have a test build APK file. How do I import it to project to start testing by writing tests?
@Robin.Backer
@Robin.Backer 9 месяцев назад
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
@anupamaprabhu9819
@anupamaprabhu9819 Год назад
Can you please share an example how to select radio button in integration test.
@aqibjaved5120
@aqibjaved5120 Год назад
how do i pick image while integeration testing
@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?
@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 2 года назад
Did you come up with any solution to this?
@raieshghimire9916
@raieshghimire9916 3 года назад
please provide the full execution code for the ps1 extention
@frx-michael-widjaja
@frx-michael-widjaja 2 года назад
Thanks for the video. Btw do you have any suggestion for testing tool which support flutter for black box testing?
@FlutterExplained
@FlutterExplained 2 года назад
Mhhh sorry, not really.
@anassa6737
@anassa6737 3 месяца назад
when i move to next page the testing stop why and not complete the rest of code
@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
@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
@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. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-WPEsnJgW99M.html
@salmasiala3340
@salmasiala3340 Год назад
can we test flutter with selenium ?
@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.
@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
@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 2 года назад
@@rommelmalqued4580 hi i am also new to flutter testing you can help me and clear the doubt
@mohammedashique8923
@mohammedashique8923 3 года назад
Anybody know how to choose value from dropdown
@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 2 года назад
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.
@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
@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 :)
@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?
@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?
@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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-2nE7qSWYyf4.html patrol.leancode.co/native/overview I hope that helps :)
@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
@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!
@TankunPrukesapitak
@TankunPrukesapitak 10 месяцев назад
I run test but App immediately shuts down when running. what happened?
@FlutterExplained
@FlutterExplained 10 месяцев назад
That could have many reasons. 1. The tests where successful and just run very fast. 2. A bigger underlying issue, but without the stacktrace it will be hard to help you here.
@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!
@kavithap4620
@kavithap4620 3 года назад
Thanks a lot for this video. Can you upload Advanced flutter automation series?
@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.
@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 2 года назад
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 2 года назад
Hi thanks for your feedback, I will see if I can improve it in the future.
@saharatphotongkham8382
@saharatphotongkham8382 Год назад
Thanks
Далее
7. Best Practices for your Flutter Project
14:35
Просмотров 28 тыс.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter Testing For Beginners - The Ultimate Guide
13:05
35 Flutter Tips That Will Change Your Life
10:53
Просмотров 298 тыс.