#19 - Dart Testing Explained - Unit, Integration, E2E and why you should aim for 100% code coverage

  Рет қаралды 5,403

Flutterly

Flutterly

Күн бұрын

Hi there!
In this video I'll show you why you should definitely spend the extra time writing tests for your entire app. Using print statements inside the main file to check if the app is working or not is a really bad practice and you should change it. The soon, the better. I have prepared you a really nice package example that I'm going to entirely test as well as showing you all of the particularities of every type of tests you'll encounter. Enjoy!
All animations were done in VideoScribe, you can try it by clicking my affiliate link --- www.awin1.com/...
You can contact me directly here:
Join my Discord Server --- / discord
Twitter --- / letsgetwckd
Instagram --- / letsgetwckd
Also, if you want to support me furthermore you can become an KZbin Member, donate or buy my courses on Udemy, using the following links:
Buy me a Ko-fi & Become a member! --- ko-fi.com/lets...
Become an Official KZbin Member! ---- / flutterly
Buy my Udemy Courses! ---- www.udemy.com/...
Support me on Revolut! ---- revolut.me/let...
Donate me on Paypal! --- www.paypal.me/...
Support me on Patreon! --- / wckdyt
Dart - from Novice to Expert Source Code --- github.com/The...

Пікірлер: 28
@Flutterly
@Flutterly 3 жыл бұрын
My Complete Dart Course is now live on Udemy! Go get it while it's hot! Oh, and as a gift to my community, here's a limited-time coupon (LETSGETWCKD) helping you get it with as little as 9.99$. It's a steal for the amount of work I put in. www.udemy.com/course/dart-from-novice-to-expert/?referralCode=EC9CB6CC14FFA62C901B
@brunoalfred
@brunoalfred 3 жыл бұрын
You have never failed us...
@Flutterly
@Flutterly 3 жыл бұрын
Thank you so much, bruno! ✨
@quicksketch1617
@quicksketch1617 3 жыл бұрын
Very important Topic. Doesn't have many tutorials about
@ankitsagar7431
@ankitsagar7431 3 жыл бұрын
I think more in-depth video is needed on tests. But really your all videos are really in-depth really awesome work. Thank you WCKD.
@Flutterly
@Flutterly 3 жыл бұрын
Yes, I agree, but I will cover them up in the flutter section
@ankitsagar7431
@ankitsagar7431 3 жыл бұрын
​@@Flutterly Ohh! there's an upcoming flutter session too. That's great news!
@aakashr79
@aakashr79 3 жыл бұрын
Hitting the like button since #1. Thanks for the great Video! QUESTION. Do we test the functionality of streams(listeners, subscriptions etc.) the same way or with Widget testing? Or is there another approach.
@AyushPanditofficial
@AyushPanditofficial 3 жыл бұрын
Nice sir really wating for next part
@Flutterly
@Flutterly 3 жыл бұрын
It will come soon 🔜!
@radurot7673
@radurot7673 3 жыл бұрын
Great content. The only thing that it lacks for me in this series is the absence of a github repo with the code as a starting point to play around. That would help more to follow your explanations
@Flutterly
@Flutterly 3 жыл бұрын
Hello, Radu! First and foremost thank you so much for your valuable feedback! Yeah, I am aware of this issue, when I was first designing the course, I wanted the entire series to be follower along, so that viewers can implement the entire code by their own. So this is why I went with this structure without a github repository. Therefore, unfortunately the majority of the projects I built in these early tutorials got deleted from my computer, I wish I could upload them now, but I'd have to write them again and again for every tutorial, and that's not a viable option. I'll try and improve myself over the next series and videos and I admit it was a mistake not posting the code on github. Thank you again,
@radurot7673
@radurot7673 3 жыл бұрын
@@Flutterly I really appreciate you took time to respond. It's not at all a major issue. The content is great Looking forward for blocFromHeroToWizard series
@Flutterly
@Flutterly 3 жыл бұрын
Haha, after I wrote you the reply, I went into my ssd drive and frankly I have found some of the packages I created for this Dart series, will let you know if I manage to upload at least what I still have on the block! Yeah, I'll continue that series soon, I have a couple of more advanced concepts to be taken care of inside this Dart course.
@radurot7673
@radurot7673 3 жыл бұрын
@@Flutterly great news, happy to hear that :D
@Flutterly
@Flutterly 3 жыл бұрын
Just double checked and it seems like I lost the project in which I discussed Dart Classes, frankly one of the most important tutorials from this series 😔
@marcrenken1169
@marcrenken1169 2 жыл бұрын
Hey :) Is there any way to run these tests for dartjs as well? I would like to use these tests to test if my code works crossplatform. Thanks again for the great course - it helped me a lot.
@islomkhujaakhrorov6668
@islomkhujaakhrorov6668 3 жыл бұрын
Cool video
@Flutterly
@Flutterly 3 жыл бұрын
Thanks man! ✨
@davidowens9597
@davidowens9597 3 жыл бұрын
Do we really need to copy code into the "test" folder? That doesn't sound right. Can't we just import whatever library we want to test?
@Flutterly
@Flutterly 3 жыл бұрын
I didn't say that you need to copy code into the test folder. I said that every library/file should have its own test into the test folder, therefore the test folder should have the same structure as the lib folder. Of course, inside the test files you'd need to import the libraries you're going to test right from the lib folder by using the import package directive.
@davidowens9597
@davidowens9597 3 жыл бұрын
@@Flutterly I got confused by that part and re-watched it after I saw your reply. Thanks.
@dibyajibansahoo2618
@dibyajibansahoo2618 3 жыл бұрын
Why your insta full of cars 🤭
@Flutterly
@Flutterly 3 жыл бұрын
Haha, I used to be a photographer and videographer in the past 😂
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 40 МЛН
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 13 МЛН
Flipping Robot vs Heavier And Heavier Objects
00:34
Mark Rober
Рет қаралды 59 МЛН
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 74 МЛН
Flutter Unit Testing Tutorial For Beginners - Practical Guide
1:06:54
Rivaan Ranawat
Рет қаралды 37 М.
Flutter Testing Guide for Beginners - Part 1: Unit Tests & Setup
1:00:28
Unit Testing - For Beginners in Dart - Setup with Flutter Project
15:02
Flutter Explained
Рет қаралды 25 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 857 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 409 М.
Flutter Testing For Beginners - The Ultimate Guide
13:05
Robert Brunhage
Рет қаралды 60 М.
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 40 МЛН