Flutter Testing For Beginners - The Ultimate Guide

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.ค. 2024
  • Testing is hard to get into in the beginning. So by starting small we will learn all the basics to get started with testing in Flutter!
    Course to build a production-ready app 👉 robertbrunhage.com/course
    0:00 Overview
    0:27 Unit testing
    3:13 Mocks
    4:35 Widget Testing
    8:04 Integration Testing
    Riverpod: • State Management Like ...
    Source code: github.com/RobertBrunhage/flu...
    ····················································································
    ► All my content is 100% free. I am a strong believer that free education should be available for everyone. Any support is truly appreciated so I can keep making the content completely free.
    ♥ Become a Patreon supporter: / robertbrunhage
    ♥ Subscribe: bit.ly/2SUyRhx
    ····················································································
    ● Website: robertbrunhage.com/
    ● Twitter: / robertbrunhage
    ● Discord: / discord
    ● Instagram: / robertbrunhagedev
    ● Facebook: bit.ly/RobertDev

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

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

    So short clean and understandable explained, thank you

  • @dhayanandhanraju5217
    @dhayanandhanraju5217 3 ปีที่แล้ว +1

    Thank you. Amazing explanation

  • @MrJohn360
    @MrJohn360 3 ปีที่แล้ว +1

    Hey Robert, great content thanks for sharing!

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

    One of the best video for Flutter Testing

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

    I m very beginner to flutter testing. I thing I got something from this video. thank you very much 👏🏻❤

  • @gaetankuadiamona3919
    @gaetankuadiamona3919 3 ปีที่แล้ว

    good video with an easy explanation so thanks a lot

  • @Cestpasfaux-
    @Cestpasfaux- 3 ปีที่แล้ว

    Awesome content, Thanks !

  • @andenetalexander5244
    @andenetalexander5244 3 ปีที่แล้ว +10

    You made testing easy! I thought testing as a very complicated thing to get to. Thanks Robert!

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

    Great video. Thanks

  • @johncerpa3782
    @johncerpa3782 3 ปีที่แล้ว

    Great video!

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

    Nicely done, Thanks

  • @i.k.shaikh3772
    @i.k.shaikh3772 3 ปีที่แล้ว +4

    Excellent Demonstration

  • @DominikRoszkowski
    @DominikRoszkowski 3 ปีที่แล้ว +1

    As always great video!

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว

      Thanks Dominik, highly appreciated!

  • @sunhwang
    @sunhwang 3 ปีที่แล้ว

    Wow! I love it

  • @umeshshrestha7851
    @umeshshrestha7851 3 ปีที่แล้ว +56

    Please remove the white animation lines, it's hard to focus when it's popping on the screen. But the content is great.

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +13

      Thanks for the feedback, it's gone in the newer videos!

  • @nash9785
    @nash9785 3 ปีที่แล้ว +8

    I’ve been waiting for a video like this for a while. Time to spam my teammates 😊😏

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +1

      Haha you are doing the right call 😂

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

    Thanks!

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

    Very nice and simple explanation 👍

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

    Thanks a lot

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

    awesome 👌

  • @ShawnBlais
    @ShawnBlais 3 ปีที่แล้ว

    Great video! btw: `driver?.close();` saves a cpl lines

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

    Cool dude

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

    Cam you show how to use flutter driver with chrome and see the testing?

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

    I watched the video in 2X then come back in 1X just for fun >

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

    great video, thank you! have you ever done tests with google maps widget?

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +1

      Thanks and sadly I have not...

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

    Can we do api integration testing?

  • @MarkDeibert
    @MarkDeibert 3 ปีที่แล้ว

    What is color theme you're using. Looks great! Oh and the content is excellent my friend. I've watched more than several of your Flutter videos. All good!

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

      Sounds like One Dark, originally from the Atom code editor

  • @lekahuna
    @lekahuna 3 ปีที่แล้ว +1

    3:50 "We can't instanciate the dependency right in the method, because then we don't have any external way of mocking that dependency"
    Is it good practice to change code (like extracting the instanciation out of the method) only for testing?
    Thanks for the great video!

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

      You should do it not only because of testing, it's a bad practice, if you're instantiating dependencies in the method, your class is gonna be coupled to the other, read about dependency inversion

  • @parasarora4711
    @parasarora4711 3 ปีที่แล้ว

    hey, I am getting this error every time I run command for testing. { Could not find a file named "pubspec.yaml" in "/home/paras/.pub-cache/hosted/@t Pls help me out. the path is correct that's confirmed, getting the same error on all integration test repos

  • @faheemahmadofficial7701
    @faheemahmadofficial7701 3 ปีที่แล้ว

    please teach us flutter from start and easie rway

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

    How do you have that is not equal sign?

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

      Ah jetbrains mono font

  • @darshanrander1950
    @darshanrander1950 3 ปีที่แล้ว

    Mockito should be a dev dependency if I'm not wrong 🤔🤔

  • @asjadsidd
    @asjadsidd 3 ปีที่แล้ว +1

    Awesome Video,
    How did you get the != sign to look like that in VS code ?
    In 10:42 ?

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

      it is the font Fira Code. Follow these steps to install it medium.com/@samichkhachkhi/fira-code-monospaced-font-with-programming-ligatures-1cfcc829d692

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +1

      I actually use the jetbrains mono font www.jetbrains.com/lp/mono/ but anything works as long as it supports ligatures!

    • @davidpanic
      @davidpanic 3 ปีที่แล้ว +1

      I prefer fira code as well. Check it out, it includes tons of common programming ligatures.

    • @IllllIIllllI
      @IllllIIllllI 3 ปีที่แล้ว

      Jetbrains mono gang!!

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

    I have searched on the web, but I could not find a satisfying answer to my question. Why do I need to make a unit test instead of running the code directly in debug mode and printing the required values to the console?

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

      @Anton. thank you. That will help for sure

  • @egyleader
    @egyleader 3 ปีที่แล้ว +1

    I just realized I am old because I am older thank 24 😏 ! .
    .
    .
    .
    .
    .
    Kidding 😂 ,, thanks man

  • @jimaustin3608
    @jimaustin3608 3 ปีที่แล้ว +1

    Looks like these testing process are based on the VS code IDE, and thus not applicable to Android Studio.
    Am I wrong/missing something?

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +1

      No these are based on Flutter so you can even run it from the terminal with "flutter test"

    • @jimaustin3608
      @jimaustin3608 3 ปีที่แล้ว +1

      Thanks .. will work with video some more.

  • @pjpodx
    @pjpodx 3 ปีที่แล้ว +1

    is there BDD framework for Flutter already ?

    • @RobertBrunhage
      @RobertBrunhage  3 ปีที่แล้ว +1

      I am not sure, have not taken a look

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

    Your voice just like the guy who owner of Flutter Mapp YT channel.

  • @YuvrajSingh-dt7vr
    @YuvrajSingh-dt7vr 3 ปีที่แล้ว

    go go fira code

  • @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.

  • @justytutka
    @justytutka 3 ปีที่แล้ว

    Hello :) When i'm trying to run test, I get error;
    Could not find a running Flutter app that was instrumented with enableFlutterDriverExtension. Run your instrumented app before running driver tests.
    Google can't help :( Maybe you will know what's reason of this error?

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

    This is hard 💀

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

    Hey we are here to learn, if we want to watch fast videos we would go to TikTok, what's up with all the cuttings and fast forwardings?

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

      I am sure you have no idea what kind of hardwork goes into making this type of content. If you want to give content creators suggestions, you might need to learn the way to do that.

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

    Are you sure?