{"id":916,"slug":"tdd","name":"Test-driven development","short_description":"Test-driven development is a development process with a test-first approach relying on requirements being converted to test cases.","url":"https://github.com/topics/tdd","github_count":8781,"created_by":"Kent Beck, D.D. McCracken","logo_url":null,"released":"1957","wikipedia_url":"https://en.wikipedia.org/wiki/Test-driven_development","related_topics":["atdd","bdd","testing","extreme-programming","continuous-testing"],"aliases":["test-driven-development"],"github_url":null,"content":"\u003cp\u003e\u003cstrong\u003eTest-driven development\u003c/strong\u003e (\u003cstrong\u003eTDD\u003c/strong\u003e) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later. Programmers also apply the concept to improving and debugging legacy code developed with older techniques.\u003c/p\u003e\n\n\u003ch1 id=\"process\"\u003eProcess\u003c/h1\u003e\n\u003col\u003e\n  \u003cli\u003eAdd a test\u003c/li\u003e\n  \u003cli\u003eRun all tests. The new test should fail for expected reasons\u003c/li\u003e\n  \u003cli\u003eWrite the simplest code that passes the new test\u003c/li\u003e\n  \u003cli\u003eAll tests should now pass\u003c/li\u003e\n  \u003cli\u003eRefactor as needed, using tests after each refactor to ensure that functionality is preserved\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cp\u003eRepeat.\u003c/p\u003e\n","created_at":"2024-07-29T14:01:15.280Z","updated_at":"2026-06-21T00:24:42.209Z","topic_url":"https://awesome.ecosyste.ms/api/v1/topics/tdd","html_url":"https://awesome.ecosyste.ms/topics/tdd","projects_url":"https://awesome.ecosyste.ms/api/v1/projects?keyword=tdd","lists_url":"https://awesome.ecosyste.ms/api/v1/lists?topic=tdd"}