Ronaldo Vitto Lewerissa

Software engineering learning documentation.

Unit Testing and TDD

After all research and experience on this topic, this is currently my latest understanding and brief note on unit testing and test driven development.

Unit testing is a form of test.

Test only units with complex logic.

It can also be used as a design purpose. Unit that is hard to test is a solid indication of bad code. Too much dependency means a lot of mocking, meaning high coupling.

TDD is a preference, and it’s job is as a guidance. It can also promotes YAGNI (you ain’t gonna need it), which will helps you to write only the codes which are necessary.

Written by Ronaldo Vitto Lewerissa

Read more posts by this author.