Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Previously, you've used breakpoints to fix bugs, but now you're going to use unit testing to avoid
bugs in this lesson, you're going to understand the importance of unit testing.
Manual testing means running your code.
The output determines if you have a bug.
But the output doesn't tell you where the bug is.
For example, I assume you've written a lot of code, then you run your application and the output determines
you have a bug.
OK, where's the bug?
Now you have to inspect every single line of code to find your bug.
This is terrible.
Unit testing helps you avoid bugs.
Unit testing means every small unit of your application has a test.
As soon as you make a mistake, one of your tests is going to fail, the failing test tells you where
you made a mistake.
For example, as you're writing code, you make a mistake.
The test for that unit of code fails immediately, the failing test tells you to fix your mistake.
Once you fix it, the test passes.
If every test passes, then, you know, your application doesn't have any bugs and you can continue
coding with peace of mind.
So what is the importance of unit testing?
What if I don't unit test, you're going to hesitate to add code from fear of getting bugs.
You're always going to be scared that one day your OP is going to break.
But what if you do unit test, in that case, you'll never get bugs.
Your code is always going to be polished.
Unit testing helps you avoid bugs, every small unit in your application should have a test if you make
a mistake, the test for that unit fails when you fix your mistake, the test for that unit passes.
If every test passes, then your application doesn't have any bugs.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.