๏ฃฟ Snr iOS Engineer @PlutoTV |
๐ Author of Yet Another #Swift Blog https://t.co/wnZcihoqSP |
๐ฃ Organizer @iOSUkraine |
๐จโ๐ป I tweet daily on #iOSDev and #Programming
Jan 15, 2020 โข 39 tweets โข 9 min read
Unit tests are key to producing more robust and less buggy software.
In this thread I will discuss everything about unit tests. Examples will be in Swift and XCTest framework, but the principles apply generally to all languages and test frameworks.
Thread ๐งต๐
1. What is a unit test?
Unit test is a method that runs a piece of code to verify that a known, fixed input produces a known, fixed output. If the assumptions turn out to be wrong, the unit test considered failed.