You’re doing it wrong. TDD is a design activity, not a testing activity.
@Marco-dr2on
Жыл бұрын
This!!!
@gJonii
7 ай бұрын
TDD tests can be usually discarded after implementing them. You can save them, but, mostly, they're just a design step, you don't need to keep them around once you're happy with the design.
@producedbysimon3660
Жыл бұрын
You people write tests?
@surendramaran
Жыл бұрын
😂
@yurowitz
Жыл бұрын
Ive been developing apps for 6 years and not once have I needed to write tests.
@cleawrence
Жыл бұрын
Of course
@ddaypunk
Жыл бұрын
On my team we started a working model combining TDD and Pair Programming. We would pair and do TDD on the ViewModel, treating it as a contract between the View and the Data/Repository. Then split up and implement each of those separately given the completed VM with tests. It was not perfect and we definitely needed to adjust the VM at times, but overall it was a good experience and we thought it worked well.
@sytrtube
Жыл бұрын
If you are writing function before test then it is not TDD. TDD is not a testing practice, it is a software design. Testing function is just another benefit, not the actual purpose. Just saw Christopher perry said the same thing.
@izzyh5952
Жыл бұрын
That Kotlin sweatshirt is pretty sick
@philblandford5560
5 ай бұрын
I write tests for usecases (VMs should be as skinny as possible), and mock as little as possible. My rule if thumb is - if the test is more difficult to write than the thing you're testing, you're testing the wrong layer.
@oumardicko5593
Жыл бұрын
My approach to testing is quite simple. I take one scenario where a failure must occur and another scenario that has to be successful. That's it, so whenever i break something, the tests are there to help me, and if there are some special use case i would write test for them too. Like they say, keep it simple
@briancolfer415
7 ай бұрын
TDD is more about incrementally designing your system than testing its functionality. You are expressing your design intentions in code.
@GuitarPlayerPL
3 ай бұрын
I don't know about TDD. I just don't see how benefits can outweigh the problems. So many things can change during the development. If during implementing a function due to some unforeseen problems I'll have to change how it works 3-4 times, then what? I'm supposed to write 4 tests just to delete them? That makes no sense to me. It's so much easier to have an idea how it should work in your head, then write the function and then write the test and see if it works how you wanted it to work. Write test once, not 4 times.
@leolr111
Жыл бұрын
Where can I buy the hoodie?😍
@korbendallasmultipass1524
10 ай бұрын
TDD was never intended as a general concept.
@otoS97
Жыл бұрын
Writing TDD on big projects that has not feature modularization and take long to build is long day.
@alexnovikov1609
Жыл бұрын
It is a hot topic! Could you give it more attention in your videos, pleeease!
@alexanderj8981
Жыл бұрын
Thanks for the short video but it looks very misleading and hints the author never learned the TDD practice but had some experience with unit tests though. TDD is not about writing your tests before you write a function. You write a single test (or a part of it) and then production code to let the test pass. Not all tests, not even several. Next thing is you don't write a test to verify a function. A test is created when your system needs some new behaviour. You add a test first to require the behaviour and it initially shows a red test, indicating the behaviour is not in the system. Then you write production code to fulfill the requirement and the test passes. So it's nonsense to say that TDD can be useful when you roughly know what a function does but it's not the case every time. Because if you are writing some code you must know what you are implementing at the moment, otherwise what are you typing? And if you know what your system needs to do you can always write a test for it. At this point you actually don't need to know how exactly it will be implemented.
@ProGuitarUA
8 ай бұрын
Generally it's super stupid idea at first. You double or triple your effort when gaining same outcome. Real world case scenarios is not "Wee need a Service with returner User from DB where data should be collected from different tables" So you go happily write unit test for getUser function. and then create code for it. Usually you need to implement some stupid business process combining multiple systems with not yet clearly known data structures. About what then be you test? Or even you convinced yourself in data models and objects you going to create/exchange, if something change during development you fix tests every time? Too much effort, for too little outcome. Yes you can drink water standing on your head, but does it increase water drinking capabilities or stability?))
@kostiapereguda
8 ай бұрын
@@ProGuitarUA TDD is not unit testing! Who said that you must write a test every internal function for all its I/O combinations? In fact you shouldn't, because this, as you said, blocks you from refactoring, and TDD is all about enabling safe refactoring. So clearly unit testing every class and function is not TDD. TDD is a tool that forces you to think about how user of the system will interact with it and what should happen as the result of interaction. Does the user interact with that Service class directly? No. Does the user know about the schema of your DB and your domain model? No. Then why are you unit tesing them and calling this TDD? Suppose you've been asked to implement some functionality. How do you usually check if you have done your job correctly, or if your have to do it at all? Maybe the functionality is already there? Well, if you are working on a desktop app, for example, then you launch it, press some buttons in a specific sequence to trigger this functionality and check if it works, if it doesn't you go and write some code and try again until it works. While trying to run the appliction and check for the functionality you will gain some ideas as to what you should implement. This is TDD, with the only exeption that your tests aren't automated. It's you, who is driving the code under test manually. But if you write a piece of code that can actually trigger your functionality and then verify that what you expect has actually happened, then this is actual TDD. TDD is also a design tool, that helps you to structure your code better and manage coupling between modules. I was trying to do TDD for one of my personal projects, which is an app with a desktop UI app, and I managed to rediscover MVCI design pattern while using TDD. TDD is not about writing 100% tested software, its about writing well designed software
@akojic5486
Жыл бұрын
👏🏻👏🏻
@yasserakbbach708
Жыл бұрын
To TDD or not TDD was smooth :V
@symekoo7
Жыл бұрын
I think over speaking about using TDD people should speak about how to convince the client to pay for it 😂
@PhilippLackner
Жыл бұрын
If it would take longer long term nobody would do it
@azamovdev
Жыл бұрын
prosta bomba
@ibrahimaydn2030
Жыл бұрын
You are the Best, always watching you ❤
@ChrisAthanas
Жыл бұрын
In my research, what you have described is the actual TDD process!
@ajithma4091
Жыл бұрын
I always find writing Unit tests pointless. It hasn't helped us much in finding any bugs, because we change any of the written code very less often
@baijusharma6027
Жыл бұрын
No TDD
@baadrqaaba9529
Жыл бұрын
As a freelancer i dont have the time to write tests , i wish to do so , but i need to meet the deadlines of the client and deliver .
@PhilippLackner
Жыл бұрын
But you have the time to fix extra bugs later on? Sounds like you either have the wrong clients or you only assume this is a problem, but it actually isn't. If writing tests would take longer to get to the end result (a working app) than writing no tests, nobody would do it.
@purplehazer417
Жыл бұрын
@@PhilippLackner he probably meant projects where you just have to create MVP
@baadrqaaba9529
Жыл бұрын
@@PhilippLackner what do you mean wrong clients ?
@ChrisAthanas
Жыл бұрын
This is the classic problem with modern software development and why 90% off projects fail Computer science does not teach design These prices are never unpaid, just deferred
@vibovitold
Жыл бұрын
this sounds like a (19th century, thankfully) doctor who doesn't have time to wash hands, because he's got surgeries to perform
Пікірлер: 38