Flutter Widget Testing - Test Scrollable Widgets - Test AssertionError in Widget

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • * New Mentorship Program to boost your Flutter development*
    gumroad.com/products/ydgtfV
    In this video, I give you an introduction to Flutter Widget Testing. First, we will talk about the basic concept and I will explain you in the code how Flutter Widget Tests are done. For this purpose, I will introduce you to the Flutter Example Widget test and after that, we will create our own widget tests in three different Test Scenarios.
    #Flutter #FlutterWidgetTesting #Testing
    TimeTable:
    00:00 Intro
    01:03 - Introduction to Widget / Component Testing
    04:45 - Starting with Programming
    05:30 - Discover the default Counter App Test
    10:40 - Test scroll Behavior
    16:00 - Test Screen Sizes
    17:19 - Test AssertionError
    **BOOKS I RECOMMEND**
    geni.us/flutterbook
    geni.us/clean-code
    ** TH-cam OPTIMIZATION PLUG-INS I USE **
    TUBEBUDDY: www.tubebuddy.com/flutterexpl...
    VIDIQ: vidiq.com?afmc=7jl
    **ALL THE TH-cam EQUIPMENT I USE**:
    Our current TH-cam 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
    Say hi to Mahtab
    Twitter Mahtab: / mahtab_dev
    GitHub Mahtab: github.com/mt-tadayon

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

  • @steevecabrel.spreeloop
    @steevecabrel.spreeloop 3 ปีที่แล้ว

    Great video for starters on flutter widget test.

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

    For someone who has just started doing TDD, this was really helpful. I noticed you did a live stream with Flutter 1.22 live learning. Could I request a video idea? Maybe a video on the new Navigator 2.,0 API since I am having a hard time understanding it. Another great video would be a rundown of all you learnt in and since that live stream. I hope to see more videos and thank you for making the awesome content.

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

      Hi Parkar, that is a fantastic idea and I work already on a Navigator 2.0 video. I hope I can release it soon!

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

    Arrange Act Assert - AAA

  • @therealt3cmd
    @therealt3cmd 7 วันที่ผ่านมา

    Arrange
    Act
    Assert

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

    fucking chad, thanks for this series

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

    thank you for the video. I came here to find how to test if my scrollbar appear or is hidden because I extend the time it is shown and want to keep this behavior. Is it possible to find the scrollbar? I tried to find the ScrollbarPainter widget but doesnt work.

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

      Hi there, there are multiple ways I guess, one would be to add an key to the widget and look that one up. In general I would recommend you take a look into the Flutter Project.
      github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/scrollbar_test.dart

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

    Plz flutter app advaned testing tuotorials for develoer

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

    What if there are two icon buttons? How to differentiate between them?

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

      You can set for one of the buttons a id and find it by id, another solution is to find unique attributes of the button like parents etc. the find method is very versatile and should be able to help you in any case. I would recommend you to check the Flutter Project for amazing test examples. github.com/flutter/flutter/tree/master/packages/flutter/test

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

    I couldn't access the codes of Scrolling Widget which mentioned in the video. Could you share?

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

      Thank you for letting me know, I had some troubles with the repository and cannot find it either, I will recreate the repository and send you the link asap :)

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

      @@FlutterExplained Thank you ver much 🤗

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

      @@FlutterExplained can you send me the link to? I can't find it. thanks

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

    act arange assert

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

    make a live session about testing

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

      Sure sounds like a good plan :)

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

      @@FlutterExplained Hey, could you please make a video on my plugin? It's a basic plugin that makes writing dynamic UI easy in Flutter.

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

    widget testing is in black hole inside flutter universe...Of all example flutter projects in github and youtube video tuts I only see 0.01% content for widget test topic don't know why...

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

      Yeah but the problem is that there are billions of possibilities. But if you want to learn more about different widget tests I highly recommend you take a look into the Flutter Repository. They write tons of them and many of them are just amazing.

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

      @@FlutterExplained r they inside flutter samples or actual repo??

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

      @@pradeep422 In the main repository:
      github.com/flutter/flutter/tree/master/packages/flutter/test

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

      @@FlutterExplained oh god ty...

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

      @@pradeep422 You are most welcome :)

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

    Arrange Act Assert