Flutter Testing Guide for Beginners - Part 1: Unit Tests & Setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2022
  • 📗 Get the starter project & code snippets👇👇
    resocoder.com/flutter-testing...
    📧 Get Flutter news 📰 and resources:
    👉 flutter.education
    👨‍💻 Do you write good code? Find out now!
    resocoder.com/good-code-quiz
    How can you make sure that an app does exactly what it should do without any weird unexpected surprises? Well, you test it, of course. You could test everything manually by launching the app, using it, and trying your best to make the app blow up with errors. Or you can write a bunch of automated tests, which is arguably a more time-efficient and thorough way to test your apps. Let’s take a look at unit, widget, and integration tests.
    Go to my website for more information, code examples, and articles:
    ● resocoder.com
    Follow me on social media:
    ● / resocoder
    ● / resocoder
    ● / resocoder

ความคิดเห็น • 117

  • @aadarshadhakalg
    @aadarshadhakalg 2 ปีที่แล้ว +21

    After so so long, there's finally smile on my face.

    • @ResoCoder
      @ResoCoder  2 ปีที่แล้ว +1

      That's what I like to hear!

    • @ShivamJha00
      @ShivamJha00 2 ปีที่แล้ว +2

      Bruh

    • @reiniergarcia
      @reiniergarcia 3 หลายเดือนก่อน

      Did you eat a beef steak?

    • @cillipill
      @cillipill 28 วันที่ผ่านมา

      @@reiniergarcia good one 🤣🤣

  • @h3w45
    @h3w45 2 ปีที่แล้ว +54

    This is really great, advanced tutorials like this are not usually covered, thank you a lot

    • @ResoCoder
      @ResoCoder  2 ปีที่แล้ว +6

      You're welcome!

  • @sayyedaamer9243
    @sayyedaamer9243 2 ปีที่แล้ว +14

    Commenting before seeing the video, bcz you just going to save my life, Need the testing video on flutter desperately. I follow your channel and watch you videos and before seeing the video i just say it will be amazing. Thanks alot 👍👍👍

  • @kobowo
    @kobowo 2 ปีที่แล้ว +3

    Thanks a lot for this video. I made it a good refresher in preparation to study the next part you made. I learned unit testing and TDD through your other series. I'd have too say this is more succinct and your explanations have gone better over time! Keep up the good work!

  • @pedrol4011
    @pedrol4011 2 ปีที่แล้ว +10

    Reso, you are the best! Its a privilege to learn so much from you! Thanks a lot :)

  • @minsikkim437
    @minsikkim437 2 ปีที่แล้ว

    I recently realized the importance of testing. however, there weren't well-organized advanced Flutter tutorials. I finally found it!
    Thanks for the video!

  • @harveyaptx7356
    @harveyaptx7356 2 ปีที่แล้ว

    Lots of appreciation for this 💕😍
    I've been waiting for it. Really thank you.

  • @learncodeit
    @learncodeit 2 ปีที่แล้ว +1

    Wonderful tutorial as always. Thanks for your efforts.

  • @esc4p3EP
    @esc4p3EP 2 ปีที่แล้ว +5

    Love how you handle the await for future at the end. Never knew there is a way to both wait and not wait at the same time. Thanks for the tips!

  • @aqua_dio
    @aqua_dio 2 ปีที่แล้ว +3

    Finally, you are back🎉🎉🎉🎊

  • @sangamshrestha143
    @sangamshrestha143 2 ปีที่แล้ว +2

    After so long. Nice to see you again.

  • @dibbo-mrinmoysaha406
    @dibbo-mrinmoysaha406 10 หลายเดือนก่อน +1

    really appreciated how detailed you explained the app and its functionality as well as how to test. Others just assume you know half of the stuff (which is mostly not the case)

  • @mangmun001
    @mangmun001 2 ปีที่แล้ว

    Thanks to you that using Flutter more efficiently, please upload the tutorial more often.

  • @UsamaKarim
    @UsamaKarim 2 ปีที่แล้ว

    Really amazing to watch best youtube channel for flutter tutorials.. No words can reward your work 💙

  • @brunodonascimentomaciel9984
    @brunodonascimentomaciel9984 2 ปีที่แล้ว

    The only one 1 hour educational video that I don't make me bored at the middle.

  • @medch1750
    @medch1750 2 ปีที่แล้ว +2

    Thanks for the explanations, waiting for part2

  • @tintin537
    @tintin537 2 ปีที่แล้ว +5

    I wish you could explain testing with getIt and especially injectable and mock classes

  • @subramaniang683
    @subramaniang683 2 ปีที่แล้ว +1

    Thank you so much for this awesome content. Keep doing this good work 🎉

  • @mariamalbarghouti4385
    @mariamalbarghouti4385 2 ปีที่แล้ว

    welcome back, best wishes. BEST DEVELOPER EVER

  • @christianmarpert3844
    @christianmarpert3844 2 ปีที่แล้ว

    fantastic video! Nice dive into flutter and TDD. thks a lot for sharing! Highly appreciated!

  • @younssaitmou
    @younssaitmou 2 ปีที่แล้ว +1

    Great stuff as usual 👍🏾

  • @opimand
    @opimand 2 ปีที่แล้ว

    Thanks, man, you are an awesome teacher and developer!

  • @ibrahimmammadov9669
    @ibrahimmammadov9669 2 ปีที่แล้ว

    Thanks for these tutorials 🎉 keep up the good work 👍

  • @bodehallak1552
    @bodehallak1552 2 ปีที่แล้ว +2

    Welcome back 🔥🧡♥️

  • @blacksoile
    @blacksoile 2 ปีที่แล้ว

    Once again for an amazing tutorial, keep it up you are doing an awesome job I can’t wait for part two!
    Can you tell us how you structure you study when learning something new and where you find the resources e.g. books, documentation, tutorials.
    Also do you have a must read list of books?
    Thank you!

  • @muhammadkadi381
    @muhammadkadi381 2 ปีที่แล้ว +2

    Welcome back 😍😍😍😍😍😍

  • @ideepdave
    @ideepdave 2 ปีที่แล้ว

    You made it less boring than I expected🤩 Thank you very much 🙏

  • @DamjanMiloshevski
    @DamjanMiloshevski 10 หลายเดือนก่อน

    GREAT TUTORIAL! ONE OF THE BEST ON UNIT TESTING!

  • @akshayyadav6674
    @akshayyadav6674 2 ปีที่แล้ว

    I can't wait for part 2 👍

  • @willian.veitee
    @willian.veitee ปีที่แล้ว

    thank you for this class!! 💙

  • @tintin537
    @tintin537 2 ปีที่แล้ว +1

    Welcome back Reso

  • @mipelirroja
    @mipelirroja 10 หลายเดือนก่อน

    Awesome, thank you so much very clear explanation! 🙂

  • @agent47in51
    @agent47in51 5 หลายเดือนก่อน

    Your Video helped me to learn the testing.

  • @tareqabunasser9342
    @tareqabunasser9342 2 ปีที่แล้ว +1

    welcome back 🔥🔥🔥

  • @onyemaanthony
    @onyemaanthony 2 ปีที่แล้ว

    Liked it before watching because I trust it's actually an asset, please continue with testing tutorial because there a only few tutorials on testing in flutter

  • @stephenwenceslao8623
    @stephenwenceslao8623 ปีที่แล้ว

    your explanation is easy to understand. thank you

  • @ahmedmaher-ez9xt
    @ahmedmaher-ez9xt 2 ปีที่แล้ว

    Can't wait till the nexr part ^_^ thanks for your great help

  • @basharshehab5803
    @basharshehab5803 2 ปีที่แล้ว

    Great vid! Waiting part 2..

  • @antijulius
    @antijulius 2 ปีที่แล้ว

    Thank you so much for this.

  • @BeyonderW
    @BeyonderW ปีที่แล้ว

    Thanks for sharing bro, this really help me out.

  • @leoingson
    @leoingson 2 ปีที่แล้ว

    Reso's back!

  • @afolayanademola461
    @afolayanademola461 2 ปีที่แล้ว +1

    thank you so much reso coder🤝👏👏👏👏💛💛💛

  • @harishkandekar1098
    @harishkandekar1098 ปีที่แล้ว

    Great work & effort Thanks for sharing Knowledge !!

  • @hafizibrohim599
    @hafizibrohim599 2 ปีที่แล้ว

    Welcome back 🔥👍

  • @eikeimnetz
    @eikeimnetz 2 ปีที่แล้ว

    Thank you very much for this good tutorial

  • @olamilekanadeleke6806
    @olamilekanadeleke6806 2 ปีที่แล้ว +1

    I've been wanting for an updated video on test❤😅

  • @codejack7666
    @codejack7666 2 ปีที่แล้ว

    Great video, thanks

  • @giorgosangelopoulos2098
    @giorgosangelopoulos2098 2 ปีที่แล้ว

    amazing video, i was having hard time with your bloc TDD courses. I am very familiar with provider , this is very helpful for learning testing.

  • @quyongoc3848
    @quyongoc3848 2 ปีที่แล้ว +3

    long time no see

  • @dennyraymond3753
    @dennyraymond3753 2 ปีที่แล้ว

    Thanks so much!

  • @moazelsawaf2000
    @moazelsawaf2000 ปีที่แล้ว

    Thanks a lot ❤

  • @he.who.debugs
    @he.who.debugs 2 ปีที่แล้ว +4

    After two years of working as a part-time junior Flutter developer in my university student life, I've used lots of Flutter widgets, state managements, etc. But I don't feel like I'm improving much. Now, this tutorial would be the first step to approach senior level. Thanks a lot man!

    • @daumienebi
      @daumienebi 10 หลายเดือนก่อน +1

      I'm going into the university this year and that's my plan....to get some flutter side jobs / work on my personal apps. Did you get hired by companies or you worked as a freelancer?. Thanks

    • @he.who.debugs
      @he.who.debugs 10 หลายเดือนก่อน +1

      @@daumienebi Both bro! I'm now a university dropout. I'm working as a full-time senior flutter developer and also working as a freelancer in my free time.

  • @alexandredinh-debouny5244
    @alexandredinh-debouny5244 2 ปีที่แล้ว +2

    Hello. I'm enjoying so far this video about testing. I have a question : which Visual Code plugins are you using to generate automatically code snippets for Tests (t-scaffolding, aaaT) ?

  • @Flutterdev6391
    @Flutterdev6391 2 ปีที่แล้ว

    Reso is back

  • @warunakaushalya4157
    @warunakaushalya4157 2 ปีที่แล้ว +1

    Welcome back 😉

  • @tanjiakae825
    @tanjiakae825 2 ปีที่แล้ว

    welcome back =)

  • @ahmaddarwish420
    @ahmaddarwish420 2 ปีที่แล้ว

    Thanks for the video :D
    Can we use equatable in article class?

  • @suparman6494
    @suparman6494 2 ปีที่แล้ว +1

    great tutorial

  • @thinkGrey_
    @thinkGrey_ 2 ปีที่แล้ว

    Thanks alot

  • @verry_codes
    @verry_codes 2 ปีที่แล้ว

    Resooo we missed you 😍🎉🎉🎉

  • @aoubied3624
    @aoubied3624 2 ปีที่แล้ว

    very good tutorial keep going

  • @sinanajdihejazi7031
    @sinanajdihejazi7031 2 ปีที่แล้ว

    great job keep going

  • @adelsaad3079
    @adelsaad3079 2 ปีที่แล้ว

    thank you so much

  • @walidelharrak9455
    @walidelharrak9455 3 หลายเดือนก่อน

    just beautiful

  • @martinseal1987
    @martinseal1987 2 ปีที่แล้ว

    I actually use widget tests to test a small group of widgets for instance I have a calendar and a switch that changes the calendar from week view to month view with a shared state, this is normally where you'll find bugs rather than testing a single widget, to be clear I still test single widgets but small groups of widgets give us much better coverage and still get the speed of widget testing

  • @egyleader
    @egyleader 2 ปีที่แล้ว

    Like before I watch
    😊

  • @nnguyetnam
    @nnguyetnam ปีที่แล้ว

    Thank you Reso for your very nice video! I am a fan of TDD and trying to find the effective/resonable way to use it on my daily project
    I got one question:
    At the end of the video, you put the function notifyListeners() in getArticles() but it is not following the TDD flow since it is "redundance" for this specific test case. Do you agree?
    Which test case we should write which will need this notifyListeners() called?
    thanks,

  • @djaalabahmed2038
    @djaalabahmed2038 2 ปีที่แล้ว +1

    Great it is being long time

  • @juangomez3295
    @juangomez3295 2 ปีที่แล้ว

    Thanks for the tutorial man, I love your Vs Code config, can you share it plz!

  • @mohamedhamde6611
    @mohamedhamde6611 2 ปีที่แล้ว

    Thanks a lot , boom .

  • @aqua_dio
    @aqua_dio 2 ปีที่แล้ว +1

    please show how to correctly create folder by layer feature structure in flutter

  • @BradMcHelm
    @BradMcHelm 2 ปีที่แล้ว

    hopefully you do this for your firebase DDD course

  • @lightkingbeknazarov7919
    @lightkingbeknazarov7919 2 ปีที่แล้ว +2

    I respect your creativity. Everything is clear and understandable. I would really like a new playlist about blocks (ddd course)
    Please don't ignore your followers.

  • @cgbrek
    @cgbrek 2 ปีที่แล้ว

    Matt is Bacc !!!!!

  • @kartikshrivastava1500
    @kartikshrivastava1500 หลายเดือนก่อน

    I think code duplication is fine inside tests, as each unit test is expected to be optimised for readabiliy over DRYness

  • @saifiu
    @saifiu หลายเดือนก่อน

    love u

  • @DarkHeros09
    @DarkHeros09 2 ปีที่แล้ว

    Let's Go.

  • @MedioNoOficial
    @MedioNoOficial 4 หลายเดือนก่อน

    You mentioned that dependencies should be injected through constructor rather than hardcoding in the field declaration because that makes app more testable, but what if I have many chained dependencies? I will need to declarate all in the constructor every time. For example PersonProvider(PersonService(PersonDao(Dio("url"))))) is this correct or i there is a way to auto inject dependencies with container like on SpringBoot?

  • @IIdroyII
    @IIdroyII ปีที่แล้ว

    Can we mock the Article call using mocktail and use MockArticle instead of creating three different objects of Article class?

  • @miladhesami6630
    @miladhesami6630 2 ปีที่แล้ว +1

    Very good toturial , #flutter_test , why you didn't use #mockito instead of #cocktail like your ttd clean architecture toturial

  • @omarjennane2620
    @omarjennane2620 2 ปีที่แล้ว +3

    What happened to your website ?

  • @mohamedel-shehaby9636
    @mohamedel-shehaby9636 ปีที่แล้ว

    Really good tutorial, keep going, but What's the theme of vscode.

  • @anggadwiapriarifandi69
    @anggadwiapriarifandi69 2 ปีที่แล้ว +2

    what happened to your website? it's been offline for couple of days

  • @tinoutech5016
    @tinoutech5016 2 ปีที่แล้ว

    Why you have used mocktail istead of mockito? is there a specific reason?

  • @srihariayapilla4233
    @srihariayapilla4233 2 ปีที่แล้ว

    can anyone tell me the name of the vs code extention that displays those "----" dashes to indicate blocks of code?

  • @misterjj96
    @misterjj96 2 ปีที่แล้ว +2

    Your website is offline, this was fix!!

  • @AIStha11
    @AIStha11 2 ปีที่แล้ว

    what about stream rather than the future??

  • @vinzentwitte1727
    @vinzentwitte1727 2 ปีที่แล้ว +1

    Great video, thanks. I think it's easier to put the `when` in `arrangeNewsServiceReturns3Articles` into a `setUp` in the group. So you don't have to call it, because `setUp` get called automatically, right?

    • @donathmm3881
      @donathmm3881 ปีที่แล้ว

      No because in a third test you may don't want the same articles to be arranged

  • @milinneema8737
    @milinneema8737 2 ปีที่แล้ว

    Make videos on bloc 8.0

  • @fuadreza3090
    @fuadreza3090 2 ปีที่แล้ว +1

    I wondering why your website cannot be accessed?

  • @martinseal1987
    @martinseal1987 2 ปีที่แล้ว

    I can't stand provider but I have used it

  • @rijalulfikri
    @rijalulfikri 2 ปีที่แล้ว +1

    What happens to your website Mat?

  • @MicealNaing
    @MicealNaing 11 หลายเดือนก่อน

    its been over 1 year no any new video from sir Reso Coder. Are you Okay sir?

  • @ashwanisingh4931
    @ashwanisingh4931 2 ปีที่แล้ว

    Make real-world examples video with mockito.

    • @ResoCoder
      @ResoCoder  2 ปีที่แล้ว +1

      I'd still use mocktail though.

  • @marodonthemorone
    @marodonthemorone 2 ปีที่แล้ว

    when is part 2 going to be out?

  • @rakulagn4598
    @rakulagn4598 2 ปีที่แล้ว

    Dude 😬 Make Tutorial with Auth0 implementation I Saw Some Article it's been outdated

  • @noblenetdk
    @noblenetdk ปีที่แล้ว

    Will Do something with that beard - I can't concentrate on the training 😂

  • @khurshidddbek
    @khurshidddbek ปีที่แล้ว

    10:18

  • @MythiPlayz
    @MythiPlayz 2 ปีที่แล้ว

  • @BotaParaFlutter.-ll7co
    @BotaParaFlutter.-ll7co ปีที่แล้ว

    I haven´t been creating apps for two decades,more or less,I´m PL/SQL programmer.But unit tests seems to be a really stupid Idea(change my mind),probably not useless,I mean for devices that work withouth human interaction like a mixer or a microwave woven.But E2E testing tests both the whole application and the code,they can be written by a QA and run totally isoalted from the system.At least in Brazil QA´s are less expensive than programmers.Unit tests does not seem so "agile",the concept of TDD is even worse itself.Do unit tests increase the size of the applicattion that I will distribute in the Android store,or they´re tree shaked out at least.I think they really slow down programming for what they do,as I said I´m not against testing ,i just think the testing budget should bne directioned for things like E2E,smoke,Happy path and gorila testing,wich are probably more effective and easy to automate.In 2022 Several big companies in Brazil had problems in production even havin teh so called 100% code coverage,from Banks to big E-Commerce stores.