Flutter Testing For Beginners - The Ultimate Guide

Sdílet
Vložit
  • čas přidán 28. 07. 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

Komentáře • 65

  • @MrJohn360
    @MrJohn360 Před 3 lety +1

    Hey Robert, great content thanks for sharing!

  • @anoniem012
    @anoniem012 Před rokem

    So short clean and understandable explained, thank you

  • @dhayanandhanraju5217
    @dhayanandhanraju5217 Před 3 lety +1

    Thank you. Amazing explanation

  • @umeshshrestha7851
    @umeshshrestha7851 Před 3 lety +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  Před 3 lety +13

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

  • @andenetalexander5244
    @andenetalexander5244 Před 3 lety +10

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

  • @gaetankuadiamona3919
    @gaetankuadiamona3919 Před 3 lety

    good video with an easy explanation so thanks a lot

  • @toonkinga284
    @toonkinga284 Před 2 lety +1

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

  • @mruduladdipalli5417
    @mruduladdipalli5417 Před 2 lety

    One of the best video for Flutter Testing

  • @Cestpasfaux-
    @Cestpasfaux- Před 3 lety

    Awesome content, Thanks !

  • @MrVipulLal
    @MrVipulLal Před rokem

    Great video. Thanks

  • @i.k.shaikh3772
    @i.k.shaikh3772 Před 3 lety +4

    Excellent Demonstration

  • @johncerpa3782
    @johncerpa3782 Před 3 lety

    Great video!

  • @hectorprx
    @hectorprx Před 3 lety +2

    Nicely done, Thanks

  • @DominikRoszkowski
    @DominikRoszkowski Před 3 lety +1

    As always great video!

  • @nash9785
    @nash9785 Před 3 lety +8

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

  • @gaepopodong
    @gaepopodong Před 3 lety

    Wow! I love it

  • @tadaspetra
    @tadaspetra Před 3 lety +2

    Very nice and simple explanation 👍

  • @advAnand8008
    @advAnand8008 Před 2 lety

    Thanks a lot

  • @Pedro5antos_
    @Pedro5antos_ Před 2 lety

    Thanks!

  • @arsarsars1able
    @arsarsars1able Před 3 lety +2

    awesome 👌

  • @ShawnBlais
    @ShawnBlais Před 3 lety

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

  • @norbyzockt9902
    @norbyzockt9902 Před 2 lety

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

  • @TheEkkas
    @TheEkkas Před rokem

    Cool dude

  • @vinaybakle6443
    @vinaybakle6443 Před 2 lety

    Can we do api integration testing?

  • @CharlesSteinmetz1
    @CharlesSteinmetz1 Před 3 lety +2

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

  • @MarkDeibert
    @MarkDeibert Před 3 lety

    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 Před 9 měsíci

      Sounds like One Dark, originally from the Atom code editor

  • @lekahuna
    @lekahuna Před 3 lety +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 Před 2 lety +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

  • @faheemahmadofficial7701

    please teach us flutter from start and easie rway

  • @gaxkiller
    @gaxkiller Před rokem

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

  • @parasarora4711
    @parasarora4711 Před 3 lety

    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

  • @asjadsidd
    @asjadsidd Před 3 lety +1

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

    • @CharlesSteinmetz1
      @CharlesSteinmetz1 Před 3 lety +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  Před 3 lety +1

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

    • @davidpanic
      @davidpanic Před 3 lety +1

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

    • @IllllIIllllI
      @IllllIIllllI Před 3 lety

      Jetbrains mono gang!!

  • @anoniem012
    @anoniem012 Před rokem

    How do you have that is not equal sign?

  • @darshanrander1950
    @darshanrander1950 Před 3 lety

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

  • @jimaustin3608
    @jimaustin3608 Před 3 lety +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  Před 3 lety +1

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

    • @jimaustin3608
      @jimaustin3608 Před 3 lety +1

      Thanks .. will work with video some more.

  • @YolunSonu1
    @YolunSonu1 Před 2 lety

    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 Před 2 lety

      @Anton. thank you. That will help for sure

  • @pjpodx
    @pjpodx Před 3 lety +1

    is there BDD framework for Flutter already ?

  • @egyleader
    @egyleader Před 3 lety +1

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

  • @emirhan2070
    @emirhan2070 Před 2 lety

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

  • @YuvrajSingh-dt7vr
    @YuvrajSingh-dt7vr Před 3 lety

    go go fira code

  • @anonymousone4824
    @anonymousone4824 Před 2 lety

    This is hard 💀

  • @justytutka
    @justytutka Před 3 lety

    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?

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

  • @sezzed5663
    @sezzed5663 Před 2 lety

    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 Před 2 lety

      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 Před rokem

    Are you sure?