Flutter Integration Test Tutorial + Firebase Test Lab & Codemagic

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ม.ค. 2021
  • 📗 Learn from the written tutorial 👇👇
    resocoder.com/flutter-integra...
    ✨ Codemagic CI/CD built with Flutter in mind:
    codemagic.io
    📧 Get Flutter news 📰 and resources:
    👉 flutter.education
    👨‍💻 Do you write good code? Find out now!
    resocoder.com/good-code-quiz
    Unit tests, widget tests, integration tests - that's the testing pyramid you're probably familiar with. The first two have always been quite easy to write and quick to execute. However, integration tests, which are the focus of this tutorial, have had a fair share of their problems - they used to be unnecessarily hard to write and impossible to run on device farms such as Firebase Test Lab. That is, until we had the integration_test package!
    Go to my website for more information, code examples, and articles:
    ● resocoder.com
    Follow me on social media:
    ● / resocoder
    ● / resocoder
    ● / resocoder

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

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

    What I have been waiting for!

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

    This is totally what we needed right now, great timing! Thank you so much

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

      I'm glad this tutorial helped you, Stefano!

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

    Brilliant! I love your videos Reso ❤️❤️

  • @Mark-og2cu
    @Mark-og2cu 3 ปีที่แล้ว +1

    Thank you for the very detailed explanation of every step!

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

    Thanks for covering flutter.

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

    Very cool video. thanks!

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

    Yeah, finally!!! You are simply the best :-D Please can you make end-to-end testing tutorial ?

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

      Thank you! The integration_test package was previously called "e2e" and as I've mentioned in the video, integration tests in Flutter are basically UI tests (which is a synonym for e2e tests in my opinion).
      Mimochodom, ahoj Adam! 😅

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

      @@ResoCoderAhoooj :-D. Pár měsíců zpátky jsem psal něco v češtině :D

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

    Hey Resco, thank you for your video.
    I have a question about implementing a Page object to integration tests. Could you make a short and simple video about it? I have done that for flutter driver but now I'm not sure how to refactor my framework to use page object in this new package. I will appreciate that a lot.
    Best regards :)

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

    How can I tap on native location permission popup during integration test ?

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

    Thanks!

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

    Why not using the codemagic tool "Encrypt environment variable" to encrypt the json file? But still a great tutorial again Matt, thank you so much for your work!

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

    Oh my Lord Amazing

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

      Thank you for your work!!

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

    Thanks for a great tutorial. Unfortunately, I can't make run integration tests that use files from assets in Firebase Test Lab. The Test Lab does not provide proper logs so it took me 3 days to figure out the problem is connected with reading files. I have not found a work around yet for the issue

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

    Sir could you pls make some videos on rxdart and streams

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

    Hey, great video! but it would be nice if you can make a tutorial on iOS as well using Codemagic and Firebase Test Lab. I've been trying to do it for flutter iOS but dead end.

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

    Thanks for the video, I'm developing integration tests in my app, but I ran into a problem with the permissions. You know that if we try to use the camera, geolocation or any other service of the phone the operating system requires allow its use. So when an integration test is being developed this modal appears and I'm not able to find a solution to allow it. Any idea?

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

    looks pretty complicated. very helpful video though, thanks. liked and subscribed

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

    How about the web part? It would be a good video as well!

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

    hi, can you make a full tutorial to set up flutter with emulator android for windows, thank you

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

    Any example while testing with calling APIs and handling its response.?

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

    Is possible run integration_test for iOS on Firebase Test Lab?

  • @ductrandinhvti.d2692
    @ductrandinhvti.d2692 3 ปีที่แล้ว +1

    Hello, I have an unrelated question, I want to use flutter driver to implement automated test. And I want to run multiple test cases of Flutter integration tests in single command or from single file. Do you know anyway to do this?

    • @user-lw3rm3sc4f
      @user-lw3rm3sc4f 6 หลายเดือนก่อน

      You can make a main file to tests and call all of your tests in this file and run this file

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

    Well perfect as usual , i have a question :
    Im developping an app which have a KYC part which consist of 4 chapters and each chapter have 10 pages and each page have 4 to 5 textformfield also gender , date and select options .. etc
    Should i do integeration test and waste that much time on it ?
    Im using my actual device and also testing each page and each textfield once i finish coding this page .

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

      There is no general answer to this question. It is up to you to decide how many tests on each test level you need and can affort (writing tests is time consuming). See martinfowler.com/articles/practical-test-pyramid.html for more details

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

      @@dpirs thankss i will check it out

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

    Ios version as well?

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

    any idea how to tap on location permission native popup?

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

    How to enter text to a custom text field like OTPTextField?

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

    The library 'package:integration_test/integration_test.dart' is legacy, and should not be imported into a null safe library.
    Try migrating the imported library.dart(import_of_leg

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

    Haha. In 54:19 you will see the index 2 (2nd run) of the build. And 2 secs later (54:21) the index has magically increased to index 4. So there are two more build failures, but the commit hash is the same, so it seems to be a configuration failure in codemagic. Am I right?

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

      I messed up with a configuration step which I then outlined in the video as if nothing happened through the power of video editing 😄

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

    Great tutorial ! . Can we also execute this script using codemagic.yaml file right?

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

    One more question if anyone can help or explain - when I run my test usign 'flutter drive ...' command , I can see fine how tests are executing on my mobile device (or simulator). But when I run the tests from VSCode in debug mode (so that I'm able to debug them), they are executed, but I cannot see any updates on my mobile device. It is like they are running in background or something.

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

      They are executing in Dart VM (virtual machine).

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

    Which VSCode theme is this?

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

    What is the benefit of using integration_test vs the flutter_driver?

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

      As I've mentioned, integration_test uses the much easier to write widget testing API and also, you can run these tests on Firebase Test Lab.

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

    How is this info free, amazing video. Thank you

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

    Hi thank you so much for your video, but I have question, why when i try to use Firebase Test Lab, it says "Test failed to run". But actually it works perfectly in my local machine when I try to use flutter drive. Is there any way to reproduce this issue in my local machine? Or do you know how to solve this.
    Btw, when i try to run your project on my firebase test lab, it also works perfectly.
    Thankss!

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

      Probably something wrong with your CLI commands to FTL. Also, you can run them locally (but firstly build apk) not via "flutter drive ..." (with a host) but via "./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../integration_test/app_test.dart -Pandroid.debug.obsoleteApi=true" from "android" folder (without a host - directly on an emulator or real device).

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

      ​@@ivanhorchakov2411 Is there a way to pass --dart-define when using gradle to build the app?

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

      @@gabrielfontanari4488 you'll not believe me, but I was wondering how to pass "--dart-define" in Firebase TL run too :). Actually, your idea can help - please tell me if you've already tried it or I'll try it by myself.

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

    how do you incorporate Appium in the integration test for Flutter test?

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

      yeah, im in a spot where we are deciding do we go for flutter solution or java + selenium + appium ( which i prefer in long run i think ), but im not sure, flutter is not providing selectors for selenium, just xpaths and ocassionaly accesibleId :/

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

    Hey Reso, Are you going to update the video?

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

    🤔