سؤال

Are they same thing with different names?

the word "testing" in both somehow makes me think they are similar..

هل كانت مفيدة؟

المحلول

Unit testing is writing code to test unit of code. There are no external dependencies in unit test. You can replace external dependencies with mocks/stubs.

TDD is writing the test(unit test) first before writing the actual code. Usually you write the test, see it fail, write the actual code or make changes, then see it pass.

You can read more about TDD at http://www.agiledata.org/essays/tdd.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top